Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash while running custom scenario #131

Open
himanshu3 opened this issue Jul 4, 2024 · 2 comments
Open

Crash while running custom scenario #131

himanshu3 opened this issue Jul 4, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@himanshu3
Copy link

I built PacketRusher and was able to test free5GC successfully but while trying custom scenario (without making any modification to scenarios/sample/sample.go) it crashes. Following are the steps:

  1. build custom scenario wasm using scenarios/build.sh
  2. from $PACKET_RUSHER_HOME execute:
    sudo ./packetrusher custom-scenario --scenario ./scenarios/sample.go.wasm

Following are the logs:
INFO[0000] Selecting 10.73.73.150 for host 10.73.73.150 as AMF's IP address
INFO[0000] Selecting 10.71.71.113 for host 10.71.71.113 as gNodeB's N3/Data IP address
INFO[0000] Selecting 10.71.71.113 for host 10.71.71.113 as gNodeB's N2/Control IP address
INFO[0000] Loaded config at: /home/user1/code/PacketRusher/config/config.yml
INFO[0000] [GNB] SCTP/NGAP service is running
INFO[0000] [GNB] Initiating NG Setup Request
INFO[0000] [GNB][SCTP] Receive message in 0 stream
INFO[0000] [GNB][NGAP] Receive NG Setup Response
INFO[0000] [GNB][AMF] AMF Name: AMF
INFO[0000] [GNB][AMF] State of AMF: Active
INFO[0000] [GNB][AMF] Capacity of AMF: 255
INFO[0000] [GNB][AMF] PLMNs Identities Supported by AMF -- mcc: 315 mnc:010
INFO[0000] [GNB][AMF] List of AMF slices Supported by AMF -- sst:01 sd:010203
INFO[0000] [GNB][AMF] List of AMF slices Supported by AMF -- sst:01 sd:112233
INFO[0001] [GNB] Received incoming connection from new UE
INFO[0001] [GNB] UE MCC: 315 MNC: 010
FATA[0001] func[env.pduSessionRequest] param[1] is unsupported: uint8

I even tried changing argument type of pduSessionRequest in scenarios/sample/sample.go

  1. from func pduSessionRequest(uint32, uint32) to func pduSessionRequest(uint32, uint8)
  2. for pduSessionId:=uint8(1); pduSessionId<2; pduSessionId++ {
    fmt.Println("Hi, I'm an UE that wants to request PDU Session id: ", pduSessionId)
    pduSessionRequest(ueId, pduSessionId)
    }

but again same result.

I am not sure, if I am missing something here or is it a bug?

  • OS: Ubuntu 20.04 [5.15.0-92-generic]
  • Commit Id: 2bbcc24
@himanshu3 himanshu3 added the bug Something isn't working label Jul 4, 2024
@linouxis9
Copy link
Member

Hi @himanshu3,

Thanks a lot for testing the custom scenario WebAssembly feature!
The project has evolved quite a lot since I've started working on this feature and I had not the time to work on it, it's very likely it has not kept with the latest changes.
While I fix this bug, I would recommend you to write your custom scenario by editing the PacketRusher's main scenario directly in PacketRusher's Go source here:

func SimulateSingleUE(simConfig UESimulationConfig, wg *sync.WaitGroup) {

I hope it helps!

Cheers,
Valentin

@himanshu3
Copy link
Author

Thanks for pointing to PacketRusher/internal/common/tools/tools.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants