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)
registration_test.go:96:
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.
ouyang
June 16, 2020, 3:33am
8
OK.
I’ll send to you the file by mail later.
Thanks.
vikash
June 10, 2020, 3:54am
2
Dear,
Even i am also getting the same error. any help is appreciated.
Thanks
Vikash
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?
opened 09:19AM - 09 Jun 20 UTC
closed 09:41AM - 03 Jul 23 UTC
## Describe the bug
I got the segmentation fault.
I can not run any test scrip… t.
## To Reproduce
Steps to reproduce the behavior:
1. power on
2. install gtp5g
3. cd free5gc
4../test.sh TestRegistration
5../test.sh TestServiceRequest
6....
## Expected behavior
same test script outcome
## Screenshots
=== RUN TestServiceRequest
--- FAIL: TestServiceRequest (0.00s)
registration_test.go:478:
Error Trace: registration_test.go:478
Error: Expected nil, but got: 0x6f
Test: TestServiceRequest
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=0xa3b72f]
goroutine 252 [running]:
testing.tRunner.func1(0xc0025fde00)
/usr/local/go/src/testing/testing.go:830 +0x392
panic(0x1338fc0, 0x2317770)
/usr/local/go/src/runtime/panic.go:522 +0x1b5
git.cs.nctu.edu.tw/calee/sctp.(*SCTPConn).fd(...)
/home/james/go/src/git.cs.nctu.edu.tw/calee/sctp/sctp.go:373
git.cs.nctu.edu.tw/calee/sctp.(*SCTPConn).SCTPWrite(0x0, 0xc0030e2680, 0x39, 0x40, 0x0, 0x0, 0x0, 0x1)
/home/james/go/src/git.cs.nctu.edu.tw/calee/sctp/sctp_linux.go:88 +0x4f
git.cs.nctu.edu.tw/calee/sctp.(*SCTPConn).Write(...)
/home/james/go/src/git.cs.nctu.edu.tw/calee/sctp/sctp.go:385
free5gc/src/test_test.TestServiceRequest(0xc0025fde00)
/home/james/go/src/free5gc/src/test/registration_test.go:483 +0x1fd
testing.tRunner(0xc0025fde00, 0x1574b80)
/usr/local/go/src/testing/testing.go:865 +0xc0
created by testing.(*T).Run
/usr/local/go/src/testing/testing.go:916 +0x35a
exit status 2
FAIL free5gc/src/test 1.645s
## Environment (please complete the following information):
- free5GC Version: v3.0.2
- OS: Ubuntu 18.04 desktop
- Kernel version 5.0.0-23-generic
- go version 1.12.9 linux/amd64
- c compiler version (Option) gcc version 7.5.0
## Trace File
### Configuration File
no modifcation, using default configuration
### PCAP File
Dump the packet and provide the pcap file here.
[TestRegistration20200609_fail.zip](https://github.com/free5gc/free5gc/files/4751150/TestRegistration20200609_fail.zip)
### Log File
[TestRegistration_faill_20200609.txt](https://github.com/free5gc/free5gc/files/4751175/TestRegistration_faill_20200609.txt)
If you do not know what to do, copy the log print on the screen and put it here.
## System architecture (Option)
Give the draft of your architecture. What's your scenario, bare metal use case or using k8s, etc.
## Walkthrough (Option)
What you have find or research for short.
## Additional context
Add any other context about the problem here.
ouyang
June 12, 2020, 1:50am
4
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.
ouyang
June 16, 2020, 2:38am
6
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.
vikash
June 17, 2020, 2:54pm
9
Dear,
if your problem get resolved, please do update us. we are also waiting for the solution of the same problem.
Thanks
vikash
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:
https://github.com/free5gc/free5gc/wiki/Trouble_Shooting#2-testnon3gpp
vikash
June 23, 2020, 4:36am
14
Dear,
I am using the latest version i.e, v3.0.2 .
vikash
June 23, 2020, 4:38am
15
free5GC:
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:
This will help us a lot. Thanks for all your support.
Thanks
vikash
ouyang
June 30, 2020, 1:53am
16
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.
Kevin
March 14, 2022, 6:15am
18
I also got the same error on 2022/3/14. Any help is appreciated~
Here is my error code
=== RUN TestRegistration
registration_test.go:50:
Error Trace: registration_test.go:50
Error: Expected nil, but got: 0x6f
Test: TestRegistration
— FAIL: TestRegistration (0.01s)
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=0xda72d7]
gmu5G
March 23, 2022, 3:01am
20
I also got the same error.
I’ve been following the YouTube videos, but haven’t made it past Video 10: Testing free5GC due to failing “./test.sh TestRegistration”.
LFTF
March 21, 2022, 5:39am
19
Modification point:
configuration:
amfName: AMF # the name of this AMF
ngapIpList: # the IP list of N2 interfaces on this AMF
- 127.0.0.1 #127 .0.0.18
completed~