UE Radio Capability Indication message size and Free5GC Core 3.2.1

Running Free5GC 3.2.1 10-7-2022
I have 2 Real UEs … UE1 connects with no issues while UE2 registers but fails to establish PDU
session and report security mode failure and free5gc logs reporting the error below over and over

PDUSessionResourceSetupResponseTransfer failed: Get bits overflow, requireBits: 8, leftBits: 5

Please note that the size of UERadioCapabilityIndication is below

Does the size of UE Radio Capability Indication causing UE 2 fial to establish PDU
Does Free5GC supports size upto 200K??
What can we update in FRee5GC to manage large size of UERadioCapabilityIndication…

UE 1 - 121 KB -------------> Android 10 - This UE registers and establishes PDU session
UE 2 - 210 KB -------------> Android 11 - This UE registers but unable to establish PDU session and goes into PDU setup establishment request and appears to go into RACH failure … Please note that it also reports UL_DCCH / Security Mode failure as well…


2022-10-10T19:15:41Z [INFO][AMF][NGAP][172.118.22.10:38412][AMF_UE_NGAP_ID:3] Handle Initial Context Setup Failure
2022-10-10T19:15:41Z [INFO][SMF][PduSess] Receive Update SM Context Request
2022-10-10T19:15:41Z [INFO][SMF][PduSess] In HandlePDUSessionSMContextUpdate
2022-10-10T19:15:41Z [ERRO][SMF][PduSess] Handle PDUSessionResourceSetupResponseTransfer failed: Get bits overflow, requireBits: 8, leftBits: 5


Thank you for your time and support

Hi @aavam1,

I think the error you got in "Handle PDUSessionResourceSetupResponseTransfer failed " was caused by UnmarshalWithParams failed.
Could you provide the whole log and pcap files in this situation to help with debuging?

Brs,
SymbolWu

Thank you for your reply… I believe we are on the right track… I have doing testing with Real UE/radio and the most common Erros are as below… I am also attaching logs and pcap as you have suggested… Thank you again much for your time and taking a look into… much appreciated.

Issue 1: NgKSI Already in Use
Issue 2: Security Mode Failure
Issue 3: Handle Initial Context Setup Failure
issue 4: PDUSessionResourceSetupResponseTransfer failedOCt-13-2022.zip (2.1 MB) .

OCt-13-2022.zip (3.5 MB)

attaching logs with debug enabled… Thank you

Hi @aavam1,
Based on the pcap file you provided, it seems that problems you encountered are different.
I will clarify the issues based on the file named test1-10-13-22.pcap.

Issue 1: NgKSI Already in Use
It’s not a problem in my opinion. Because when the ngKSI is already in use, there will be another authentication request with another ngKSI. You can see the Authentication response in pcap file.

The process of authentication, registration, and pdu session establishment appears to be normal.

But I saw a problem about InitialContextSetupFailure which caused by “Failure in the radio interface procedure”.
According to the spec TS 38.413, that means radio interface procedure failed.


After that, ran send the UEContextTeleaseRequest to 5GC,so the UE can’t establish the PDU Session successfully.

The type of PDU session establishment request from UE is ipv4v6, but the PDU session establishment accept response is IPv4 only allowed and 5GC doesn’t provide the IPv6 address to UE. This might be the reason which cause your UE/RAN error.

@aavam1,
Could you try to set PDU Session request type of UE as IPv4?

First … Thank you so much SymbolWu for your time and looking into the issue and providing a detailed reply…Thank you …I can only control under the APN settings in UE to define APN connection type / protocol to be IPV4 or ipv6 or both ie i dont think and i will check for any possibility to make any change on the ue side to force UE to request only IPv4…Please also suggest any UE that can be customized to a level where we can force to only request ipv4…Having said 5GC is only configured to use IPV4 and have IPV4 address pool defined for UEs…In my opinion commercial UE may request IPV4/V6 address from core and based on settings from core side it can either provide v4 or v6 per its configuration…is that a bug on 5GC side in tacking such request where UE is IPV4/v6 … is 5GC will provide ipv6 support at some point?.. Thank you

Hi… I have tried with UPDU Session request type of UE as IPV4 and still no pdu session establishment …logs attached…still seeing below… Thank you
time=“2022-10-18T21:18:20Z” level=error msg=“Handle PDUSessionResourceSetupResponseTransfer failed: Get bits overflow, requireBits: 8, leftBits: 5” category=PduSess component=SMFipv4-test.zip (710.8 KB)

Hi @aavam1,
Sorry for confusing you.
I just want to clarify the problem you met.
In the pcap file you provided, there is PDU session establishment accept and a request of “InitialContextSetup”.
SMF admit the PDU session establishment and reply the IPv4 address 10.60.0.1 .
image

But your UE response the “InitialContextSetupFailure” and send the UEContextReleaseRequest.
After that 5GC get the error message about “Handle PDUSessionResourceSetupResponseTransfer failed” right?

I think that means your UE/RAN may have some error when processing the “InitialContextSetupRequest”.

Thank you again SymbolWu…Well… If i run the same UE plus few others UE and CPEs against same RAN but with different Core then there are no issues with registration and PDU session establishment…Also the HTC Desire UE works great with same RAN and 5GC … Any other UE or CPE has this pdusession establishment issues and the error below…

PDUSessionResourceSetupResponseTransfer failed: Get bits overflow, requireBits: 8, leftBits: 5” category=PduSess component=SMF
Point is if the problem is with UE and RAN side then i should see same problem when i connect with another 5G SA core…Also HTC Desire should also exhibit same behavior but it registers and establishes PDU session successfully…I think perhaps we are missing something maybe from teh core side…I will continue to investigate …Please suggest / advise… Thank you

Hi @aavam1,

How about comparing the pacp file with different 5GC to find the issue?

Hello SymbolWu,
Thank you for your reply…much appreciated…
Please find attached files with some compares…i still believe the issues lies with 5GC unable to keep connection with gNB and or Security command message processing …I mean how can we explain the error below

Handle PDUSessionResourceSetupResponseTransfer failed: Get bits overflow, requireBits: 8, leftBits: 5
The above error is consistent with UEs that are failing …For UE that are working fine we dont see these errors… Please do suggest and advise…Thank you again so much for your time and support…much appreciated …
Oct-20-22.zip (699.2 KB)

Do we need unique OPc for each subscriber … I am using same Ki and OPc for all subscribers …Could that be an issue… Thank you

Hi @aavam1,
Could you provide the packet that successfully established the connection when you used other 5GCs.
I want to compare the content of packets between normal situation and error situation.

Hello SymbolWu…Thank you for your response…Please find attach UE success against another 5GC…Thank you…working-ue-other-core.pcap (15.5 KB)

Hello SymbolWu… I have conducted another test and fully convinced that it could be some unmarshaling issues with 5GC…I have 2 UE … i can register and establish PDU when single UE connects …single ue remains active until it goes into a loop and starts to give duplicate is error… But when i connect both UEs at the same time then it registers and establishes PDU but then start to give the error below…I am also attaching pcap and logs…Free5GC have definite issues with Real UEs ie sometime it could be heavy UE Capability and in other cases it is not clearing up memory of various functions or unable to pass values b/w functions…It may work with URASIM or simulator but with real UEs there are definite issues…Please Please Please help if you can or find resources that can help…I would really really appreciate…Thank you again so much for your time and continued support…

2 UE- Oct-26-22.zip (376.5 KB)

2022-10-26T19:55:21Z [INFO][AMF][NGAP][192.168.62.107:38412][AMF_UE_NGAP_ID:19] Handle Initial Context Setup Failure
2022-10-26T19:55:21Z [INFO][SMF][PduSess] Receive Update SM Context Request
2022-10-26T19:55:21Z [INFO][SMF][PduSess] In HandlePDUSessionSMContextUpdate
2022-10-26T19:55:21Z [ERRO][SMF][PduSess] Handle PDUSessionResourceSetupResponseTransfer failed: Get bits overflow, requireBits: 8, leftBits: 5
2022-10-26T19:55:21Z [WARN][SMF][PduSess] SM Context State [Active] shouldn’t be here

2022-10-26T19:55:08Z [INFO][AMF][NGAP][192.168.62.107:38412][AMF_UE_NGAP_ID:18] Send PDU Session Resource Setup Request
2022-10-26T19:55:08Z [INFO][AMF][NGAP][192.168.62.107:38412] Handle Error Indication: RAN_UE_NGAP_ID:&{36643} AMF_UE_NGAP_ID:
2022-10-26T19:55:08Z [WARN][AMF][NGAP][192.168.62.107:38412] Cause RadioNetwork[14]
2022-10-26T19:55:11Z [INFO][LIB][PFCP] Remove Request Transaction [8]
2022-10-26T19:55:13Z [INFO][AMF][NGAP][192.168.62.107:38412] Handle NG Reset
2022-10-26T19:55:13Z [WARN][AMF][NGAP][192.168.62.107:38412] Cause Misc[5]
2022-10-26T19:55:13Z [INFO][AMF][NGAP][192.168.62.107:38412] Send NG Reset Acknowledge

Hi @aavam1,

So in the environment you set, free5GC can register and establish a PDU session normally with one UE ,and the UE can transport packets normally.
But there will be some errors after this?
What kind of loop error is it?

In the packets you provided to connect to other 5GCs, it seems that there were no 2 UEs to connect, could you provide the packet files with connecting both UEs at the same time in the same situation which free5GC output the error messages?

If possible, please provide all your environmental information, including UE model and RAN manufacturer.
Thanks.

Sounds good…Let me provide you the requested details by Oct 31…Thank you

1UE-Long-run-3-test.zip (103.5 KB) 1UE-Long-run-a.zip (3.0 MB) Pleaser find two test cases where i UE drops PDU session after few minutes and 2 UE drops pdu after few minutes as well… I am using HTC Desire 21 Pro UEs and have E/// baseband 6630 and Band 78 Radio… 2UE-test.zip (2.3 MB) Thank you
[Uploading: 1UE-Long-run.zip…]
()

Below are the 3 common Erros … 5GC unable to hold session for single Real UE or 2 UEs…5GC Core is not stable when real UEs and gNB connects to it…

Error 1:
[INFO][AMF][NGAP][192.168.62.107:38412] Handle Error Indication: RAN_UE_NGAP_ID:&{36917} AMF_UE_NGAP_ID:

Error 2:
INFO][UPF][Pfcp][127.0.0.8:8805] handleSessionReportResponse
2022-10-31T23:33:49Z [ERRO][UPF][Pfcp][127.0.0.8:8805] Sess: sess not found (lSeid:0x3)
2022-10-31T23:33:49Z [INFO][UPF][Pfcp][127.0.0.8:8805] ServeDLDReport
2022-10-31T23:33:49Z [INFO][UPF][Pfcp][127.0.0.8:8805] handleSessionReportResponse
2022-10-31T23:33:49Z [ERRO][UPF][Pfcp][127.0.0.8:8805] Sess: sess not found (lSeid:0x3)
2022-10-31T23:33:49Z [INFO][UPF][Pfcp][127.0.0.8:8805] ServeDLDReport
2022-10-31T23:33:49Z [INFO][UPF][Pfcp][127.0.0.8:8805] handleSessionReportResponse
2022-10-31T23:33:49Z [ERRO][UPF][Pfcp][127.0.0.8:8805] Sess: sess not found (lSeid:0x3)

Error 3:
time=“2022-10-31T17:51:36Z” level=error msg=“Handle PDUSessionResourceSetupResponseTransfer failed: Get bits overflow, requireBits: 8, leftBits: 5” category=PduSess component=SMF