open5gs / open5gs

Open5GS is a C-language Open Source implementation for 5G Core and EPC, i.e. the core network of LTE/NR network (Release-17)
https://open5gs.org
GNU Affero General Public License v3.0
1.78k stars 739 forks source link

SMF Crash when processing RAR msg #1312

Closed Mozartor2 closed 1 year ago

Mozartor2 commented 2 years ago

Environment introduction: Open5GS 2.4.0 + Kamailio 5.5 + HW DBS5900 LTE + HW Mate 30 Pro The UEl initiates a VoLTE call, PCSCF Send AAR to PCRF,PCRF Send RAR to SMF,SMF Crashed and reload! Please help me,Thanks。

smf-crash-when-volte.zip smf.log

01/11 00:35:57.587: [diam] DEBUG: pid:OUT/pcrf.epc.mnc092.mcc466.3gppnetwork.org in md_hook_cb_tree@dbg_msg_dumps.c:131:         AVP: 'Session-Id'(263) l=66 f=-M val="smf.epc.mnc092.mcc466.3gppnetwork.org;1641832232;10;app_gx"
 ((null):0)
01/11 00:35:57.587: [diam] DEBUG: pid:OUT/pcrf.epc.mnc092.mcc466.3gppnetwork.org in md_hook_cb_tree@dbg_msg_dumps.c:131:         AVP: 'Auth-Application-Id'(258) l=12 f=-M val=16777238 (0x1000016)
 ((null):0)
01/11 00:35:57.587: [pfcp] DEBUG: [55] LOCAL  UPD TX-52  peer [127.0.0.7]:8805 (../lib/pfcp/xact.c:193)
01/11 00:35:57.587: [diam] DEBUG: pid:OUT/pcrf.epc.mnc092.mcc466.3gppnetwork.org in md_hook_cb_tree@dbg_msg_dumps.c:131:         AVP: 'Origin-Host'(264) l=45 f=-M val="smf.epc.mnc092.mcc466.3gppnetwork.org"
 ((null):0)
01/11 00:35:57.587: [pfcp] DEBUG: [55] LOCAL  Create  peer [127.0.0.7]:8805 (../lib/pfcp/xact.c:113)
01/11 00:35:57.587: [diam] DEBUG: pid:OUT/pcrf.epc.mnc092.mcc466.3gppnetwork.org in md_hook_cb_tree@dbg_msg_dumps.c:131:         AVP: 'Origin-Realm'(296) l=41 f=-M val="epc.mnc092.mcc466.3gppnetwork.org"
 ((null):0)
01/11 00:35:57.587: [pfcp] DEBUG: [55] LOCAL  Commit  peer [127.0.0.7]:8805 (../lib/pfcp/xact.c:473)
01/11 00:35:57.587: [diam] DEBUG: pid:OUT/pcrf.epc.mnc092.mcc466.3gppnetwork.org in md_hook_cb_tree@dbg_msg_dumps.c:131:         AVP: 'Result-Code'(268) l=12 f=-M val='DIAMETER_SUCCESS' (2001 (0x7d1))
 ((null):0)
01/11 00:35:57.587: [smf] DEBUG: smf_state_operational(): SMF_EVT_N4_MESSAGE (../src/smf/smf-sm.c:78)
01/11 00:35:57.587: [pfcp] DEBUG: [55] LOCAL  Find    peer [127.0.0.7]:8805 (../lib/pfcp/xact.c:786)
01/11 00:35:57.588: [pfcp] DEBUG: [55] LOCAL  Receive peer [127.0.0.7]:8805 (../lib/pfcp/xact.c:699)
01/11 00:35:57.588: [pfcp] DEBUG: [55] LOCAL  UPD RX-53  peer [127.0.0.7]:8805 (../lib/pfcp/xact.c:294)
01/11 00:35:57.588: [smf] DEBUG: smf_pfcp_state_associated(): SMF_EVT_N4_MESSAGE (../src/smf/pfcp-sm.c:165)
01/11 00:35:57.588: [pfcp] DEBUG: [55] LOCAL  Commit  peer [127.0.0.7]:8805 (../lib/pfcp/xact.c:473)
01/11 00:35:57.588: [pfcp] DEBUG: [55] LOCAL  Delete  peer [127.0.0.7]:8805 (../lib/pfcp/xact.c:805)
Open5GS daemon v2.4.0

01/11 00:35:59.939: [app] INFO: Configuration: '/etc/open5gs/smf.yaml' (../lib/app/ogs-init.c:129)
01/11 00:35:59.939: [app] INFO: File Logging: '/var/log/open5gs/smf.log' (../lib/app/ogs-init.c:132)
01/11 00:35:59.939: [app] INFO: LOG-LEVEL: 'debug' (../lib/app/ogs-init.c:135)
01/11 00:35:59.949: [sock] DEBUG: addr:127.0.0.4, port:2123 (../lib/core/ogs-sockaddr.c:140)
01/11 00:35:59.949: [sock] DEBUG: addr:::1, port:2123 (../lib/core/ogs-sockaddr.c:140)
01/11 00:35:59.949: [sock] DEBUG: addr:127.0.0.4, port:2152 (../lib/core/ogs-sockaddr.c:140)
01/11 00:35:59.949: [sock] DEBUG: addr:::1, port:2152 (../lib/core/ogs-sockaddr.c:140)
01/11 00:35:59.949: [sock] DEBUG: addr:127.0.0.4, port:8805 (../lib/core/ogs-sockaddr.c:140)
01/11 00:35:59.949: [sock] DEBUG: addr:::1, port:8805 (../lib/core/ogs-sockaddr.c:140)
01/11 00:35:59.949: [sock] DEBUG: addr:127.0.0.7, port:8805 (../lib/core/ogs-sockaddr.c:140)
01/11 00:35:59.949: [sock] DEBUG: addr:127.0.0.4, port:7777 (../lib/core/ogs-sockaddr.c:140)
01/11 00:35:59.949: [sock] DEBUG: addr:127.0.0.10, port:7777 (../lib/core/ogs-sockaddr.c:140)

`

SSLP56 commented 2 years ago

Why not use SGW-C, SGW-U?

acetcom commented 2 years ago

@Mozartor2

Could you send me a gdb log as below?

$ gdb ./install/bin/open5gs-smfd
gdb> run
..(Crashed)
gdb> bt full

Thanks a lot! Sukchan

Mozartor2 commented 2 years ago

@Mozartor2

Could you send me a gdb log as below?

$ gdb ./install/bin/open5gs-smfd
gdb> run
..(Crashed)
gdb> bt full

Thanks a lot! Sukchan

gdb log:

crash.txt

acetcom commented 2 years ago

@Mozartor2

No debug symbols. Can you build the source code and run the gdb program?

$ git clone https://github.com/open5gs/open5gs
$ cd open5gs
$ meson build --prefix=`pwd`/install
$ ninja
$ cd ..
$ gdb ./install/bin/open5gs-smfd

For more information, you can see the following link. https://open5gs.org/open5gs/docs/guide/02-building-open5gs-from-sources/

Thanks a lot! Sukchan

Mozartor2 commented 2 years ago

putty-smf-build.log

After compiling with source code (git 2.4.0), I replaced open5gs-smfd installed with ppa(version 2.4.0 ) then:

gdb ./install/bin/open5gs-smfd
run -c /etc/open5gs/smf.yaml

VoLTE Call Successful......

20220111165239

open5GS install from ppa:open5gs/latest

openims@openims:~$ aptitude show open5gs
软件包:open5gs
版本号:2.4.1~focal
状态: 已安装 (2.4.0~focal), upgrade available (2.4.1~focal)
自动安装: 否
Multi-Arch: same
优先级:可选
部分:net
维护者:Harald Welte <laforge@gnumonks.org>
体系:amd64
未压缩尺寸:12.3 k
依赖于: open5gs-common (= 2.4.1~focal), open5gs-mme (= 2.4.1~focal), open5gs-sgwc (= 2.4.1~focal), open5gs-smf (= 2.4.1~focal), open5gs-amf (= 2.4.1~focal), open5gs-sgwu (=
     2.4.1~focal), open5gs-upf (= 2.4.1~focal), open5gs-hss (= 2.4.1~focal), open5gs-pcrf (= 2.4.1~focal), open5gs-nrf (= 2.4.1~focal), open5gs-ausf (= 2.4.1~focal),
     open5gs-udm (= 2.4.1~focal), open5gs-pcf (= 2.4.1~focal), open5gs-nssf (= 2.4.1~focal), open5gs-bsf (= 2.4.1~focal), open5gs-udr (= 2.4.1~focal)
描述:5G Core and EPC (metapackage)
 Open5GS is a C-language implementation of 5G Core and EPC Packet Core, i.e. the core network of an NR/LTE network (Release-16)

 This is a metapackage that depends on all the open5gs parts.

These two version(github 2.4.0 and ppa 2.4.0 )of the code should be different

Mozartor2 commented 2 years ago

We test Open5GS 2.4.1 install with Package Manager,The SMF also Crashes。

acetcom commented 2 years ago

@Mozartor2

You can use nightly build package provided by osmocom from the below link. https://build.opensuse.org/package/show/network:osmocom:nightly/open5gs

You can find the installation guide in the quickstart link. https://open5gs.org/open5gs/docs/guide/01-quickstart/

Please let me know if you have still this problem.

Thanks a lot! Sukchan

Mozartor2 commented 2 years ago

@Mozartor2

You can use nightly build package provided by osmocom from the below link. https://build.opensuse.org/package/show/network:osmocom:nightly/open5gs

You can find the installation guide in the quickstart link. https://open5gs.org/open5gs/docs/guide/01-quickstart/

Please let me know if you have still this problem.

Thanks a lot! Sukchan

nightly build :open5gs_2.4.1.202201130026 VoLTE reg succeeded,SAA message returned by Hss missing CX-User-Data AVP,when initializing a volte call,LIA failed ,the msg does not contain ServerName(scscf:port). Both version of the program(github build and nightly build 2.4.1) use the same configuration file and kamaikio。

acetcom commented 2 years ago

@Mozartor2

The SMF crash issue seems to be gone. Right?

Please share pcap or log/conf files if you have any further problems.

Thanks a lot! Sukchan

github-actions[bot] commented 1 year ago

This issue has been closed automatically due to lack of activity. This has been done to try and reduce the amount of noise. Please do not comment any further. The Open5GS Team may choose to re-open this issue if necessary.