TestRegistration Failed

I have set the free5GC in my VM. But it always appeared errors when I run test.sh. How to solve these kinds of questions?

(This is the situation when I run TestRegistration)

=== RUN TestRegistration
— FAIL: TestRegistration (0.00s)
Error Trace: registration_test.go:96
Error: Expected nil, but got: 0x6f
Test: TestRegistration
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa3a26f]

Thanks very much.

I’ll send to you the file by mail later.


Even i am also getting the same error. any help is appreciated.


This issue is similar to GitHub issue #67.

we are working on reproducing it at our environment. If i may ask, is there any environment setting at your host?

No. We all followed the instruction.

My environment:

Ubuntu 18.04
Memory: 4GB
Processors: 4
Hard Disk: 32GB

Do you need any information to check? Maybe we can help about that.

How about try replacing git.cs.nctu.edu.tw/calee/sctp to github.com/ishidawataru/sctp in free5GC.

Sorry. Still failed on test.sh. It can’t work.
Or maybe I can send you the vm image?

It might be less helpful sending us your vm image, because we cannot reproduce it on our own here.

My other point of concern is the bug might be cause by the hardware. Can you please cross check your hardware specification and see whether it might have been the leading caused.

if your problem get resolved, please do update us. we are also waiting for the solution of the same problem. :smiley:

Sure, we’re still working on it any new development we will update it on the forum. Thanks to @ouyang for supporting with his VM for our team to work on reproducing the error.

1 Like

Hi @ouyang,

We found out that you are not using the latest version of free5gc (v3.0.2).

You might try checking-out on v3.0.2 and test again, probably v3.0.2 default is using H2C in SBI. Finally try using this command mongo --eval "db.NfProfile.drop()" free5gc to flash the data in db

Hi @vikash,

what version are you currently using?

We found the root cause of the issue.

Based on our finding we observer that, after running TestNon3GPP, the test script will trigger a modification on ngaplpList. Although the script will auto recover the amf config file but when the test is terminated manually the ngaplpList will not be recovered. Therefore, if tried with other test for instance, (TestRegistration) the sctp will bind to an IP’s that are not existing which might result to failure.

To our conclusion, the issue might not be related to version difference. Please refer to the troubleshooting instructions below for more detail.

Refer to the trouble shooting:

I am using the latest version i.e, v3.0.2 .

This will help us a lot. Thanks for all your support.


Sorry, but I don’t have the file which named amfcfg.conf.bak.

How should I do?

You can try to use the original amf config file.