srsran / srsRAN_Project

Open source O-RAN 5G CU/DU solution from Software Radio Systems (SRS) https://docs.srsran.com/projects/project
https://www.srsran.com
GNU Affero General Public License v3.0
521 stars 176 forks source link

Segmentation fault when connecting UE to DU #916

Open antonioo420 opened 6 days ago

antonioo420 commented 6 days ago

Issue Description

After launching CU and DU, I am trying to connect the UE, but as soon as the connection starts, a segmentation fault occurs

Setup Details

[Specify details of the test setup. This would help us reproduce the problem reliably] e.g. Network configuration, Operation System, Hardware, RF front-end, library and driver versions OS: Ubuntu 22.04 Hardware: Intel Core i7-11700K, 16GB RF: USRP B200 UHD: 4.7.0.0 C5G: Open5GS

Expected Behavior

I expect the UE to be connected to the network

Actual Behaviour

A segmentation fault

gitaca@gitaca2:~/srsRAN_Project/build/apps/du$ sudo ./srsdu -c du_rf_b200_tdd_n78_20mhz.yml [sudo] password for gitaca:

--== srsRAN DU (commit 9d5dd742a) ==--

The PRACH detector will not meet the performance requirements with the configuration {Format B4, ZCZ 0, SCS 30kHz, Rx ports 1}. Lower PHY in quad executor mode. Failed to bind UDP socket to 127.0.10.2:2152. Address already in use Available radio types: uhd. [INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400; UHD_4.7.0.0-0ubuntu1~jammy1 [INFO] [LOGGING] Fastpath logging disabled at runtime. Making USRP object with args 'type=b200,num_recv_frames=64,num_send_frames=64' [INFO] [B200] Detected Device: B210 [INFO] [B200] Operating over USB 3. [INFO] [B200] Initialize CODEC control... [INFO] [B200] Initialize Radio control... [INFO] [B200] Performing register loopback test... [INFO] [B200] Register loopback test passed [INFO] [B200] Performing register loopback test... [INFO] [B200] Register loopback test passed [INFO] [B200] Setting master clock rate selection to 'automatic'. [INFO] [B200] Asking for clock rate 16.000000 MHz... [INFO] [B200] Actually got clock rate 16.000000 MHz. [INFO] [MULTI_USRP] Setting master clock rate selection to 'manual'. [INFO] [B200] Asking for clock rate 23.040000 MHz... [INFO] [B200] Actually got clock rate 23.040000 MHz. Cell pci=1, bw=20 MHz, 1T1R, dl_arfcn=650000 (n78), dl_freq=3750.0 MHz, dl_ssb_arfcn=649632, ul_freq=3750.0 MHz

F1-C: Connection to CU-CP on 127.0.10.1:38472 completed ==== DU started === Type to view help Segmentation fault

Steps to reproduce the problem

I installed the UHD drivers, then Open5GS which works fine, Followed the CU/DU split tutorial https://docs.srsran.com/projects/project/en/latest/tutorials/source/cu_du_split/source/index.html. The only thing I changed is the PLMN, I used 90170 instead of 00101, but that should not be the problem. Attached are the conf files from cu, du, and amf, and also the amf log in case that helps.

Screenshot from 2024-11-07 10-52-53 Screenshot from 2024-11-07 10-52-41 Screenshot from 2024-11-07 10-52-19

Additional Information

Running the gNB directly works totally fine, it seems the problem has to do with DU.

antonioo420 commented 2 days ago

I have found out that there seems to be a problem with a socket as seen in the output of the du execution.

Failed to bind UDP socket to 127.0.10.2:2152. Address already in use.

That port is used also by the UPF of Open5GS, but that should not be a problem since it is using a different IP. Using lsof i can see the processes that are using the port.

Screenshot from 2024-11-11 14-21-01

antonioo420 commented 2 days ago

I think I found the solution. The nru bind address was set to 127.0.10.2 as well as the f1ap bind address, just as seen in the cu/du split tutorial.

Screenshot from 2024-11-11 14-50-46

After changing the bind_addr of nru to 127.0.10.3 the aforementioned error message does not appear, and now the UE connects successfully.

I would like to know if this solution is correct and it is just a mistake in the tutorial.