5G-MAG / rt-5gms-application-function

5G Media Streaming - Application Function
https://www.5g-mag.com/streaming
Other
11 stars 6 forks source link

Segfault in msaf_context_server_name_set when open5gsIntegration = true #73

Open swthorn opened 1 year ago

swthorn commented 1 year ago

Describe the bug Segfault using default configurations with Open5GS, 5gmg-application-server, 5gms-application-function and having "open5gsIntegration" set to true.

To Reproduce Steps to reproduce the behavior:

  1. Install Kubuntu 22.04.2
  2. Follow these steps to install Open5GS (latest main branch): https://open5gs.org/open5gs/docs/guide/02-building-open5gs-from-sources/ (Use 5G-SA specific instructions, not EPC)
  3. Follow these steps to install 5g-mag application server (latest main branch): https://github.com/5G-MAG/rt-5gms-application-server
  4. Follow these instructions to install 5g mag application function (latest main branch): https://github.com/5G-MAG/rt-5gms-application-function
  5. Set "open5gsIntegration" to true in /usr/local/etc/open5gs/msaf.yaml

Expected behavior 5g-mag application function & server connect to open5gs.

Screenshots If applicable, add screenshots to help explain your problem. output from the AF (in gdb): image

If I set open5gsIntegration to false, it runs fine: image

Desktop (please complete the following information):

Additional context Ask if need additional details. Here's the code line reference for the segfault in GDB: https://github.com/5G-MAG/rt-5gms-application-function/blob/main/src/5gmsaf/context.c#L734

Perhaps I need to change additional settings in open5gs, the AF or AS? Or, I need to use older commits of open5gs?

Thanks in advance!

davidjwbbc commented 1 year ago

The present incarnation of the 5GMS AF does not need to talk to the rest of the 5G Core to be useful. The open5gsIntegration in the configuration file was left in so that the AF would eventually register with the NRF as a service (as other Open5GS NFs do), however this is not in the 3GPP specifications at present and therefore is poorly developed in the 5GMS AF. The open5gsIntegration flag is slightly poorly named and is only there to cause the 5GMS AF to register as an AF with the NRF. Also note that the current NRF registration is based on the Open5GS system for 5G Release 16 and the latest Open5GS branch has moved onto to Release 17.

You can still use the AF/AS with Open5GS core with the open5gsIntegration set to false, and at present this is probably the preferred mode to use. We currently have a demo using Open5GS core, srsRAN and the 5GMS AF set to open5gsIntegration: false, so we've demonstrated it works with Open5GS in this mode.

We are currently working on some closer integration with the PCF for providing QoS which may ultimately require this integration flag to be true. We also have some pending changes for building with Open5GS Release 17 coming through soon.

swthorn commented 1 year ago

Thanks for the detailed response! That's really helpful to me. I was looking specifically at integrating with the PCF to define some PCC rules for a 5G AF and seeing what support there was for that in Open5GS as well as 5GMS.

If it helps, I think ETSI provides a lot of the standards for integrating AF's under the MEC architecture into 5G networks: https://www.etsi.org/images/files/ETSIWhitePapers/etsi_wp28_mec_in_5G_FINAL.pdf, https://www.etsi.org/deliver/etsi_gs/mec/001_099/003/02.01.01_60/gs_mec003v020101p.pdf. These may or may not be helpful to you, depending on the architecture you are considering for 5G-MAG.