-
-
Notifications
You must be signed in to change notification settings - Fork 696
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
incorrect behavior of the SGsAP #3072
Comments
I've resolved this issue and applied it into the main branch. Please let me know if you have any other problems. Thanks a lot! |
Hi Sukchan, I'm seeing the MME crash after the changes. looks to be right after an SGS association. if you need anything more from me, logs, pcaps, please let me know. MME LOG: 03/24 17:18:16.239: [mme] INFO: InitialUEMessage (../src/mme/s1ap-handler.c:406) osmoMSC: OsmoMSC# <0014> sgs_iface.c:658 r=10.90.250.21:52353<->l=10.90.250.42:29118: Receiving SGsAP-LOCATION-UPDATE-REQUEST without TAI nor E-CGI IEs, fast fallback GERAN->EUTRAN won't be possible! |
Is this something you can reproduce quickly? If so, it's best to share your PCAP. Otherwise I recommend sharing a DEBUG message. You will need to change the log level to the DEBUG for MME, SGW-C, and SMF as below. diff --git a/configs/open5gs/mme.yaml.in b/configs/open5gs/mme.yaml.in
index 5acf05fdc..3706adbdf 100644
--- a/configs/open5gs/mme.yaml.in
+++ b/configs/open5gs/mme.yaml.in
@@ -1,6 +1,7 @@
logger:
file: @localstatedir@/log/open5gs/mme.log
# level: info # fatal|error|warn|info(default)|debug|trace
+ level: debug
global:
max: If you can fix it down to the source code, please recompile using the issues3072 branch and run mme.
Please let me know if you have any other questions. Thanks a lot! |
@acetcom |
when I build and run the MME from branch issues3072 I get this: 03/25 17:35:54.942: [esm] DEBUG: esm_state_inactive(): ENTRY |
Since first session have also multiple bearer, this assertion should be removed.
The issue was caused by adding a Flow for your first Session and enabling Multiple Bearer, which is possible, but Open5GS added an assertion routine in the wrong place. I've resolved this issue in the issues3072 branch, so if you experiment with it, please share your results. Thanks a lot! |
@acetcom I tested with your changes in the issues3072 branch. The MME is no longer crashing. Thank you so much for your help. |
In Attach Request, InitialContextSetupRequest should use only one bearer.
I've also fixed this issue in the issues3072 branch. Please let me know if you test it. Thanks a lot! |
@acetcom I tested with issues3072 branch "Open5GS v2.7.0-121-g03feb47" and the issue still persists. NAM set to PS+CS with the SGsAP disabled = no issue. thank you very much for your efforts in resolving this issue. |
Looking at the However, I don't understand why the UE is not sending The only difference between $ diff --git a/src/mme/emm-build.c b/src/mme/emm-build.c
index e4fb76c2c..4d614e301 100644
--- a/src/mme/emm-build.c
+++ b/src/mme/emm-build.c
@@ -211,15 +211,19 @@ ogs_pkbuf_t *emm_build_attach_accept(
ogs_assert(mme_ue->csmap);
ogs_assert(mme_ue->p_tmsi);
+#if 0
attach_accept->presencemask |=
OGS_NAS_EPS_ATTACH_ACCEPT_LOCATION_AREA_IDENTIFICATION_PRESENT;
+#endif
lai->nas_plmn_id = mme_ue->csmap->lai.nas_plmn_id;
lai->lac = mme_ue->csmap->lai.lac;
ogs_debug(" LAI[PLMN_ID:%06x,LAC:%d]",
ogs_plmn_id_hexdump(&lai->nas_plmn_id), lai->lac);
+#if 0
attach_accept->presencemask |=
OGS_NAS_EPS_ATTACH_ACCEPT_MS_IDENTITY_PRESENT;
+#endif
ms_identity->length = 5;
tmsi->spare = 0xf;
tmsi->odd_even = 0; I've put the above in the issues3072-disabled branch, could you please confirm that this branch is working properly? If it's working, then I guess we can just assume that's why UE doesn't behave like that when I do #if 0 ... #endif. Thank you so much for your effort. |
@acetcom I tested branch issues3072-disabled and have the same issue, UE will not attach with NAM PS+CS. Thank you so much, |
If you compare the two pcaps below, they are identical except for the generated IDs such like MME-UE-S1AP-ID, ENB-UE-S1AP-ID, PDU address, etc.
However, I don't understand why the UE is not sending Attach complete in 3072-5/mme-PS+CS-issues3072-disabled.pcap, is there anything different in the two test environments? I hope there is some small hint provided so I can figure it out. Thanks a lot! |
HI Sukchan, In all the PCAPs depicting unsuccessful attach attempts, I noticed that in the S1AP/NAS-EPS InitialContextSetupRequest messages, the value of the Procedure Transaction Identity field is consistently set to 0. Conversely, in all of the PCAPs capturing successful attach, this value is non-zero. While I'm unsure of its relevance, I wanted to bring this to your attention. |
You've found what the problem was with Open5GS MME. There was an issue with handling the PTI, which was incorrectly setting the PTI to 0 when using SGsAP because the Create Bearer Request handler was performed before the InitialContextSetupRequest. I have applied this issue to the issues3072 branch, please test again. Thank you so much for your effort. |
HI Sukchan, I tested using branch issues3072 v2.7.0-122-g287fca0 and the UE attach still fails with the NAM set to PS+CS. Thank you for all of your work on this issue. |
I fixed it again and pushed it to the issues3072 branch. I've experimented as much as I could and tried to fix this issue. Thank you in advance for your review. |
@acetcom I tested in many different scenarios, PS+CS, PS only, PS+CS without a valid HLR account, and with the SGsAP disabled. and I'm happy to report that everything is working as expected. Thank you so much for all of your valuable time spent on this issue. |
First of all, it crashes when creating a Dedicated Bearer on the default Session that is created for the first time. This behavior should be possible, so the related ASSERT is removed. Next, the InitialContextRequest is modified during the Attach Request to include the first Bearer. Finally, there was an issue where trying to create a Dedicated Bearer with SGsAP enabled resulted in an InitialContextSetupRequest message with a PTI of zero. This is because MME initializes the PTI to 0 upon receiving the Create Bearer Request while processing SGsAP. All of these issues has been fixed.
First of all, it crashes when creating a Dedicated Bearer on the default Session that is created for the first time. This behavior should be possible, so the related ASSERT is removed. Next, the InitialContextRequest is modified during the Attach Request to include the first Bearer. Finally, there was an issue where trying to create a Dedicated Bearer with SGsAP enabled resulted in an InitialContextSetupRequest message with a PTI of zero. This is because MME initializes the PTI to 0 upon receiving the Create Bearer Request while processing SGsAP. All of these issues has been fixed.
I've merged this branch into the main branch. Thank you so muich for raising this issue. |
Hello, I would like to address two interconnected issues concerning the behavior of the SGsAP:
According to ETSI TS 129 118 4.1, if the Network Access Mode (NAM) is set to "Packet only," no SGs association should be established.
In the attached PCAP file at packet 228 Subscription-Data AVP (Attribute-Value Pair) indicates that the Network-Access_mode is set to ONLY_PACKET
And in the attached mme.log you can see the UE fails to attach to the network following the WARNING: [SGSAP] LOCATION-UPDATE-REJECT Where the SGs association is attempted.
If the NAM is set to "Packet and Circuit," and the SGs association is rejected by the CS core, this rejection should only impact the SGs association itself and not result in a UE attach rejection for a UE with a valid HSS account.
sgsap-ps.zip
The text was updated successfully, but these errors were encountered: