On latest v3.05, PDU session fails with 'has no pre-config route', referred to previous similar post, no luck

My config of IP:

N3 (up):
gnb: 192.168.5.72
UPF: 192.168.5.60

attached are my cfg files.

smfcfg.yaml (4.0 KB) uerouting.yaml (1.7 KB) upfcfg.yaml (929 Bytes)

log as below (error messages hightlighted)

andrew@andrew-SYS-E200-8D:~/free5gc/bin$ 2021-01-31T19:20:54-08:00 [INFO][AMF][NGAP] [AMF] SCTP Accept from: 192.168.5.72:38412
2021-01-31T19:20:54-08:00 [INFO][AMF][NGAP] Create a new NG connection for: 192.168.5.72:38412
2021-01-31T19:20:54-08:00 [INFO][AMF][NGAP][192.168.5.72:38412] Handle NG Setup request
2021-01-31T19:20:54-08:00 [INFO][AMF][NGAP][192.168.5.72:38412] Send NG-Setup response
2021-01-31T19:20:54-08:00 [INFO][AMF][NGAP][192.168.5.72:38412] Handle Initial UE Message
2021-01-31T19:20:54-08:00 [INFO][AMF][GMM][AMF_UE_NGAP_ID:1] Handle Registration Request
2021-01-31T19:20:54-08:00 [INFO][AMF][GMM][AMF_UE_NGAP_ID:1] Authentication procedure
2021-01-31T19:20:54-08:00 [INFO][NRF][DSCV] Handle NFDiscoveryRequest
2021-01-31T19:20:54-08:00 [INFO][NRF][GIN] | 200 | 127.0.0.1 | GET | /nnrf-disc/v1/nf-instances?requester-nf-type=AMF&target-nf-type=AUSF |
2021-01-31T19:20:54-08:00 [INFO][AUSF][UeAuthPost] HandleUeAuthPostRequest
2021-01-31T19:20:54-08:00 [INFO][AUSF][UeAuthPost] Serving network authorized
2021-01-31T19:20:54-08:00 [INFO][NRF][DSCV] Handle NFDiscoveryRequest
2021-01-31T19:20:54-08:00 [INFO][NRF][GIN] | 200 | 127.0.0.1 | GET | /nnrf-disc/v1/nf-instances?requester-nf-type=AUSF&service-names=nudm-ueau&target-nf-type=UDM |
2021-01-31T19:20:54-08:00 [INFO][UDM][UEAU] Handle GenerateAuthDataRequest
2021-01-31T19:20:54-08:00 [INFO][LIB][3GPP] suciPart [suci 0 208 93 1234 0 0 0000000003]
2021-01-31T19:20:54-08:00 [INFO][LIB][3GPP] scheme 0
2021-01-31T19:20:54-08:00 [INFO][LIB][3GPP] SUPI type is IMSI
http://127.0.0.10:8000
2021-01-31T19:20:54-08:00 [INFO][NRF][DSCV] Handle NFDiscoveryRequest
2021-01-31T19:20:54-08:00 [INFO][NRF][GIN] | 200 | 127.0.0.1 | GET | /nnrf-disc/v1/nf-instances?requester-nf-type=UDM&target-nf-type=UDR |
2021-01-31T19:20:54-08:00 [INFO][UDR][DRepo] Handle QueryAuthSubsData
2021-01-31T19:20:54-08:00 [INFO][UDR][GIN] | 200 | 127.0.0.1 | GET | /nudr-dr/v1/subscription-data/imsi-208930000000003/authentication-data/authentication-subscription |
2021-01-31T19:20:54-08:00 [INFO][UDR][DRepo] Handle ModifyAuthentication
2021-01-31T19:20:54-08:00 [INFO][UDR][GIN] | 204 | 127.0.0.1 | PATCH | /nudr-dr/v1/subscription-data/imsi-208930000000003/authentication-data/authentication-subscription |
AUTN = 149194d8e53380009d4d9bca6d16deb6
2021-01-31T19:20:54-08:00 [INFO][UDM][GIN] | 200 | 127.0.0.1 | POST | /nudm-ueau/v1/suci-0-208-93-1234-0-0-0000000003/security-information/generate-auth-data |
2021-01-31T19:20:54-08:00 [INFO][AUSF][UeAuthPost] Add SuciSupiPair (suci-0-208-93-1234-0-0-0000000003, imsi-208930000000003) to map.
2021-01-31T19:20:54-08:00 [INFO][AUSF][UeAuthPost] Use 5G AKA auth method
2021-01-31T19:20:54-08:00 [INFO][AUSF][5gAkaAuth] XresStar = 6131653038316666316366626438363934663336366666666330363834356439
2021-01-31T19:20:54-08:00 [INFO][AUSF][GIN] | 201 | 127.0.0.1 | POST | /nausf-auth/v1/ue-authentications |
2021-01-31T19:20:54-08:00 [INFO][AMF][GMM][AMF_UE_NGAP_ID:1] Send Authentication Request
2021-01-31T19:20:54-08:00 [INFO][AMF][NGAP][192.168.5.72:38412][AMF_UE_NGAP_ID:1] Send Downlink Nas Transport
2021-01-31T19:20:54-08:00 [INFO][AMF][NGAP][192.168.5.72:38412] Handle Uplink Nas Transport
2021-01-31T19:20:54-08:00 [INFO][AMF][NGAP][192.168.5.72:38412][AMF_UE_NGAP_ID:1] Uplink NAS Transport (RAN UE NGAP ID: 0)
2021-01-31T19:20:54-08:00 [INFO][AMF][GMM][AMF_UE_NGAP_ID:1] Handle Authentication Response
2021-01-31T19:20:54-08:00 [INFO][AUSF][5gAkaAuth] Auth5gAkaComfirmRequest
2021-01-31T19:20:54-08:00 [INFO][AUSF][5gAkaAuth] res*: 6131653038316666316366626438363934663336366666666330363834356439
Xres*: 6131653038316666316366626438363934663336366666666330363834356439
2021-01-31T19:20:54-08:00 [INFO][AUSF][5gAkaAuth] 5G AKA confirmation succeeded
2021-01-31T19:20:54-08:00 [INFO][UDM][UEAU] Handle ConfirmAuthDataRequest
2021-01-31T19:20:54-08:00 [INFO][UDR][DRepo] Handle CreateAuthenticationStatus
2021-01-31T19:20:54-08:00 [INFO][UDR][GIN] | 204 | 127.0.0.1 | PUT | /nudr-dr/v1/subscription-data/imsi-208930000000003/authentication-data/authentication-status |
2021-01-31T19:20:54-08:00 [INFO][UDM][GIN] | 201 | 127.0.0.1 | POST | /nudm-ueau/v1/imsi-208930000000003/auth-events |
2021-01-31T19:20:54-08:00 [INFO][AUSF][GIN] | 200 | 127.0.0.1 | PUT | /nausf-auth/v1/ue-authentications/suci-0-208-93-1234-0-0-0000000003/5g-aka-confirmation |
2021-01-31T19:20:54-08:00 [INFO][AMF][GMM][AMF_UE_NGAP_ID:1][SUPI:imsi-208930000000003] Send Security Mode Command
2021-01-31T19:20:54-08:00 [INFO][AMF][NGAP][192.168.5.72:38412][AMF_UE_NGAP_ID:1] Send Downlink Nas Transport
2021-01-31T19:20:54-08:00 [INFO][AMF][NGAP][192.168.5.72:38412] Handle Uplink Nas Transport
2021-01-31T19:20:54-08:00 [INFO][AMF][NGAP][192.168.5.72:38412][AMF_UE_NGAP_ID:1] Uplink NAS Transport (RAN UE NGAP ID: 0)
2021-01-31T19:20:54-08:00 [INFO][AMF][GMM][AMF_UE_NGAP_ID:1][SUPI:imsi-208930000000003] Handle Security Mode Complete
2021-01-31T19:20:54-08:00 [INFO][AMF][GMM][AMF_UE_NGAP_ID:1][SUPI:imsi-208930000000003] Handle InitialRegistration
2021-01-31T19:20:54-08:00 [INFO][NRF][DSCV] Handle NFDiscoveryRequest
2021-01-31T19:20:54-08:00 [INFO][NRF][GIN] | 200 | 127.0.0.1 | GET | /nnrf-disc/v1/nf-instances?requester-nf-type=AMF&supi=imsi-208930000000003&target-nf-type=UDM |
2021-01-31T19:20:54-08:00 [INFO][UDM][SDM] Handle GetNssai
2021-01-31T19:20:54-08:00 [INFO][UDR][DRepo] Handle QueryAmData
2021-01-31T19:20:54-08:00 [INFO][UDR][GIN] | 200 | 127.0.0.1 | GET | /nudr-dr/v1/subscription-data/imsi-208930000000003/20893/provisioned-data/am-data?supported-features= |
2021-01-31T19:20:54-08:00 [INFO][UDM][GIN] | 200 | 127.0.0.1 | GET | /nudm-sdm/v1/imsi-208930000000003/nssai?plmn-id=20893 |
2021-01-31T19:20:54-08:00 [INFO][NRF][DSCV] Handle NFDiscoveryRequest
2021-01-31T19:20:54-08:00 [INFO][NRF][GIN] | 200 | 127.0.0.1 | GET | /nnrf-disc/v1/nf-instances?requester-nf-type=AMF&supi=imsi-208930000000003&target-nf-type=UDM |
2021-01-31T19:20:54-08:00 [INFO][UDM][UECM] Handle RegistrationAmf3gppAccess
2021-01-31T19:20:54-08:00 [INFO][UDM][UECM] UEID: imsi-208930000000003
http://127.0.0.10:8000
2021-01-31T19:20:54-08:00 [INFO][NRF][DSCV] Handle NFDiscoveryRequest
2021-01-31T19:20:54-08:00 [INFO][NRF][GIN] | 200 | 127.0.0.1 | GET | /nnrf-disc/v1/nf-instances?requester-nf-type=UDM&target-nf-type=UDR |
2021-01-31T19:20:54-08:00 [INFO][UDR][DRepo] Handle CreateAmfContext3gpp
2021-01-31T19:20:54-08:00 [INFO][UDR][GIN] | 204 | 127.0.0.1 | PUT | /nudr-dr/v1/subscription-data/imsi-208930000000003/context-data/amf-3gpp-access |
2021-01-31T19:20:54-08:00 [INFO][UDM][GIN] | 201 | 127.0.0.1 | PUT | /nudm-uecm/v1/imsi-208930000000003/registrations/amf-3gpp-access |
2021-01-31T19:20:54-08:00 [INFO][UDM][SDM] Handle GetAmData
2021-01-31T19:20:54-08:00 [INFO][UDR][DRepo] Handle QueryAmData
2021-01-31T19:20:54-08:00 [INFO][UDR][GIN] | 200 | 127.0.0.1 | GET | /nudr-dr/v1/subscription-data/imsi-208930000000003/20893/provisioned-data/am-data?supported-features=20893 |
2021-01-31T19:20:54-08:00 [INFO][UDM][GIN] | 200 | 127.0.0.1 | GET | /nudm-sdm/v1/imsi-208930000000003/am-data?plmn-id=20893 |
2021-01-31T19:20:54-08:00 [INFO][UDM][SDM] Handle GetSmfSelectData
http://127.0.0.10:8000
2021-01-31T19:20:54-08:00 [INFO][NRF][DSCV] Handle NFDiscoveryRequest
2021-01-31T19:20:54-08:00 [INFO][NRF][GIN] | 200 | 127.0.0.1 | GET | /nnrf-disc/v1/nf-instances?requester-nf-type=UDM&target-nf-type=UDR |
2021-01-31T19:20:54-08:00 [INFO][UDR][DRepo] Handle QuerySmfSelectData
2021-01-31T19:20:54-08:00 [INFO][UDR][GIN] | 200 | 127.0.0.1 | GET | /nudr-dr/v1/subscription-data/imsi-208930000000003/20893/provisioned-data/smf-selection-subscription-data?supported-features= |
2021-01-31T19:20:54-08:00 [INFO][UDM][GIN] | 200 | 127.0.0.1 | GET | /nudm-sdm/v1/imsi-208930000000003/smf-select-data?plmn-id=20893 |
2021-01-31T19:20:54-08:00 [INFO][UDM][SDM] Handle GetUeContextInSmfData
http://127.0.0.10:8000
2021-01-31T19:20:54-08:00 [INFO][NRF][DSCV] Handle NFDiscoveryRequest
2021-01-31T19:20:54-08:00 [INFO][NRF][GIN] | 200 | 127.0.0.1 | GET | /nnrf-disc/v1/nf-instances?requester-nf-type=UDM&target-nf-type=UDR |
2021-01-31T19:20:54-08:00 [INFO][UDR][DRepo] Handle QuerySmfRegList
2021-01-31T19:20:54-08:00 [INFO][UDR][GIN] | 200 | 127.0.0.1 | GET | /nudr-dr/v1/subscription-data/imsi-208930000000003/context-data/smf-registrations?supported-features= |
2021-01-31T19:20:54-08:00 [INFO][UDM][GIN] | 200 | 127.0.0.1 | GET | /nudm-sdm/v1/imsi-208930000000003/ue-context-in-smf-data |
2021-01-31T19:20:54-08:00 [INFO][UDM][SDM] Handle Subscribe
http://127.0.0.10:8000
2021-01-31T19:20:54-08:00 [INFO][NRF][DSCV] Handle NFDiscoveryRequest
2021-01-31T19:20:54-08:00 [INFO][NRF][GIN] | 200 | 127.0.0.1 | GET | /nnrf-disc/v1/nf-instances?requester-nf-type=UDM&target-nf-type=UDR |
2021-01-31T19:20:54-08:00 [INFO][UDR][DRepo] Handle CreateSdmSubscriptions
2021-01-31T19:20:54-08:00 [INFO][UDR][GIN] | 201 | 127.0.0.1 | POST | /nudr-dr/v1/subscription-data/imsi-208930000000003/context-data/sdm-subscriptions |
2021-01-31T19:20:54-08:00 [INFO][UDM][GIN] | 201 | 127.0.0.1 | POST | /nudm-sdm/v1/imsi-208930000000003/sdm-subscriptions |
2021-01-31T19:20:54-08:00 [INFO][NRF][DSCV] Handle NFDiscoveryRequest
2021-01-31T19:20:54-08:00 [INFO][NRF][GIN] | 200 | 127.0.0.1 | GET | /nnrf-disc/v1/nf-instances?requester-nf-type=AMF&supi=imsi-208930000000003&target-nf-type=PCF |
2021-01-31T19:20:54-08:00 [INFO][PCF][Ampolicy] Handle AM Policy Create Request
2021-01-31T19:20:54-08:00 [INFO][UDR][DRepo] Handle PolicyDataUesUeIdAmDataGet
2021-01-31T19:20:54-08:00 [INFO][UDR][GIN] | 200 | 127.0.0.1 | GET | /nudr-dr/v1/policy-data/ues/imsi-208930000000003/am-data |
2021-01-31T19:20:54-08:00 [INFO][PCF][GIN] | 201 | 127.0.0.1 | POST | /npcf-am-policy-control/v1/policies |
2021-01-31T19:20:54-08:00 [INFO][AMF][GMM][AMF_UE_NGAP_ID:1][SUPI:imsi-208930000000003] Send Registration Accept
2021-01-31T19:20:54-08:00 [INFO][AMF][NGAP][192.168.5.72:38412][AMF_UE_NGAP_ID:1] Send Initial Context Setup Request
2021-01-31T19:20:54-08:00 [INFO][AMF][NGAP][192.168.5.72:38412] Handle Initial Context Setup Response
2021-01-31T19:20:55-08:00 [INFO][AMF][NGAP][192.168.5.72:38412] Handle Uplink Nas Transport
2021-01-31T19:20:55-08:00 [INFO][AMF][NGAP][192.168.5.72:38412][AMF_UE_NGAP_ID:1] Uplink NAS Transport (RAN UE NGAP ID: 0)
2021-01-31T19:20:55-08:00 [INFO][AMF][GMM][AMF_UE_NGAP_ID:1][SUPI:imsi-208930000000003] Handle Registration Complete
2021-01-31T19:20:58-08:00 [INFO][AMF][NGAP][192.168.5.72:38412] Handle Uplink Nas Transport
2021-01-31T19:20:58-08:00 [INFO][AMF][NGAP][192.168.5.72:38412][AMF_UE_NGAP_ID:1] Uplink NAS Transport (RAN UE NGAP ID: 0)
2021-01-31T19:20:58-08:00 [INFO][AMF][GMM][AMF_UE_NGAP_ID:1][SUPI:imsi-208930000000003] Handle UL NAS Transport
2021-01-31T19:20:58-08:00 [INFO][AMF][GMM][AMF_UE_NGAP_ID:1][SUPI:imsi-208930000000003] Transport 5GSM Message to SMF
2021-01-31T19:20:58-08:00 [INFO][AMF][GMM][AMF_UE_NGAP_ID:1][SUPI:imsi-208930000000003] Select SMF [snssai: {Sst:1 Sd:010203}, dnn: internet]
2021-01-31T19:20:58-08:00 [INFO][NRF][DSCV] Handle NFDiscoveryRequest
2021-01-31T19:20:58-08:00 [INFO][NRF][GIN] | 200 | 127.0.0.1 | GET | /nnrf-disc/v1/nf-instances?requester-nf-type=AMF&target-nf-type=NSSF |
2021-01-31T19:20:58-08:00 [INFO][NSSF][NsSelect] Handle NSSelectionGet
2021-01-31T19:20:58-08:00 [INFO][NSSF][GIN] | 200 | 127.0.0.1 | GET | /nnssf-nsselection/v1/network-slice-information?nf-id=e838b3cd-b09f-4013-bced-8c8834f9e0db&nf-type=AMF&slice-info-request-for-pdu-session=%7B%22sNssai%22%3A%7B%22sst%22%3A1%2C%22sd%22%3A%22010203%22%7D%2C%22roamingIndication%22%3A%22NON_ROAMING%22%7D |
2021-01-31T19:20:58-08:00 [INFO][NRF][DSCV] Handle NFDiscoveryRequest
2021-01-31T19:20:58-08:00 [INFO][NRF][GIN] | 200 | 127.0.0.1 | GET | /nnrf-disc/v1/nf-instances?dnn=internet&requester-nf-type=AMF&service-names=nsmf-pdusession&snssais=%7B%22sst%22%3A1%2C%22sd%22%3A%22010203%22%7D&target-nf-type=SMF&target-plmn-list=%7B%22mcc%22%3A%22208%22%2C%22mnc%22%3A%2293%22%7D |
2021-01-31T19:20:58-08:00 [INFO][SMF][PduSess] Recieve Create SM Context Request
2021-01-31T19:20:58-08:00 [INFO][SMF][PduSess] In HandlePDUSessionSMContextCreate
2021-01-31T19:20:58-08:00 [INFO][NRF][DSCV] Handle NFDiscoveryRequest
2021-01-31T19:20:58-08:00 [INFO][NRF][GIN] | 200 | 127.0.0.1 | GET | /nnrf-disc/v1/nf-instances?requester-nf-type=SMF&target-nf-type=UDM |
2021-01-31T19:20:58-08:00 [INFO][SMF][PduSess] Send NF Discovery Serving UDM Successfully
2021-01-31T19:20:58-08:00 [INFO][UDM][SDM] Handle GetSmData
2021-01-31T19:20:58-08:00 [INFO][UDM][SDM] getSmDataProcedure: SUPI[imsi-208930000000003] PLMNID[20893] DNN[internet] SNssai[{“sst”:1,“sd”:“010203”}]
2021-01-31T19:20:58-08:00 [INFO][UDR][DRepo] Handle QuerySmData
2021-01-31T19:20:58-08:00 [INFO][UDR][GIN] | 200 | 127.0.0.1 | GET | /nudr-dr/v1/subscription-data/imsi-208930000000003/20893/provisioned-data/sm-data?single-nssai=%7B%22sst%22%3A1%2C%22sd%22%3A%22010203%22%7D |
2021-01-31T19:20:58-08:00 [INFO][UDM][GIN] | 200 | 127.0.0.1 | GET | /nudm-sdm/v1/imsi-208930000000003/sm-data?dnn=internet&plmn-id=20893&single-nssai=%7B%22sst%22%3A1%2C%22sd%22%3A%22010203%22%7D |
2021-01-31T19:20:58-08:00 [INFO][SMF][GSM] In HandlePDUSessionEstablishmentRequest
2021-01-31T19:20:58-08:00 [INFO][SMF][PduSess] PCF Selection for SMContext SUPI[imsi-208930000000003] PDUSessionID[1]
2021-01-31T19:20:58-08:00 [INFO][NRF][DSCV] Handle NFDiscoveryRequest
2021-01-31T19:20:58-08:00 [INFO][NRF][GIN] | 200 | 127.0.0.1 | GET | /nnrf-disc/v1/nf-instances?requester-nf-type=SMF&target-nf-type=PCF |
2021-01-31T19:20:58-08:00 [INFO][PCF][SMpolicy] Handle CreateSmPolicy
2021-01-31T19:20:58-08:00 [INFO][PCF][GIN] | 201 | 127.0.0.1 | POST | /npcf-smpolicycontrol/v1/sm-policies |
2021-01-31T19:20:58-08:00 [INFO][SMF][PduSess] SUPI[imsi-208930000000003] has no pre-config route
2021-01-31T19:20:58-08:00 [ERRO][SMF][CTX] ActivateTunnelAndPDR failed not matched ip address
2021-01-31T19:20:58-08:00 [INFO][NRF][DSCV] Handle NFDiscoveryRequest
2021-01-31T19:20:58-08:00 [INFO][NRF][GIN] | 200 | 127.0.0.1 | GET | /nnrf-disc/v1/nf-instances?requester-nf-type=SMF&target-nf-instance-id=e838b3cd-b09f-4013-bced-8c8834f9e0db&target-nf-type=AMF |
2021-01-31T19:20:58-08:00 [INFO][SMF][Consumer] SendNFDiscoveryServingAMF ok
2021-01-31T19:20:58-08:00 [INFO][SMF][GIN] | 201 | 127.0.0.1 | POST | /nsmf-pdusession/v1/sm-contexts |
2021-01-31T19:20:58-08:00 [INFO][AMF][GMM][AMF_UE_NGAP_ID:1][SUPI:imsi-208930000000003] create smContext[pduSessionID: 1] Success
2021-01-31T19:21:08-08:00 [INFO][AMF][NGAP][192.168.5.72:38412] Handle PDU Session Resource Setup Response
2021-01-31T19:21:08-08:00 [ERRO][AMF][NGAP][192.168.5.72:38412][AMF_UE_NGAP_ID:1] SmContext[PDU Session ID:0] not found
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa43ffb]

goroutine 6 [running]:
github.com/free5gc/amf/context.(*SmContext).SmfUri(0x0, 0x0, 0x0)
/home/andrew/free5gc/NFs/amf/context/sm_context.go:148 +0x3b
github.com/free5gc/amf/consumer.SendUpdateSmContextRequest(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, …)
/home/andrew/free5gc/NFs/amf/consumer/sm_context.go:402 +0x108
github.com/free5gc/amf/consumer.SendUpdateSmContextN2Info(0xc0000d0100, 0x0, 0xe3a392, 0x11, 0xc000225468, 0x8, 0x8, 0xc0000f0460, 0x5555555555555555, 0x0, …)
/home/andrew/free5gc/NFs/amf/consumer/sm_context.go:256 +0x140
github.com/free5gc/amf/ngap.HandlePDUSessionResourceSetupResponse(0xc000400a80, 0xc0005246a0)
/home/andrew/free5gc/NFs/amf/ngap/handler.go:1089 +0x89e
github.com/free5gc/amf/ngap.Dispatch(0xfaa880, 0xc00001e1c0, 0xc000320000, 0x23, 0x2000)
/home/andrew/free5gc/NFs/amf/ngap/dispatcher.go:115 +0x7e3
github.com/free5gc/amf/ngap/service.handleConnection(0xc00001e1c0, 0x2000, 0xe69318, 0xe69320)
/home/andrew/free5gc/NFs/amf/ngap/service/service.go:204 +0x700
created by github.com/free5gc/amf/ngap/service.listenAndServe
/home/andrew/free5gc/NFs/amf/ngap/service/service.go:136 +0xc43

thanks a lot!

Br,
Andrew

I’m getting the same ‘has no pre-config route’ error along with a few AMF errors and a somewhat similar go panic in my free5gc log. The same process worked in v3.0.4. I didn’t add all the logs as this can probably be figured out with the logs you provided; but I think my error is a little different.

There was one error higher in the log:

2021-02-02T16:54:38-07:00 [ERRO][AMF][GMM][AMF_UE_NGAP_ID:1][SUPI:imsi-208930000000003] RequestedNssai: [{ServingSnssai:0xc000303740 HomeSnssai:<nil>}]

And here is the panic:

2021-02-02T16:54:38-07:00 [INFO][SMF][GSM] In HandlePDUSessionEstablishmentRequest                                                                                                                       
2021-02-02T16:54:38-07:00 [INFO][NAS][Convert] ProtocolOrContainerList:  [0xc00012d440 0xc00012d480]                                                                                                     
2021-02-02T16:54:38-07:00 [INFO][SMF][GSM] Protocol Configuration Options                            
2021-02-02T16:54:38-07:00 [INFO][SMF][GSM] &{[0xc00012d440 0xc00012d480]}                            
2021-02-02T16:54:38-07:00 [INFO][SMF][GSM] Didn't Implement container type IPAddressAllocationViaNASSignallingUL                                                                                         
2021-02-02T16:54:38-07:00 [INFO][SMF][PduSess] PCF Selection for SMContext SUPI[imsi-208930000000003] PDUSessionID[1]                                                                                     
2021-02-02T16:54:38-07:00 [INFO][NRF][DSCV] Handle NFDiscoveryRequest                                
2021-02-02T16:54:38-07:00 [INFO][NRF][GIN] | 200 |       127.0.0.1 | GET     | /nnrf-disc/v1/nf-instances?requester-nf-type=SMF&target-nf-type=PCF |
2021-02-02T16:54:38-07:00 [INFO][PCF][SMpolicy] Handle CreateSmPolicy                                
2021-02-02T16:54:38-07:00 [INFO][UDR][DRepo] Handle PolicyDataUesUeIdSmDataGet                                                                                                                           
2021-02-02T16:54:38-07:00 [INFO][UDR][GIN] | 200 |       127.0.0.1 | GET     | /nudr-dr/v1/policy-data/ues/imsi-208930000000003/sm-data?dnn=internet&snssai=%7B%22sst%22%3A1%2C%22sd%22%3A%22010203%22%7D |                                                
2021-02-02T16:54:38-07:00 [INFO][PCF][GIN] | 201 |       127.0.0.1 | POST    | /npcf-smpolicycontrol/v1/sm-policies |                                                                                     
CheckUEHasPreConfig                               
map[imsi-208930000000003:0xc000451790 imsi-2089300007486:0xc000451950 imsi-2089300007487:0xc000451870]                                                                                                   
2021-02-02T16:54:38-07:00 [INFO][SMF][PduSess] SUPI[imsi-208930000000003] has pre-config route                                                                                                           


2021/02/02 16:54:38 [Recovery] 2021/02/02 - 16:54:38 panic recovered:                                
runtime error: invalid memory address or nil pointer dereference                                     
/usr/local/go/src/runtime/panic.go:212 (0x449339)                                                    
        panicmem: panic(memoryError)              
/usr/local/go/src/runtime/signal_unix.go:695 (0x449188)                                              
        sigpanic: panicmem()                      
/root/free5gc/NFs/smf/context/upf.go:106 (0xb345c3)                                                  
        (*UPFInterfaceInfo).IP: if pduSessType == nasMessage.PDUSessionTypeIPv4 && len(i.IPv4EndPointAddresses) != 0 {
/root/free5gc/NFs/smf/context/datapath.go:389 (0xb2a4b7)                                             
        (*DataPath).ActivateTunnelAndPDR: if upIP, err := iface.IP(smContext.SelectedPDUSessionType); err != nil {                                                                                        
/root/free5gc/NFs/smf/producer/pdu_session.go:144 (0xb598a2)                                         
        HandlePDUSessionSMContextCreate: defaultPath.ActivateTunnelAndPDR(smContext, 255)                                                                                                                
/root/free5gc/NFs/smf/pdusession/api_sm_contexts_collection.go:54 (0xb6b484)                                                                                                                             
        HTTPPostSmContexts: HTTPResponse := producer.HandlePDUSessionSMContextCreate(req.Body.(models.PostSmContextsRequest))
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161 (0x996f5a)                                
        (*Context).Next: c.handlers[c.index](c)                                                      
/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:83 (0x9a932f)                                
        RecoveryWithWriter.func1: c.Next()                                                           
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161 (0x996f5a)                                
        (*Context).Next: c.handlers[c.index](c)                                                      
/go/pkg/mod/github.com/free5gc/[email protected]/logger_util.go:65 (0x9aaedd)                                                                                                                           
        ginToLogrus.func1: c.Next()               
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161 (0x996f5a)                                
        (*Context).Next: c.handlers[c.index](c)                                                      
/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:409 (0x9a0a05)                                    
        (*Engine).handleHTTPRequest: c.Next()                                                        
/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:367 (0x9a011c)                                    
        (*Engine).ServeHTTP: engine.handleHTTPRequest(c)                                             
/go/pkg/mod/golang.org/x/[email protected]/http2/server.go:2152 (0x9ce96a)                                                                                                          
        (*serverConn).runHandler: handler(rw, req)                                                   
/usr/local/go/src/runtime/asm_amd64.s:1373 (0x463030)                                                
        goexit: BYTE    $0x90   // NOP                                                               

2021-02-02T16:54:38-07:00 [INFO][SMF][GIN] | 500 |       127.0.0.1 | POST    | /nsmf-pdusession/v1/sm-contexts |                                                                                         
2021-02-02T16:54:38-07:00 [ERRO][AMF][GMM][AMF_UE_NGAP_ID:1][SUPI:imsi-208930000000003] CreateSmContextRequest Error: undefined response type

Hi,
I have the same problem. The panic error can be solved by checking the mongo DB. The webconsole is creating not all required information.

In my case I removed the following entry by hand and added it again:

use free5gc
db.policyData.ues.smData.remove({})
db.policyData.ues.smData.insert({"smPolicySnssaiData" : { "01112233" : { "smPolicyDnnData" : { "internet" : { "dnn" : "internet" }, "ims" : { "dnn" : "ims" } }, "snssai" : { "sst" : 1, "sd" : "112233" } } }, "ueId" : "imsi-001010000000011" })

after that, the panic error was gone. Reason: the webconsole was only creating one smPolicyDnnData for internet but not for ims.

I debugged it a little bit further. It seems like the UPF is not yet involved and it crashes before the first PFCP message is send from the SMF to the UPF.

@free5GC any ideas on that?

best,
Ralf

Update:

I found out where the ActivateTunnelAndPDR error is coming from:
in smf/context/upf.go the function IP(…) starting in line 105 is causing the problem. (smf/upf.go at 04c01ec5dd4e0e69342e9047a1d37442d88d9904 · free5gc/smf · GitHub)

Only PDUSessionTypeIPv4 and PDUSessionTypeIPv6 are supported here, however, in my case it was PDUSessionTypeIPv4IPv6. I just added an additional if statement catching this case and returning the IPv4 address.

best,
Ralf

hi,Can’t the user’s session data be added on the webui? I added on the webui here, but the session data that reminds the user is not in the UDR, please explain in detail how to add it in the background, thank you very much!

thanks a lot Ralf, this is helpful.
FYi that i don’t ue webgui on free5gc, I only use mongo db. Do I still need to delete the smdata entry and re-add it?
Also when I saw this error, I don’t have a data network (server) connected to my UPF yet. Do you have this DN server connected to your UPF when you saw this error on your setup?
BTW, my UE is not real one, it’s a gnb/ue simulator call gnbsim (GitHub - hhorai/gnbsim: gnbsim is a 5G SA gNB/UE simulator for testing 5G System.), this tool use free5gc (v304 though, not latest v305), and this gnbsim use below free5gc setup (focus is the http server part) as below:

Again, what is your UPF-DN (N6) setup when you see your error.

fyi that I don’t have this issue on v3.0.4 free5gc.

Hi,
I had no N6 / data network setting in free5gc configured. Even after fixing the problem I had no data network configured.

regarding mongoDB: the free5gc v3.0.4 entries are not working for version 3.0.5 for me. It was required for me to add them slightly differently. I added them over the html gui and fixed some values(i.e. the smData table).

best,
Ralf