HewlettPackard / PacketRusher

High performance 5G UE/gNB Simulator and CP/UP load tester.
Apache License 2.0
117 stars 26 forks source link

[BUG] PacketRusher crashes during UE processing if you use a gNodeB id with a hex digit #106

Closed rjaksa closed 7 months ago

rjaksa commented 8 months ago

Describe the bug PacketRusher crashes during UE processing if you use a gNodeB id with a hex digit in the config.yml file.

To Reproduce Steps to reproduce the behavior:

  1. Verify system is working with decimal gNodeB id in config.yml

tac: "0228BC" gnbid: "000009"

  1. Change gNodeB id to have one or more hex digits in config.yml

tac: "0228BC" gnbid: "00000A"

Expected behavior In case 1 (gNodeB with decimal digits), PacketRusher works fine. In case 2 (gNodeB with hex digits), PacketRusher crashes (but should not).

Screenshots

Successful case:

... INFO[0000] [GNB][AMF] List of AMF slices Supported by AMF -- sst:01 sd:was not informed INFO[0001] [TESTER] TESTING REGISTRATION USING IMSI 000000001 UE INFO[0001] [GNB] Received incoming connection from new UE INFO[0001] [UE] Initiating Registration INFO[0001] [UE] Switched from state 0 to state 1 INFO[0001] [GNB][SCTP] Receive message in 1 stream INFO[0001] [GNB][NGAP] Receive Downlink NAS Transport INFO[0001] [UE][NAS] Message without security header INFO[0001] [UE][NAS] Receive Authentication Request ...

Failure case:

... INFO[0000] [GNB][AMF] List of AMF slices Supported by AMF -- sst:01 sd:was not informed INFO[0001] [TESTER] TESTING REGISTRATION USING IMSI 000000001 UE panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0xa0 pc=0x7c7d53]

goroutine 19 [running]: my5G-RANTester/internal/control_test_engine/gnb/context.(*GNBContext).GetInboundChannel(...) /home/john/PacketRusher/internal/control_test_engine/gnb/context/context.go:134 my5G-RANTester/internal/common/tools.SimulateSingleUE.func2(0xc0000c0000, 0x0?) /home/john/PacketRusher/internal/common/tools/tools.go:131 +0xd3 created by my5G-RANTester/internal/common/tools.SimulateSingleUE in goroutine 1 /home/john/PacketRusher/internal/common/tools/tools.go:124 +0x31c ...

linouxis9 commented 7 months ago

Hi @rjaksa,

Thanks a lot for your heavy testing of PacketRusher and opening all these bugs! This issue has been fixed in the main branch.

Thanks again!

Cheers, Valentin