usrp-users@lists.ettus.com

Discussion and technical support related to USRP, UHD, RFNoC

View all threads

nr-softmodem: reproducible segfault in libuhd with Ettus N310 SDR

TD
Thomas Dreibholz
Wed, Sep 13, 2023 8:55 AM

Hi,

I am trying to get OAI's nr-softmodem to run with an Ettus URSP N310,
using
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf
with just having adapted the IP addresses of the core and device.
Regardless of trying with UHD 4.1 to 4.4, and regardless of the tags for
OAI used (latest tried: 2023.w36), running nr-softmodem reproducibly
segfaults after a few seconds in libuhd:

nornetpp@5g:~/src/openairinterface5g/cmake_targets/ran_build/build$ sudo
nice -n -19 gdb ./nr-softmodem
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
https://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./nr-softmodem...
(gdb) run -O
/home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf
Starting program:
/home/nornetpp/src/openairinterface5g/cmake_targets/ran_build/build/nr-softmodem-O
/home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Detaching after fork from child process 1195016]
CMDLINE:
"/home/nornetpp/src/openairinterface5g/cmake_targets/ran_build/build/nr-softmodem"
"-O"
"/home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf"

[CONFIG] get parameters from libconfig
/home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf
[LIBCONFIG] Path for include directive set to:
/home/nornetpp/src/openairinterf
ace5g/targets/PROJECTS/GENERIC-NR-5GC/CONF
[CONFIG] function config_libconfig_init returned 0
[CONFIG] config module libconfig loaded
[LIBCONFIG] config: 2/2 parameters successfully set, (2 to default value)
[CONFIG] debug flags: 0x00000000
[LIBCONFIG] log_config: 3/3 parameters successfully set, (1 to default
value)
[LIBCONFIG] log_config: 53/53 parameters successfully set, (46 to
default value)
[LIBCONFIG] log_config: 53/53 parameters successfully set, (53 to
default value)
[LIBCONFIG] log_config: 16/16 parameters successfully set, (16 to
default value)
[LIBCONFIG] log_config: 16/16 parameters successfully set, (16 to
default value)
log init done
[HW]   # /dev/cpu_dma_latency set to 2 us
[Detaching after vfork from child process 1195017]
Reading in command-line options
[LIBCONFIG] (root): 40/40 parameters successfully set, (37 to default
value)
[LIBCONFIG] (root): 6/6 parameters successfully set, (5 to default value)
[ENB_APP]   nfapi running mode: MONOLITHIC
[GNB_APP]   Getting GNBSParams
[LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value)
[LIBCONFIG] THREAD_STRUCT.[0]: 2/2 parameters successfully set, (0 to
default value)
[LIBCONFIG] THREAD_STRUCT.[0]: 2/2 parameters successfully set, (0 to
default value)
[CONFIG] parallel_conf is set to 1
[CONFIG] worker_conf is set to 1
Configuration: nb_rrc_inst 1, nb_nr_L1_inst 1, nb_ru 1
[LIBCONFIG] TTracer: 3/3 parameters successfully set, (3 to default value)
configuring for RAU/RRU
CPU Freq is 3.187403
[ITTI]   Starting itti queue: TASK_UNKNOWN as task 0
[ITTI]   Starting itti queue: TASK_TIMER as task 1
[ITTI]   Starting itti queue: TASK_L2L1 as task 2
[ITTI]   Starting itti queue: TASK_BM as task 3
[ITTI]   Starting itti queue: TASK_PHY_ENB as task 4
[ITTI]   Starting itti queue: TASK_MAC_GNB as task 5
[ITTI]   Starting itti queue: TASK_RLC_ENB as task 6
[ITTI]   Starting itti queue: TASK_RRC_ENB_NB_IoT as task 7
[ITTI]   Starting itti queue: TASK_PDCP_ENB as task 8
[ITTI]   Starting itti queue: TASK_PDCP_GNB as task 9
[ITTI]   Starting itti queue: TASK_DATA_FORWARDING as task 10
[ITTI]   Starting itti queue: TASK_END_MARKER as task 11
[ITTI]   Starting itti queue: TASK_RRC_ENB as task 12
[ITTI]   Starting itti queue: TASK_RRC_GNB as task 13
[ITTI]   Starting itti queue: TASK_RAL_ENB as task 14
[ITTI]   Starting itti queue: TASK_S1AP as task 15
[ITTI]   Starting itti queue: TASK_NGAP as task 16
[ITTI]   Starting itti queue: TASK_X2AP as task 17
[ITTI]   Starting itti queue: TASK_M2AP_ENB as task 18
[ITTI]   Starting itti queue: TASK_M2AP_MCE as task 19
[ITTI]   Starting itti queue: TASK_M3AP as task 20
[ITTI]   Starting itti queue: TASK_M3AP_MME as task 21
[ITTI]   Starting itti queue: TASK_M3AP_MCE as task 22
[ITTI]   Starting itti queue: TASK_SCTP as task 23
[ITTI]   Starting itti queue: TASK_ENB_APP as task 24
[ITTI]   Starting itti queue: TASK_GNB_APP as task 25
[ITTI]   Starting itti queue: TASK_MCE_APP as task 26
[ITTI]   Starting itti queue: TASK_MME_APP as task 27
[ITTI]   Starting itti queue: TASK_PHY_UE as task 28
[ITTI]   Starting itti queue: TASK_MAC_UE as task 29
[ITTI]   Starting itti queue: TASK_RLC_UE as task 30
[ITTI]   Starting itti queue: TASK_PDCP_UE as task 31
[ITTI]   Starting itti queue: TASK_RRC_UE as task 32
[ITTI]   Starting itti queue: TASK_RRC_NRUE as task 33
[ITTI]   Starting itti queue: TASK_NAS_UE as task 34
[ITTI]   Starting itti queue: TASK_RAL_UE as task 35
[ITTI]   Starting itti queue: TASK_GTPV1_U as task 36
[ITTI]   Starting itti queue: TASK_CU_F1 as task 37
[ITTI]   Starting itti queue: TASK_DU_F1 as task 38
[ITTI]   Starting itti queue: TASK_CUCP_E1 as task 39
[ITTI]   Starting itti queue: TASK_CUUP_E1 as task 40
[ITTI]   Starting itti queue: TASK_RRC_UE_SIM as task 41
[ITTI]   Starting itti queue: TASK_RRC_GNB_SIM as task 42
[ITTI]   Starting itti queue: TASK_RRC_NSA_UE as task 43
[ITTI]   Starting itti queue: TASK_RRC_NSA_NRUE as task 44
[ITTI]   Starting itti queue: TASK_NAS_NRUE as task 45
[LIBCONFIG] opt: 3/3 parameters successfully set, (3 to default value)
[OPT]   OPT disabled
[HW]   Version: Branch: dreibh/simulamet-testbed-5g Abrev. Hash:
b9128b6737 Date: Tue Sep 12 16:20:35 2023 +0200
[NR_PHY]   RC.gNB = 0x555558fc2cf0
[LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value)
[LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default
value)
[NR_PHY]   PRB blacklist 51,52,53,54
[NR_PHY]   Blacklisting prb 51
[NR_PHY]   Blacklisting prb 52
[NR_PHY]   Blacklisting prb 53
[NR_PHY]   Blacklisting prb 54
[NR_PHY]   Copying 4 blacklisted PRB to L1 context
[LIBCONFIG] L1s.[0]: 19/19 parameters successfully set, (16 to default
value)
[PHY]   L1_RX_THREAD_CORE -1 (16)
[PHY]   TX_AMP = 519 (-36 dBFS)
Initializing northbound interface for L1
[PHY]   l1_north_init_gNB() RC.nb_nr_L1_inst:1
[PHY]   Installing callbacks for IF_Module - UL_indication
[MAC]   Allocating shared L1/L2 interface structure for instance 0 @
0x555558fc7980
[PHY]   l1_north_init_gNB() RC.gNB[0] installing callbacks
[PHY]   create_gNB_tasks() Task ready initialize structures
[LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value)
[LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default
value)
[NR_PHY]   PRB blacklist 51,52,53,54
[NR_PHY]   Blacklisting prb 51
[NR_PHY]   Blacklisting prb 52
[NR_PHY]   Blacklisting prb 53
[NR_PHY]   Blacklisting prb 54
[NR_PHY]   Copying 4 blacklisted PRB to L1 context
[LIBCONFIG] L1s.[0]: 19/19 parameters successfully set, (16 to default
value)
[PHY]   L1_RX_THREAD_CORE -1 (16)
[PHY]   TX_AMP = 519 (-36 dBFS)
Initializing northbound interface for L1
[PHY]   l1_north_init_gNB() RC.nb_nr_L1_inst:1
[PHY]   Installing callbacks for IF_Module - UL_indication
[PHY]   l1_north_init_gNB() RC.gNB[0] installing callbacks
[LIBCONFIG] list prs_config not found in config file
/home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf

[PHY]   No prs_config configuration found..!!
[LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value)
[LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default
value)
[LIBCONFIG] MACRLCs.[0]: 34/34 parameters successfully set, (30 to
default value)
[LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default
value)
[LIBCONFIG] MACRLCs.[0]: 34/34 parameters successfully set, (30 to
default value)
[LIBCONFIG] list gNBs.[0].E1_INTERFACE not found in config file
/home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf

[MAC]   [MAIN] Init function start:nb_nr_macrlc_inst=1
[UTIL]   Creating thread MAC_STATS with affinity -1 and priority 2
[Detaching after vfork from child process 1195042]
[New Thread 0x7ffff71ff640 (LWP 1195044)]
[LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default
value)
[LIBCONFIG] MACRLCs.[0]: 34/34 parameters successfully set, (30 to
default value)
[LIBCONFIG] list gNBs.[0].E1_INTERFACE not found in config file
/home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf

[New Thread 0x7ffff69fe640 (LWP 1195045)]
[New Thread 0x7ffff61fd640 (LWP 1195046)]
[New Thread 0x7ffff59fc640 (LWP 1195047)]
[PHY]   Installing callbacks for IF_Module - UL_indication
[NR_MAC]   PUSCH Target 200, PUCCH Target 150, PUCCH Failure 10, PUSCH
Failure 10
[PHY]   create_gNB_tasks() RC.nb_nr_L1_inst:1
[PHY]   l1_north_init_gNB() RC.nb_nr_L1_inst:1
[PHY]   Installing callbacks for IF_Module - UL_indication
[PHY]   l1_north_init_gNB() RC.gNB[0] installing callbacks
[GNB_APP]   Allocating gNB_RRC_INST for 1 instances
[PHY]   create_gNB_tasks() RC.nb_nr_inst:1 RC.nrrrc:0x555558fde4e0
[LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default
value)
[LIBCONFIG] MACRLCs.[0]: 34/34 parameters successfully set, (30 to
default value)
[LIBCONFIG] list gNBs.[0].E1_INTERFACE not found in config file
/home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf

[PHY]   create_gNB_tasks() Creating RRC instance
RC.nrrrc[0]:0x555558fe1ab0 (1 of 1)
[LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value)
[LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default
value)
[LIBCONFIG] gNBs.[0].servingCellConfigCommon.[0]: 60/60 parameters
successfully set, (10 to default value)
[RRC]   Read in ServingCellConfigCommon (PhysCellId 0, ABSFREQSSB
621312, DLBand 78, ABSFREQPOINTA 620040, DLBW
106,RACH_TargetReceivedPower -104
[NR_MAC]   NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78)
[RRC]   absoluteFrequencySSB 621312 corresponds to 3319680000 Hz
[NR_MAC]   NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78)
[NR_MAC]   NR band 78, duplex mode TDD, duplex spacing = 0 KHz
[LIBCONFIG] list gNBs.[0].servingCellConfigDedicated not found in config
file
/home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf

NRRRC 0: Southbound Transport local_mac
[LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default
value)
[LIBCONFIG] MACRLCs.[0]: 34/34 parameters successfully set, (30 to
default value)
[LIBCONFIG] list gNBs.[0].E1_INTERFACE not found in config file
/home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf

[LIBCONFIG] gNBs.[0].plmn_list.[0]: 3/3 parameters successfully set, (0
to default value)
[GNB_APP]   pdsch_AntennaPorts N1 1
[GNB_APP]   pdsch_AntennaPorts N2 1
[GNB_APP]   pdsch_AntennaPorts XP 1
[GNB_APP]   pusch_AntennaPorts 2
[GNB_APP]   minTXRXTIME 2
[GNB_APP]   SIB1 TDA 1
[GNB_APP]   Do CSI-RS 0
[GNB_APP]   Do SRS 0
[GNB_APP]   256 QAM: may be on
[GNB_APP]   SDAP layer is disabled
[GNB_APP]   Data Radio Bearer count 1
[LIBCONFIG] security: 4/4 parameters successfully set, (0 to default value)
[GNB_APP]   RRC starting with node type 2
[GNB_APP]   Sending configuration message to NR_RRC task
[LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default
value)
[LIBCONFIG] MACRLCs.[0]: 34/34 parameters successfully set, (30 to
default value)
[LIBCONFIG] list gNBs.[0].E1_INTERFACE not found in config file
/home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf

[LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default
value)
[LIBCONFIG] MACRLCs.[0]: 34/34 parameters successfully set, (30 to
default value)
[LIBCONFIG] list gNBs.[0].E1_INTERFACE not found in config file
/home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf

[PDCP]   pdcp init,usegtp
[LIBCONFIG] eNBs.[0]: 1/1 parameters successfully set, (1 to default value)
[LIBCONFIG] gNBs.[0]: 1/1 parameters successfully set, (1 to default value)
[UTIL]   Creating thread TASK_SCTP with affinity -1 and priority 50
[Detaching after vfork from child process 1195048]
[New Thread 0x7ffff51fb640 (LWP 1195050)]
[ITTI]   Created Posix thread TASK_SCTP
[X2AP]   X2AP is disabled.
[UTIL]   Creating thread TASK_GNB_APP with affinity -1 and priority 50
[Detaching after vfork from child process 1195051]
[New Thread 0x7ffff49fa640 (LWP 1195053)]
[ITTI]   Created Posix thread TASK_GNB_APP
[NR_RRC]   Creating NR RRC gNB Task, that will also create TASKS
[UTIL]   Creating thread TASK_RRC_GNB with affinity -1 and priority 50
[LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default
value)
[LIBCONFIG] MACRLCs.[0]: 34/34 parameters successfully set, (30 to
default value)
[LIBCONFIG] list gNBs.[0].E1_INTERFACE not found in config file
/home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf

[Detaching after vfork from child process 1195054]
[New Thread 0x7fffeffff640 (LWP 1195056)]
[ITTI]   Created Posix thread TASK_RRC_GNB
[LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value)
[LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default
value)
[NR_RRC]   Entering main loop of NR_RRC message task
[LIBCONFIG] gNBs.[0].plmn_list.[0]: 3/3 parameters successfully set, (0
to default value)
[NR_RRC]   [FRAME 00000][gNB][MOD 00][RNTI 0] Init...
[GTPU]   Configuring GTPu
[NR_MAC]   NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78)
[LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value)
[NR_MAC]   NR band 78, duplex mode TDD, duplex spacing = 0 KHz
[NR_RRC]   [FRAME 00000][gNB][MOD 00][RNTI 0] Checking release
[LIBCONFIG] gNBs.[0].NETWORK_INTERFACES: 10/10 parameters successfully
set, (3 to default value)
[GTPU]   SA mode
[NR_RRC]   do_SIB23_NR, size 9
[NR_RRC]   Done init_NR_SI
[NR_MAC]   Configuring common parameters from NR ServingCellConfig
[GTPU]   Configuring GTPu address : 192.168.243.11, port : 2152
[NR_MAC]   config_common() dl_BandwidthP:40
[GTPU]   Initializing UDP for local address 192.168.243.11 with port 2152
[NR_MAC]   NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78)
[NR_MAC]   config_common() dl_BandwidthP:40
[NR_MAC]   NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78)
[NR_MAC]   NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78)
[NR_MAC]   NR band 78, duplex mode TDD, duplex spacing = 0 KHz
[NR_MAC]   ssb_OffsetPointA 86, ssb_SubcarrierOffset 0
[NR_MAC]   Set RX antenna number to 1, Set TX antenna number to 2 (num
ssb 1: 80000000,0)
[NR_MAC]   Setting TDD configuration period to 6
[NR_MAC]   TDD has been properly configurated
DL frequency 3319680000: band 78, UL frequency 3319680000
[GTPU]   Created gtpu instance id: 99
[PHY]   DL frequency 3319680000 Hz, UL frequency 3319680000 Hz: band 78,
uldl offset 0 Hz
[PHY]   Configuring MIB for instance 0, : (Nid_cell 0,DL freq
3319680000, UL freq 3319680000)
[PHY]   Initializing frame parms for mu 1, N_RB 106, Ncp 0
[PHY]   Init: N_RB_DL 106, first_carrier_offset 1412, nb_prefix_samples
144,nb_prefix_samples0 176, ofdm_symbol_size 2048
[PHY]   gNB 0 configured
[NR_MAC]   slot 0 DL 1 UL 0
[NR_MAC]   slot 1 DL 1 UL 0
[NR_MAC]   slot 2 DL 1 UL 0
[NR_MAC]   slot 3 DL 1 UL 0
[NR_MAC]   slot 4 DL 1 UL 0
[NR_MAC]   slot 5 DL 1 UL 0
[NR_MAC]   slot 6 DL 1 UL 0
[NR_MAC]   slot 7 DL 1 UL 1
[NR_MAC]   slot 8 DL 0 UL 1
[NR_MAC]   slot 9 DL 0 UL 1
[NR_MAC]   slot 10 DL 1 UL 0
[NR_MAC]   slot 11 DL 1 UL 0
[NR_MAC]   slot 12 DL 1 UL 0
[NR_MAC]   slot 13 DL 1 UL 0
[NR_MAC]   slot 14 DL 1 UL 0
[NR_MAC]   slot 15 DL 1 UL 0
[NR_MAC]   slot 16 DL 1 UL 0
[NR_MAC]   slot 17 DL 1 UL 1
[NR_MAC]   slot 18 DL 0 UL 1
[NR_MAC]   slot 19 DL 0 UL 1
START MAIN THREADS
RC.nb_nr_L1_inst:1
Initializing gNB threads single_thread_flag:1 wait_for_sync:0
[PHY]   Initializing gNB 0 single_thread_flag:1
[PHY]   Initializing gNB 0
[PHY]   Registering with MAC interface module (before 0x555558fc7980)
[PHY]   Installing callbacks for IF_Module - UL_indication
[PHY]   Registering with MAC interface module (after 0x555558fc7980)
[PHY]   Setting indication lists
[PHY]   [nr-gnb.c] gNB structure allocated
wait_gNBs()
Waiting for gNB L1 instances to all get configured ... sleeping 50ms
(nb_nr_sL1_inst 1)
gNB L1 are configured
About to Init RU threads RC.nb_RU:1
Initializing RU threads
configuring RU from file
[LIBCONFIG] RUs.[0]: 43/43 parameters successfully set, (31 to default
value)
[LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value)
[LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default
value)
Set RU mask to 1
Creating RC.ru[0]:0x55555900f2b0
[PHY]   RU GPIO control set as 'generic'
[PHY]   Setting clock source to internal
[PHY]   Setting time source to internal
Setting function for RU 0 to gNodeB_3GPP
[RU 0] Setting nr_flag 0, nr_band 78, nr_scs_for_raster 1
[RU 0] Setting half-slot parallelization to 1
[PHY]   number of L1 instances 1, number of RU 1, number of CPU cores 24
[PHY]   DJP - delete code above this
/home/nornetpp/src/openairinterface5g/executables/nr-ru.c:1820
[PHY]   Copying frame parms from gNB in RC to gNB 0 in ru 0 and
frame_parms in ru
configuring ru_id 0 (start_rf 0x555555f45510)
[PHY]   Starting ru_thread 0
[PHY]   Initializing RU proc 0 (,synch_to_ext_device),
[UTIL]   Creating thread ru_thread with affinity -1 and priority 97
[Detaching after vfork from child process 1195057]
[New Thread 0x7fffef7fe640 (LWP 1195059)]
[PHY]   Starting RU 0 (,synch_to_ext_device) on cpu 6
[PHY]   Initializing frame parms for mu 1, N_RB 106, Ncp 0
[PHY]   RU Thread pool size 2
[PHY]   Init: N_RB_DL 106, first_carrier_offset 1412, nb_prefix_samples
144,nb_prefix_samples0 176, ofdm_symbol_size 2048
[PHY]   RU thread-pool core string -1,-1
[PHY]   fp->scs=30000
create a thread for core -1
[PHY]   fp->ofdm_symbol_size=2048
[PHY]   fp->nb_prefix_samples0=176
[UTIL]   Creating thread Tpool0_-1 with affinity -1 and priority 50
[PHY]   fp->nb_prefix_samples=144
[PHY]   fp->slots_per_subframe=2
[PHY]   fp->samples_per_subframe_wCP=57344
[PHY]   fp->samples_per_frame_wCP=573440
[PHY]   fp->samples_per_subframe=61440
[PHY]   fp->samples_per_frame=614400
[PHY]   fp->dl_CarrierFreq=3319680000
[PHY]   fp->ul_CarrierFreq=3319680000
[PHY]   Setting RF config for N_RB 106, NB_RX 2, NB_TX 2
[PHY]   Channel 0: setting tx_gain offset 0, rx_gain offset 75, tx_freq
3319680000 Hz, rx_freq 3319680000 Hz, tune_offset 0 Hz, sample_rate
61440000 Hz
[PHY]   Channel 1: setting tx_gain offset 0, rx_gain offset 75, tx_freq
3319680000 Hz, rx_freq 3319680000 Hz, tune_offset 0 Hz, sample_rate
61440000 Hz
[PHY]   Initializing RU signal buffers (if_south local RF) nb_tx 2, nb_rx 2
[Detaching after vfork from child process 1195060]
[PHY]   [INIT] common.txdata[0] = 0x7fffeeda5040 (2457600
bytes,sf_extension 0)
[PHY]   [INIT] common.txdata[0] = 0x7fffeeda5040
[PHY]   [INIT] common.txdata[1] = 0x7fffeeb4c040 (2457600
bytes,sf_extension 0)
[PHY]   [INIT] common.txdata[1] = 0x7fffeeb4c040
[New Thread 0x7fffeeb4b640 (LWP 1195062)]
create a thread for core -1
[UTIL]   Creating thread Tpool1_-1 with affinity -1 and priority 50
[Detaching after vfork from child process 1195063]
[PHY]   nb_tx 2
[PHY]   rxdata_7_5kHz[0] 0x7ffff4109040 for RU 0
[PHY]   rxdata_7_5kHz[1] 0x7ffff4018040 for RU 0
[New Thread 0x7fffede98640 (LWP 1195065)]
wait RUs
[PHY]   Waiting for RUs to be configured ... RC.ru_mask:01
[PHY]   [INIT] common.txdata_BF= 0x7fffdc000a80 (16 bytes)
[PHY]   txdataF_BF[0] 0x7ffff7430040 for RU 0
[PHY]   txdataF_BF[1] 0x7fffed1fd040 for RU 0
[PHY]   rxdataF[0] 0x7fffed18c040 for RU 0
[PHY]   rxdataF[1] 0x7fffed11b040 for RU 0
[PHY]   [INIT] nr_phy_init_RU() ru->num_gNB:1
[LIBCONFIG] device.recplay: 8/8 parameters successfully set, (8 to
default value)
[LIBCONFIG] device: 1/1 parameters successfully set, (1 to default value)
[LIBCONFIG] loader: 2/2 parameters successfully set, (2 to default value)
[LIBCONFIG] loader.oai_device: 2/2 parameters successfully set, (1 to
default value)
shlib_path liboai_device.so
[LOADER] library liboai_device.so successfully loaded
[HW]   openair0_cfg[0].sdr_addrs ==
'mgmt_addr=10.193.4.119,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal'
[HW]   openair0_cfg[0].clock_source == '0' (internal = 0, external = 1)
[HW]   UHD version 4.4.0.HEAD-0-g5fac246b (4.4.0)
[HW]   Checking for USRP with args
mgmt_addr=10.193.4.119,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal
[New Thread 0x7fffe11ff640 (LWP 1195066)]
[New Thread 0x7fffe09fe640 (LWP 1195067)]
[New Thread 0x7fffd7fff640 (LWP 1195068)]
[Thread 0x7fffe09fe640 (LWP 1195067) exited]
[New Thread 0x7fffcf7fe640 (LWP 1195069)]
[INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400;
UHD_4.4.0.HEAD-0-g5fac246b
[New Thread 0x7fffd77fe640 (LWP 1195070)]
[Thread 0x7fffd7fff640 (LWP 1195068) exited]
[New Thread 0x7fffd6ffd640 (LWP 1195071)]
[New Thread 0x7fffd67fc640 (LWP 1195072)]
[Thread 0x7fffd67fc640 (LWP 1195072) exited]
[New Thread 0x7fffd5ffb640 (LWP 1195073)]
[New Thread 0x7fffd57fa640 (LWP 1195074)]
[New Thread 0x7fffd4ff9640 (LWP 1195075)]
[Thread 0x7fffd57fa640 (LWP 1195074) exited]
[Thread 0x7fffd5ffb640 (LWP 1195073) exited]
[Thread 0x7fffd77fe640 (LWP 1195070) exited]
[Thread 0x7fffd4ff9640 (LWP 1195075) exited]
[Thread 0x7fffe11ff640 (LWP 1195066) exited]
[HW]   Found USRP n3xx
Found USRP n310
[Detaching after vfork from child process 1195076]
net.core.rmem_max = 62500000
net.core.wmem_max = 62500000
[INFO] [MPMD] Initializing 1 device(s) in parallel with args:
mgmt_addr=10.193.4.119,type=n3xx,product=n310,serial=31B4028,name=ni-n3xx-31B4028,fpga=HG,claimed=False,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_
source=internal,master_clock_rate=122880000.000000
[New Thread 0x7fffd4ff9640 (LWP 1195078)]
[New Thread 0x7fffd57fa640 (LWP 1195079)]
[New Thread 0x7fffd5ffb640 (LWP 1195080)]
[WARNING] [MPM.RPCServer] A timeout event occured!
[INFO] [MPM.PeriphManager] init() called with device args
`clock_source=internal,fpga=HG,master_clock_rate=122880000.000000,mgmt_addr=10.193.4.119,name=ni-n3xx-31B4028,product=n310,second_addr=192.168.20.2,time_source=internal'.
[New Thread 0x7fffd67fc640 (LWP 1195081)]
[HW]   Clock source set in both usrp_args and in clock_source, ingnoring
the latter!
[HW]   Time source set in both usrp_args and in time_source, ingnoring
the latter!
-- Using calibration table: calib_table_n310
[HW]   device_init() sample_rate:61440000
[HW]   cal 0: freq 3500000000.000000, offset 0.000000, diff
180320000.000000
[HW]   cal 1: freq 2660000000.000000, offset 0.000000, diff
659680000.000000
[HW]   cal 2: freq 2300000000.000000, offset 0.000000, diff
1019680000.000000
[HW]   cal 3: freq 1880000000.000000, offset 0.000000, diff
1439680000.000000
[HW]   cal 4: freq 816000000.000000, offset 0.000000, diff
2503680000.000000
[HW]   RX Gain 0 75.000000 (0.000000) => 75.000000 (max 75.000000)
[HW]   cal 0: freq 3500000000.000000, offset 0.000000, diff
180320000.000000
[HW]   cal 1: freq 2660000000.000000, offset 0.000000, diff
659680000.000000
[HW]   cal 2: freq 2300000000.000000, offset 0.000000, diff
1019680000.000000
[HW]   cal 3: freq 1880000000.000000, offset 0.000000, diff
1439680000.000000
[HW]   cal 4: freq 816000000.000000, offset 0.000000, diff
2503680000.000000
[HW]   RX Gain 1 75.000000 (0.000000) => 75.000000 (max 75.000000)
[HW]   USRP TX_GAIN:65.00 gain_range:65.00 tx_gain:0.00
[HW]   USRP TX_GAIN:65.00 gain_range:65.00 tx_gain:0.00
[HW]   Actual master clock: 122.880000MHz...
[HW]   Actual clock source internal...
[HW]   Actual time source internal...
[HW]   setting rx channel 0
[HW]   setting rx channel 1
[WARNING] [0/Radio#0] Attempting to set tick rate to 0. Skipping.
[HW]   RF board max packet size 368, size for 100µs jitter 6144
[HW]   rx_max_num_samps 368
[WARNING] [0/Radio#0] Attempting to set tick rate to 0. Skipping.
[HW]   RX Channel 0
[HW]     Actual RX sample rate: 61.440000MSps...
[HW]     Actual RX frequency: 3.319680GHz...
[HW]     Actual RX gain: 75.000000...
[HW]     Actual RX bandwidth: 100.000000M...
[HW]     Actual RX antenna: RX2...
[HW]   RX Channel 1
[HW]     Actual RX sample rate: 61.440000MSps...
[HW]     Actual RX frequency: 3.319680GHz...
[HW]     Actual RX gain: 75.000000...
[HW]     Actual RX bandwidth: 100.000000M...
[HW]     Actual RX antenna: RX2...
[HW]   TX Channel 0
[HW]     Actual TX sample rate: 61.440000MSps...
[HW]     Actual TX frequency: 3.319680GHz...
[HW]     Actual TX gain: 65.000000...
[HW]     Actual TX bandwidth: 100.000000M...
[HW]     Actual TX antenna: TX/RX...
[HW]     Actual TX packet size: 368
[HW]   TX Channel 1
[HW]     Actual TX sample rate: 61.440000MSps...
[HW]     Actual TX frequency: 3.319680GHz...
[HW]     Actual TX gain: 65.000000...
[HW]     Actual TX bandwidth: 100.000000M...
[HW]     Actual TX antenna: TX/RX...
[HW]     Actual TX packet size: 368
Using Device: Single USRP:
 Device: N300-Series Device
 Mboard 0: n310
 RX Channel: 0
   RX DSP: 0
   RX Dboard: A
   RX Subdev: Magnesium
 RX Channel: 1
   RX DSP: 1
   RX Dboard: A
   RX Subdev: Magnesium
 RX Channel: 2
   RX DSP: 2
   RX Dboard: B
   RX Subdev: Magnesium
 RX Channel: 3
   RX DSP: 3
   RX Dboard: B
   RX Subdev: Magnesium
 TX Channel: 0
   TX DSP: 0
   TX Dboard: A
   TX Subdev: Magnesium
 TX Channel: 1
   TX DSP: 1
   TX Dboard: A
   TX Subdev: Magnesium
 TX Channel: 2
   TX DSP: 2
   TX Dboard: B
   TX Subdev: Magnesium
 TX Channel: 3
   TX DSP: 3
   TX Dboard: B
   TX Subdev: Magnesium

[HW]   Device timestamp: 0.177981...
[HW]   [RAU] has loaded USRP N300 device.
setup_RU_buffers: frame_parms = 0x7ffff782d010
[PHY]   RU 0 Setting N_TA_offset to 800 samples (factor 2.000000, UL
Freq 3300600, N_RB 106, mu 1)
[PHY]   Signaling main thread that RU 0 is ready, sl_ahead 6
waiting for sync
(ru_thread,-1/0x555556ad20b4,0x555557329fa0,0x555557329f60)
RC.ru_mask:00
[PHY]   RUs configured
ALL RUs READY!
RC.nb_RU:1
ALL RUs ready - init gNBs
Not NFAPI mode - call init_eNB_afterRU()
[PHY]   init_eNB_afterRU() RC.nb_nr_inst:1
[PHY]   RC.nb_nr_CC[inst:0]:0x7ffff7469010
[PHY]   [gNB 0] phy_init_nr_gNB() About to wait for gNB to be configured
[LIBCONFIG] loader.dfts: 2/2 parameters successfully set, (1 to default
value)
shlib_path libdfts.so
[LOADER] library libdfts.so successfully loaded
[LIBCONFIG] loader.ldpc: 2/2 parameters successfully set, (1 to default
value)
shlib_path libldpc.so
[LOADER] library libldpc.so successfully loaded
[PHY]   Initialise nr transport
[PHY]   Mapping RX ports from 1 RUs to gNB 0
[PHY]   gNB->num_RU:1
[PHY]   Attaching RU 0 antenna 0 to gNB antenna 0
[PHY]   Attaching RU 0 antenna 1 to gNB antenna 1
create a thread for core -1
[UTIL]   Creating thread Tpool0_-1 with affinity -1 and priority 50
[Detaching after vfork from child process 1195082]
[New Thread 0x7fff8cc13640 (LWP 1195084)]
create a thread for core -1
[UTIL]   Creating thread Tpool1_-1 with affinity -1 and priority 50
[Detaching after vfork from child process 1195085]
[New Thread 0x7fff8c412640 (LWP 1195087)]
create a thread for core -1
[UTIL]   Creating thread Tpool2_-1 with affinity -1 and priority 50
[Detaching after vfork from child process 1195088]
[New Thread 0x7fff8bc11640 (LWP 1195090)]
create a thread for core -1
[UTIL]   Creating thread Tpool3_-1 with affinity -1 and priority 50
[Detaching after vfork from child process 1195091]
[New Thread 0x7fff8b410640 (LWP 1195093)]
create a thread for core -1
[UTIL]   Creating thread Tpool4_-1 with affinity -1 and priority 50
[Detaching after vfork from child process 1195094]
[New Thread 0x7fff8ac0f640 (LWP 1195096)]
create a thread for core -1
[UTIL]   Creating thread Tpool5_-1 with affinity -1 and priority 50
[Detaching after vfork from child process 1195097]
[New Thread 0x7fff8a40e640 (LWP 1195099)]
create a thread for core -1
[UTIL]   Creating thread Tpool6_-1 with affinity -1 and priority 50
[Detaching after vfork from child process 1195100]
[New Thread 0x7fff89c0d640 (LWP 1195102)]
create a thread for core -1
[UTIL]   Creating thread Tpool7_-1 with affinity -1 and priority 50
[Detaching after vfork from child process 1195103]
[New Thread 0x7fff8940c640 (LWP 1195105)]
[PHY]   Creating thread for TX reordering and dispatching to RU
[UTIL]   Creating thread thread_tx_reorder with affinity -1 and priority 97
[Detaching after vfork from child process 1195106]
[New Thread 0x7fff85ad3640 (LWP 1195108)]
[UTIL]   Creating thread L1_stats with affinity -1 and priority 1
[Detaching after vfork from child process 1195109]
[New Thread 0x7fff852d2640 (LWP 1195111)]
waiting for sync
(L1_stats_thread,-1/0x555556ad20b4,0x555557329fa0,0x555557329f60)
ALL RUs ready - ALL gNBs ready
Sending sync to all threads
Entering ITTI signals handler
TYPE <CTRL-C> TO TERMINATE
got sync (L1_stats_thread)
got sync (ru_thread)
[HW]   current pps at 1.000000, starting streaming at 2.000000
[PHY]   RU 0 rf device ready
[PHY]   RU 0 RF started opp_enabled 0
sleep...
sleep...
sleep...
sleep...
sleep...
sleep...
sleep...
sleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
Osleep...
sleep...
O
Thread 9 "ru_thread" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffef7fe640 (LWP 1292168)]
__memmove_avx_unaligned_erms() at
../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:540
540     ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No
such file or directory.
(gdb) bt
#0 __memmove_avx_unaligned_erms() at
../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:540
#1 0x00007fffe1ced9bfin
uhd::transport::rx_streamer_impl<uhd::rfnoc::chdr_rx_data_xport,
false>::recv(uhd::ref_vector<void*> const&, unsigned long,
uhd::rx_metadata_t&, double, bool)() from /usr/local/lib/libuhd.so.4.4.0
#2 0x00007fffe29c762bin trx_usrp_read(device=0x55555a1d9700,
ptimestamp=0x7fffef7fd2c8, buff=0x7fffef7fd1d0, nsamps=30720, cc=2) at
/home/nornetpp/src/openairinterface5g/radio/USRP/usrp_lib.cpp:757
#3 0x0000555555f8a235in rx_rf(ru=0x55555a1d9280, frame=0x7fffef7fd7e8,
slot=0x7fffef7fd7e4) at
/home/nornetpp/src/openairinterface5g/executables/nr-ru.c:655
#4 0x0000555555f95434in ru_thread(param=0x55555a1d9280) at
/home/nornetpp/src/openairinterface5g/executables/nr-ru.c:1257
#5 0x00007ffff7294b43in start_thread(arg=<optimized out>) at
./nptl/pthread_create.c:442
#6 0x00007ffff7326a00in clone3() at
../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
(gdb) where full
#0 __memmove_avx_unaligned_erms() at
../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:540
No locals.
#1 0x00007fffe1ced9bfin
uhd::transport::rx_streamer_impl<uhd::rfnoc::chdr_rx_data_xport,
false>::recv(uhd::ref_vector<void*> const&, unsigned long,
uhd::rx_metadata_t&, double, bool)() from /usr/local/lib/libuhd.so.4.4.0
No symbol table info available.
#2 0x00007fffe29c762bin trx_usrp_read(device=0x55555a1d9700,
ptimestamp=0x7fffef7fd2c8, buff=0x7fffef7fd1d0, nsamps=30720, cc=2) at
/home/nornetpp/src/openairinterface5g/radio/USRP/usrp_lib.cpp:757
buff_ptrs= std::vector of length 2, capacity 2 = {0x7ffff000f860,
0x7ffff002d860}
s= 0x7fffdc094aa0
samples_received= 272233
nsamps2= 3840
buff_tmp= <error reading variable buff_tmp (value requires 245760 bytes,
which is more than max-value-size)>
(gdb) but full
Undefined command: "but".  Try "help".
(gdb) bt full
#0 __memmove_avx_unaligned_erms() at
../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:540
No locals.
#1 0x00007fffe1ced9bfin
uhd::transport::rx_streamer_impl<uhd::rfnoc::chdr_rx_data_xport,
false>::recv(uhd::ref_vector<void*> const&, unsigned long,
uhd::rx_metadata_t&, double, bool)() from /usr/local/lib/libuhd.so.4.4.0
No symbol table info available.
#2 0x00007fffe29c762bin trx_usrp_read(device=0x55555a1d9700,
ptimestamp=0x7fffef7fd2c8, buff=0x7fffef7fd1d0, nsamps=30720, cc=2) at
/home/nornetpp/src/openairinterface5g/radio/USRP/usrp_lib.cpp:757
buff_ptrs= std::vector of length 2, capacity 2 = {0x7ffff000f860,
0x7ffff002d860}
s= 0x7fffdc094aa0
samples_received= 272233
nsamps2= 3840
buff_tmp= <error reading variable buff_tmp (value requires 245760 bytes,
which is more than max-value-size)>
read_count= 0
rxshift= 2
FUNCTION= "trx_usrp_read"
recPlay= 0x7fffdc184b30
#3 0x0000555555f8a235in rx_rf(ru=0x55555a1d9280, frame=0x7fffef7fd7e8,
slot=0x7fffef7fd7e4) at
/home/nornetpp/src/openairinterface5g/executables/nr-ru.c:655
proc= 0x55555a1daeb0
fp= 0x7ffff782d010
cfg= 0x55555a1d9db8
rxp= {0x7fffee0f2040, 0x7fffede99040}
rxs= 4146746579
i= 2
samples_per_slot= 30720
samples_per_slot_prev= 32767
ts= 140737211524672
old_ts= 0
FUNCTION= "rx_rf"
gps_sec= 6.9533421303430063e-310
#4 0x0000555555f95434in ru_thread(param=0x55555a1d9280) at
/home/nornetpp/src/openairinterface5g/executables/nr-ru.c:1257
sl= 0
absslot_rx= 0
rt_prof_idx= 0
slot_type= 0
--Type <RET> for more, q to quit, c to continue without paging--
ru_thread_status= 0
ru= 0x55555a1d9280
proc= 0x55555a1daeb0
fp= 0x7ffff782d010
gNB= 0x7ffff7469010
ret= 0
slot= 0
frame= 0
threadname= "ru_thread 0", '\000' <repeats 28 times>
initial_wait= 0
opp_enabled0= 0
cfg= 0x55555a1d9378
FUNCTION= "ru_thread"
syncMsg= 0x0
res= 0x0
slot_start= {tv_sec= 1182185, tv_nsec= 141695065}
slot_duration= {tv_sec= 0, tv_nsec= 500000}
#5 0x00007ffff7294b43in start_thread(arg=<optimized out>) at
./nptl/pthread_create.c:442
ret= <optimized out>
pd= <optimized out>
out= <optimized out>
unwind_buf= {cancel_jmp_buf= {{jmp_buf= {4294967295,
-2513490550454601873, 140737211524672, 0, 140737340065872,
140737488343888, -2513490550927509649, -2513438483471124625},
mask_was_saved= 0}}, priv= {pad= {0x0, 0x0,
0x0, 0x0}, data= {prev= 0x0, cleanup= 0x0, canceltype= 0}}}
not_first_call= <optimized out>
#6 0x00007ffff7326a00in clone3() at
../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
No locals.
(gdb)

The N310 is of course reachable on both fibre ports as well as on the
copper port, i.e. ping to all IP addresses is working. The MTU on the
fibre ports is properly configured to 9000 as well. The N310 firmware is
up-to-date.

OAI compiled with:

  1. Trial #1:
    cd ~/src/openairinterface5g
    source oaienv
    ./cmake_targets/build_oai -w USRP -c --eNB --gNB --run-with-gdb
    RelWithDebInfo
  2. Trial #2:
    cd ~/src/openairinterface5g
    source oaienv
    export BUILD_UHD_FROM_SOURCE=True
    export UHD_VERSION=4.4.0.0   # (also tried different versions here)
    ./cmake_targets/build_oai -I -w USRP
    ./cmake_targets/build_oai -w USRP -c --eNB --gNB --run-with-gdb
    RelWithDebInfo
  3. Also tried with Debug instead of RelWithDebInfo

The problem is reproducible, i.e. I can easily provide further details
if necessary.

--
Best regards / Mit freundlichen Grüßen / Med vennlig hilsen


---=====
Thomas Dreibholz

SimulaMet — Simula Metropolitan Centre for Digital Engineering
Centre for Resilient Networks and Applications
Pilestredet 52
0167 Oslo, Norway

E-Mail:dreibh@simula.no
Homepage:http://simula.no/people/dreibh


---=====

Hi, I am trying to get OAI's nr-softmodem to run with an Ettus URSP N310, using targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf with just having adapted the IP addresses of the core and device. Regardless of trying with UHD 4.1 to 4.4, and regardless of the tags for OAI used (latest tried: 2023.w36), running nr-softmodem reproducibly segfaults after a few seconds in libuhd: nornetpp@5g:~/src/openairinterface5g/cmake_targets/ran_build/build$ sudo nice -n -19 gdb ./nr-softmodem GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./nr-softmodem... (gdb) run -O /home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf Starting program: /home/nornetpp/src/openairinterface5g/cmake_targets/ran_build/build/nr-softmodem-O /home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [Detaching after fork from child process 1195016] CMDLINE: "/home/nornetpp/src/openairinterface5g/cmake_targets/ran_build/build/nr-softmodem" "-O" "/home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf" [CONFIG] get parameters from libconfig /home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf [LIBCONFIG] Path for include directive set to: /home/nornetpp/src/openairinterf ace5g/targets/PROJECTS/GENERIC-NR-5GC/CONF [CONFIG] function config_libconfig_init returned 0 [CONFIG] config module libconfig loaded [LIBCONFIG] config: 2/2 parameters successfully set, (2 to default value) [CONFIG] debug flags: 0x00000000 [LIBCONFIG] log_config: 3/3 parameters successfully set, (1 to default value) [LIBCONFIG] log_config: 53/53 parameters successfully set, (46 to default value) [LIBCONFIG] log_config: 53/53 parameters successfully set, (53 to default value) [LIBCONFIG] log_config: 16/16 parameters successfully set, (16 to default value) [LIBCONFIG] log_config: 16/16 parameters successfully set, (16 to default value) log init done [HW]   # /dev/cpu_dma_latency set to 2 us [Detaching after vfork from child process 1195017] Reading in command-line options [LIBCONFIG] (root): 40/40 parameters successfully set, (37 to default value) [LIBCONFIG] (root): 6/6 parameters successfully set, (5 to default value) [ENB_APP]   nfapi running mode: MONOLITHIC [GNB_APP]   Getting GNBSParams [LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value) [LIBCONFIG] THREAD_STRUCT.[0]: 2/2 parameters successfully set, (0 to default value) [LIBCONFIG] THREAD_STRUCT.[0]: 2/2 parameters successfully set, (0 to default value) [CONFIG] parallel_conf is set to 1 [CONFIG] worker_conf is set to 1 Configuration: nb_rrc_inst 1, nb_nr_L1_inst 1, nb_ru 1 [LIBCONFIG] TTracer: 3/3 parameters successfully set, (3 to default value) configuring for RAU/RRU CPU Freq is 3.187403 [ITTI]   Starting itti queue: TASK_UNKNOWN as task 0 [ITTI]   Starting itti queue: TASK_TIMER as task 1 [ITTI]   Starting itti queue: TASK_L2L1 as task 2 [ITTI]   Starting itti queue: TASK_BM as task 3 [ITTI]   Starting itti queue: TASK_PHY_ENB as task 4 [ITTI]   Starting itti queue: TASK_MAC_GNB as task 5 [ITTI]   Starting itti queue: TASK_RLC_ENB as task 6 [ITTI]   Starting itti queue: TASK_RRC_ENB_NB_IoT as task 7 [ITTI]   Starting itti queue: TASK_PDCP_ENB as task 8 [ITTI]   Starting itti queue: TASK_PDCP_GNB as task 9 [ITTI]   Starting itti queue: TASK_DATA_FORWARDING as task 10 [ITTI]   Starting itti queue: TASK_END_MARKER as task 11 [ITTI]   Starting itti queue: TASK_RRC_ENB as task 12 [ITTI]   Starting itti queue: TASK_RRC_GNB as task 13 [ITTI]   Starting itti queue: TASK_RAL_ENB as task 14 [ITTI]   Starting itti queue: TASK_S1AP as task 15 [ITTI]   Starting itti queue: TASK_NGAP as task 16 [ITTI]   Starting itti queue: TASK_X2AP as task 17 [ITTI]   Starting itti queue: TASK_M2AP_ENB as task 18 [ITTI]   Starting itti queue: TASK_M2AP_MCE as task 19 [ITTI]   Starting itti queue: TASK_M3AP as task 20 [ITTI]   Starting itti queue: TASK_M3AP_MME as task 21 [ITTI]   Starting itti queue: TASK_M3AP_MCE as task 22 [ITTI]   Starting itti queue: TASK_SCTP as task 23 [ITTI]   Starting itti queue: TASK_ENB_APP as task 24 [ITTI]   Starting itti queue: TASK_GNB_APP as task 25 [ITTI]   Starting itti queue: TASK_MCE_APP as task 26 [ITTI]   Starting itti queue: TASK_MME_APP as task 27 [ITTI]   Starting itti queue: TASK_PHY_UE as task 28 [ITTI]   Starting itti queue: TASK_MAC_UE as task 29 [ITTI]   Starting itti queue: TASK_RLC_UE as task 30 [ITTI]   Starting itti queue: TASK_PDCP_UE as task 31 [ITTI]   Starting itti queue: TASK_RRC_UE as task 32 [ITTI]   Starting itti queue: TASK_RRC_NRUE as task 33 [ITTI]   Starting itti queue: TASK_NAS_UE as task 34 [ITTI]   Starting itti queue: TASK_RAL_UE as task 35 [ITTI]   Starting itti queue: TASK_GTPV1_U as task 36 [ITTI]   Starting itti queue: TASK_CU_F1 as task 37 [ITTI]   Starting itti queue: TASK_DU_F1 as task 38 [ITTI]   Starting itti queue: TASK_CUCP_E1 as task 39 [ITTI]   Starting itti queue: TASK_CUUP_E1 as task 40 [ITTI]   Starting itti queue: TASK_RRC_UE_SIM as task 41 [ITTI]   Starting itti queue: TASK_RRC_GNB_SIM as task 42 [ITTI]   Starting itti queue: TASK_RRC_NSA_UE as task 43 [ITTI]   Starting itti queue: TASK_RRC_NSA_NRUE as task 44 [ITTI]   Starting itti queue: TASK_NAS_NRUE as task 45 [LIBCONFIG] opt: 3/3 parameters successfully set, (3 to default value) [OPT]   OPT disabled [HW]   Version: Branch: dreibh/simulamet-testbed-5g Abrev. Hash: b9128b6737 Date: Tue Sep 12 16:20:35 2023 +0200 [NR_PHY]   RC.gNB = 0x555558fc2cf0 [LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value) [LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default value) [NR_PHY]   PRB blacklist 51,52,53,54 [NR_PHY]   Blacklisting prb 51 [NR_PHY]   Blacklisting prb 52 [NR_PHY]   Blacklisting prb 53 [NR_PHY]   Blacklisting prb 54 [NR_PHY]   Copying 4 blacklisted PRB to L1 context [LIBCONFIG] L1s.[0]: 19/19 parameters successfully set, (16 to default value) [PHY]   L1_RX_THREAD_CORE -1 (16) [PHY]   TX_AMP = 519 (-36 dBFS) Initializing northbound interface for L1 [PHY]   l1_north_init_gNB() RC.nb_nr_L1_inst:1 [PHY]   Installing callbacks for IF_Module - UL_indication [MAC]   Allocating shared L1/L2 interface structure for instance 0 @ 0x555558fc7980 [PHY]   l1_north_init_gNB() RC.gNB[0] installing callbacks [PHY]   create_gNB_tasks() Task ready initialize structures [LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value) [LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default value) [NR_PHY]   PRB blacklist 51,52,53,54 [NR_PHY]   Blacklisting prb 51 [NR_PHY]   Blacklisting prb 52 [NR_PHY]   Blacklisting prb 53 [NR_PHY]   Blacklisting prb 54 [NR_PHY]   Copying 4 blacklisted PRB to L1 context [LIBCONFIG] L1s.[0]: 19/19 parameters successfully set, (16 to default value) [PHY]   L1_RX_THREAD_CORE -1 (16) [PHY]   TX_AMP = 519 (-36 dBFS) Initializing northbound interface for L1 [PHY]   l1_north_init_gNB() RC.nb_nr_L1_inst:1 [PHY]   Installing callbacks for IF_Module - UL_indication [PHY]   l1_north_init_gNB() RC.gNB[0] installing callbacks [LIBCONFIG] list prs_config not found in config file /home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf [PHY]   No prs_config configuration found..!! [LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value) [LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default value) [LIBCONFIG] MACRLCs.[0]: 34/34 parameters successfully set, (30 to default value) [LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default value) [LIBCONFIG] MACRLCs.[0]: 34/34 parameters successfully set, (30 to default value) [LIBCONFIG] list gNBs.[0].E1_INTERFACE not found in config file /home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf [MAC]   [MAIN] Init function start:nb_nr_macrlc_inst=1 [UTIL]   Creating thread MAC_STATS with affinity -1 and priority 2 [Detaching after vfork from child process 1195042] [New Thread 0x7ffff71ff640 (LWP 1195044)] [LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default value) [LIBCONFIG] MACRLCs.[0]: 34/34 parameters successfully set, (30 to default value) [LIBCONFIG] list gNBs.[0].E1_INTERFACE not found in config file /home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf [New Thread 0x7ffff69fe640 (LWP 1195045)] [New Thread 0x7ffff61fd640 (LWP 1195046)] [New Thread 0x7ffff59fc640 (LWP 1195047)] [PHY]   Installing callbacks for IF_Module - UL_indication [NR_MAC]   PUSCH Target 200, PUCCH Target 150, PUCCH Failure 10, PUSCH Failure 10 [PHY]   create_gNB_tasks() RC.nb_nr_L1_inst:1 [PHY]   l1_north_init_gNB() RC.nb_nr_L1_inst:1 [PHY]   Installing callbacks for IF_Module - UL_indication [PHY]   l1_north_init_gNB() RC.gNB[0] installing callbacks [GNB_APP]   Allocating gNB_RRC_INST for 1 instances [PHY]   create_gNB_tasks() RC.nb_nr_inst:1 RC.nrrrc:0x555558fde4e0 [LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default value) [LIBCONFIG] MACRLCs.[0]: 34/34 parameters successfully set, (30 to default value) [LIBCONFIG] list gNBs.[0].E1_INTERFACE not found in config file /home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf [PHY]   create_gNB_tasks() Creating RRC instance RC.nrrrc[0]:0x555558fe1ab0 (1 of 1) [LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value) [LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default value) [LIBCONFIG] gNBs.[0].servingCellConfigCommon.[0]: 60/60 parameters successfully set, (10 to default value) [RRC]   Read in ServingCellConfigCommon (PhysCellId 0, ABSFREQSSB 621312, DLBand 78, ABSFREQPOINTA 620040, DLBW 106,RACH_TargetReceivedPower -104 [NR_MAC]   NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78) [RRC]   absoluteFrequencySSB 621312 corresponds to 3319680000 Hz [NR_MAC]   NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78) [NR_MAC]   NR band 78, duplex mode TDD, duplex spacing = 0 KHz [LIBCONFIG] list gNBs.[0].servingCellConfigDedicated not found in config file /home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf NRRRC 0: Southbound Transport local_mac [LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default value) [LIBCONFIG] MACRLCs.[0]: 34/34 parameters successfully set, (30 to default value) [LIBCONFIG] list gNBs.[0].E1_INTERFACE not found in config file /home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf [LIBCONFIG] gNBs.[0].plmn_list.[0]: 3/3 parameters successfully set, (0 to default value) [GNB_APP]   pdsch_AntennaPorts N1 1 [GNB_APP]   pdsch_AntennaPorts N2 1 [GNB_APP]   pdsch_AntennaPorts XP 1 [GNB_APP]   pusch_AntennaPorts 2 [GNB_APP]   minTXRXTIME 2 [GNB_APP]   SIB1 TDA 1 [GNB_APP]   Do CSI-RS 0 [GNB_APP]   Do SRS 0 [GNB_APP]   256 QAM: may be on [GNB_APP]   SDAP layer is disabled [GNB_APP]   Data Radio Bearer count 1 [LIBCONFIG] security: 4/4 parameters successfully set, (0 to default value) [GNB_APP]   RRC starting with node type 2 [GNB_APP]   Sending configuration message to NR_RRC task [LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default value) [LIBCONFIG] MACRLCs.[0]: 34/34 parameters successfully set, (30 to default value) [LIBCONFIG] list gNBs.[0].E1_INTERFACE not found in config file /home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf [LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default value) [LIBCONFIG] MACRLCs.[0]: 34/34 parameters successfully set, (30 to default value) [LIBCONFIG] list gNBs.[0].E1_INTERFACE not found in config file /home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf [PDCP]   pdcp init,usegtp [LIBCONFIG] eNBs.[0]: 1/1 parameters successfully set, (1 to default value) [LIBCONFIG] gNBs.[0]: 1/1 parameters successfully set, (1 to default value) [UTIL]   Creating thread TASK_SCTP with affinity -1 and priority 50 [Detaching after vfork from child process 1195048] [New Thread 0x7ffff51fb640 (LWP 1195050)] [ITTI]   Created Posix thread TASK_SCTP [X2AP]   X2AP is disabled. [UTIL]   Creating thread TASK_GNB_APP with affinity -1 and priority 50 [Detaching after vfork from child process 1195051] [New Thread 0x7ffff49fa640 (LWP 1195053)] [ITTI]   Created Posix thread TASK_GNB_APP [NR_RRC]   Creating NR RRC gNB Task, that will also create TASKS [UTIL]   Creating thread TASK_RRC_GNB with affinity -1 and priority 50 [LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default value) [LIBCONFIG] MACRLCs.[0]: 34/34 parameters successfully set, (30 to default value) [LIBCONFIG] list gNBs.[0].E1_INTERFACE not found in config file /home/nornetpp/src/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf [Detaching after vfork from child process 1195054] [New Thread 0x7fffeffff640 (LWP 1195056)] [ITTI]   Created Posix thread TASK_RRC_GNB [LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value) [LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default value) [NR_RRC]   Entering main loop of NR_RRC message task [LIBCONFIG] gNBs.[0].plmn_list.[0]: 3/3 parameters successfully set, (0 to default value) [NR_RRC]   [FRAME 00000][gNB][MOD 00][RNTI 0] Init... [GTPU]   Configuring GTPu [NR_MAC]   NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78) [LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value) [NR_MAC]   NR band 78, duplex mode TDD, duplex spacing = 0 KHz [NR_RRC]   [FRAME 00000][gNB][MOD 00][RNTI 0] Checking release [LIBCONFIG] gNBs.[0].NETWORK_INTERFACES: 10/10 parameters successfully set, (3 to default value) [GTPU]   SA mode [NR_RRC]   do_SIB23_NR, size 9 [NR_RRC]   Done init_NR_SI [NR_MAC]   Configuring common parameters from NR ServingCellConfig [GTPU]   Configuring GTPu address : 192.168.243.11, port : 2152 [NR_MAC]   config_common() dl_BandwidthP:40 [GTPU]   Initializing UDP for local address 192.168.243.11 with port 2152 [NR_MAC]   NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78) [NR_MAC]   config_common() dl_BandwidthP:40 [NR_MAC]   NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78) [NR_MAC]   NR band duplex spacing is 0 KHz (nr_bandtable[37].band = 78) [NR_MAC]   NR band 78, duplex mode TDD, duplex spacing = 0 KHz [NR_MAC]   ssb_OffsetPointA 86, ssb_SubcarrierOffset 0 [NR_MAC]   Set RX antenna number to 1, Set TX antenna number to 2 (num ssb 1: 80000000,0) [NR_MAC]   Setting TDD configuration period to 6 [NR_MAC]   TDD has been properly configurated DL frequency 3319680000: band 78, UL frequency 3319680000 [GTPU]   Created gtpu instance id: 99 [PHY]   DL frequency 3319680000 Hz, UL frequency 3319680000 Hz: band 78, uldl offset 0 Hz [PHY]   Configuring MIB for instance 0, : (Nid_cell 0,DL freq 3319680000, UL freq 3319680000) [PHY]   Initializing frame parms for mu 1, N_RB 106, Ncp 0 [PHY]   Init: N_RB_DL 106, first_carrier_offset 1412, nb_prefix_samples 144,nb_prefix_samples0 176, ofdm_symbol_size 2048 [PHY]   gNB 0 configured [NR_MAC]   slot 0 DL 1 UL 0 [NR_MAC]   slot 1 DL 1 UL 0 [NR_MAC]   slot 2 DL 1 UL 0 [NR_MAC]   slot 3 DL 1 UL 0 [NR_MAC]   slot 4 DL 1 UL 0 [NR_MAC]   slot 5 DL 1 UL 0 [NR_MAC]   slot 6 DL 1 UL 0 [NR_MAC]   slot 7 DL 1 UL 1 [NR_MAC]   slot 8 DL 0 UL 1 [NR_MAC]   slot 9 DL 0 UL 1 [NR_MAC]   slot 10 DL 1 UL 0 [NR_MAC]   slot 11 DL 1 UL 0 [NR_MAC]   slot 12 DL 1 UL 0 [NR_MAC]   slot 13 DL 1 UL 0 [NR_MAC]   slot 14 DL 1 UL 0 [NR_MAC]   slot 15 DL 1 UL 0 [NR_MAC]   slot 16 DL 1 UL 0 [NR_MAC]   slot 17 DL 1 UL 1 [NR_MAC]   slot 18 DL 0 UL 1 [NR_MAC]   slot 19 DL 0 UL 1 START MAIN THREADS RC.nb_nr_L1_inst:1 Initializing gNB threads single_thread_flag:1 wait_for_sync:0 [PHY]   Initializing gNB 0 single_thread_flag:1 [PHY]   Initializing gNB 0 [PHY]   Registering with MAC interface module (before 0x555558fc7980) [PHY]   Installing callbacks for IF_Module - UL_indication [PHY]   Registering with MAC interface module (after 0x555558fc7980) [PHY]   Setting indication lists [PHY]   [nr-gnb.c] gNB structure allocated wait_gNBs() Waiting for gNB L1 instances to all get configured ... sleeping 50ms (nb_nr_sL1_inst 1) gNB L1 are configured About to Init RU threads RC.nb_RU:1 Initializing RU threads configuring RU from file [LIBCONFIG] RUs.[0]: 43/43 parameters successfully set, (31 to default value) [LIBCONFIG] (root): 2/2 parameters successfully set, (0 to default value) [LIBCONFIG] gNBs.[0]: 28/28 parameters successfully set, (20 to default value) Set RU mask to 1 Creating RC.ru[0]:0x55555900f2b0 [PHY]   RU GPIO control set as 'generic' [PHY]   Setting clock source to internal [PHY]   Setting time source to internal Setting function for RU 0 to gNodeB_3GPP [RU 0] Setting nr_flag 0, nr_band 78, nr_scs_for_raster 1 [RU 0] Setting half-slot parallelization to 1 [PHY]   number of L1 instances 1, number of RU 1, number of CPU cores 24 [PHY]   DJP - delete code above this /home/nornetpp/src/openairinterface5g/executables/nr-ru.c:1820 [PHY]   Copying frame parms from gNB in RC to gNB 0 in ru 0 and frame_parms in ru configuring ru_id 0 (start_rf 0x555555f45510) [PHY]   Starting ru_thread 0 [PHY]   Initializing RU proc 0 (,synch_to_ext_device), [UTIL]   Creating thread ru_thread with affinity -1 and priority 97 [Detaching after vfork from child process 1195057] [New Thread 0x7fffef7fe640 (LWP 1195059)] [PHY]   Starting RU 0 (,synch_to_ext_device) on cpu 6 [PHY]   Initializing frame parms for mu 1, N_RB 106, Ncp 0 [PHY]   RU Thread pool size 2 [PHY]   Init: N_RB_DL 106, first_carrier_offset 1412, nb_prefix_samples 144,nb_prefix_samples0 176, ofdm_symbol_size 2048 [PHY]   RU thread-pool core string -1,-1 [PHY]   fp->scs=30000 create a thread for core -1 [PHY]   fp->ofdm_symbol_size=2048 [PHY]   fp->nb_prefix_samples0=176 [UTIL]   Creating thread Tpool0_-1 with affinity -1 and priority 50 [PHY]   fp->nb_prefix_samples=144 [PHY]   fp->slots_per_subframe=2 [PHY]   fp->samples_per_subframe_wCP=57344 [PHY]   fp->samples_per_frame_wCP=573440 [PHY]   fp->samples_per_subframe=61440 [PHY]   fp->samples_per_frame=614400 [PHY]   fp->dl_CarrierFreq=3319680000 [PHY]   fp->ul_CarrierFreq=3319680000 [PHY]   Setting RF config for N_RB 106, NB_RX 2, NB_TX 2 [PHY]   Channel 0: setting tx_gain offset 0, rx_gain offset 75, tx_freq 3319680000 Hz, rx_freq 3319680000 Hz, tune_offset 0 Hz, sample_rate 61440000 Hz [PHY]   Channel 1: setting tx_gain offset 0, rx_gain offset 75, tx_freq 3319680000 Hz, rx_freq 3319680000 Hz, tune_offset 0 Hz, sample_rate 61440000 Hz [PHY]   Initializing RU signal buffers (if_south local RF) nb_tx 2, nb_rx 2 [Detaching after vfork from child process 1195060] [PHY]   [INIT] common.txdata[0] = 0x7fffeeda5040 (2457600 bytes,sf_extension 0) [PHY]   [INIT] common.txdata[0] = 0x7fffeeda5040 [PHY]   [INIT] common.txdata[1] = 0x7fffeeb4c040 (2457600 bytes,sf_extension 0) [PHY]   [INIT] common.txdata[1] = 0x7fffeeb4c040 [New Thread 0x7fffeeb4b640 (LWP 1195062)] create a thread for core -1 [UTIL]   Creating thread Tpool1_-1 with affinity -1 and priority 50 [Detaching after vfork from child process 1195063] [PHY]   nb_tx 2 [PHY]   rxdata_7_5kHz[0] 0x7ffff4109040 for RU 0 [PHY]   rxdata_7_5kHz[1] 0x7ffff4018040 for RU 0 [New Thread 0x7fffede98640 (LWP 1195065)] wait RUs [PHY]   Waiting for RUs to be configured ... RC.ru_mask:01 [PHY]   [INIT] common.txdata_BF= 0x7fffdc000a80 (16 bytes) [PHY]   txdataF_BF[0] 0x7ffff7430040 for RU 0 [PHY]   txdataF_BF[1] 0x7fffed1fd040 for RU 0 [PHY]   rxdataF[0] 0x7fffed18c040 for RU 0 [PHY]   rxdataF[1] 0x7fffed11b040 for RU 0 [PHY]   [INIT] nr_phy_init_RU() ru->num_gNB:1 [LIBCONFIG] device.recplay: 8/8 parameters successfully set, (8 to default value) [LIBCONFIG] device: 1/1 parameters successfully set, (1 to default value) [LIBCONFIG] loader: 2/2 parameters successfully set, (2 to default value) [LIBCONFIG] loader.oai_device: 2/2 parameters successfully set, (1 to default value) shlib_path liboai_device.so [LOADER] library liboai_device.so successfully loaded [HW]   openair0_cfg[0].sdr_addrs == 'mgmt_addr=10.193.4.119,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal' [HW]   openair0_cfg[0].clock_source == '0' (internal = 0, external = 1) [HW]   UHD version 4.4.0.HEAD-0-g5fac246b (4.4.0) [HW]   Checking for USRP with args mgmt_addr=10.193.4.119,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal [New Thread 0x7fffe11ff640 (LWP 1195066)] [New Thread 0x7fffe09fe640 (LWP 1195067)] [New Thread 0x7fffd7fff640 (LWP 1195068)] [Thread 0x7fffe09fe640 (LWP 1195067) exited] [New Thread 0x7fffcf7fe640 (LWP 1195069)] [INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400; UHD_4.4.0.HEAD-0-g5fac246b [New Thread 0x7fffd77fe640 (LWP 1195070)] [Thread 0x7fffd7fff640 (LWP 1195068) exited] [New Thread 0x7fffd6ffd640 (LWP 1195071)] [New Thread 0x7fffd67fc640 (LWP 1195072)] [Thread 0x7fffd67fc640 (LWP 1195072) exited] [New Thread 0x7fffd5ffb640 (LWP 1195073)] [New Thread 0x7fffd57fa640 (LWP 1195074)] [New Thread 0x7fffd4ff9640 (LWP 1195075)] [Thread 0x7fffd57fa640 (LWP 1195074) exited] [Thread 0x7fffd5ffb640 (LWP 1195073) exited] [Thread 0x7fffd77fe640 (LWP 1195070) exited] [Thread 0x7fffd4ff9640 (LWP 1195075) exited] [Thread 0x7fffe11ff640 (LWP 1195066) exited] [HW]   Found USRP n3xx Found USRP n310 [Detaching after vfork from child process 1195076] net.core.rmem_max = 62500000 net.core.wmem_max = 62500000 [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=10.193.4.119,type=n3xx,product=n310,serial=31B4028,name=ni-n3xx-31B4028,fpga=HG,claimed=False,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_ source=internal,master_clock_rate=122880000.000000 [New Thread 0x7fffd4ff9640 (LWP 1195078)] [New Thread 0x7fffd57fa640 (LWP 1195079)] [New Thread 0x7fffd5ffb640 (LWP 1195080)] [WARNING] [MPM.RPCServer] A timeout event occured! [INFO] [MPM.PeriphManager] init() called with device args `clock_source=internal,fpga=HG,master_clock_rate=122880000.000000,mgmt_addr=10.193.4.119,name=ni-n3xx-31B4028,product=n310,second_addr=192.168.20.2,time_source=internal'. [New Thread 0x7fffd67fc640 (LWP 1195081)] [HW]   Clock source set in both usrp_args and in clock_source, ingnoring the latter! [HW]   Time source set in both usrp_args and in time_source, ingnoring the latter! -- Using calibration table: calib_table_n310 [HW]   device_init() sample_rate:61440000 [HW]   cal 0: freq 3500000000.000000, offset 0.000000, diff 180320000.000000 [HW]   cal 1: freq 2660000000.000000, offset 0.000000, diff 659680000.000000 [HW]   cal 2: freq 2300000000.000000, offset 0.000000, diff 1019680000.000000 [HW]   cal 3: freq 1880000000.000000, offset 0.000000, diff 1439680000.000000 [HW]   cal 4: freq 816000000.000000, offset 0.000000, diff 2503680000.000000 [HW]   RX Gain 0 75.000000 (0.000000) => 75.000000 (max 75.000000) [HW]   cal 0: freq 3500000000.000000, offset 0.000000, diff 180320000.000000 [HW]   cal 1: freq 2660000000.000000, offset 0.000000, diff 659680000.000000 [HW]   cal 2: freq 2300000000.000000, offset 0.000000, diff 1019680000.000000 [HW]   cal 3: freq 1880000000.000000, offset 0.000000, diff 1439680000.000000 [HW]   cal 4: freq 816000000.000000, offset 0.000000, diff 2503680000.000000 [HW]   RX Gain 1 75.000000 (0.000000) => 75.000000 (max 75.000000) [HW]   USRP TX_GAIN:65.00 gain_range:65.00 tx_gain:0.00 [HW]   USRP TX_GAIN:65.00 gain_range:65.00 tx_gain:0.00 [HW]   Actual master clock: 122.880000MHz... [HW]   Actual clock source internal... [HW]   Actual time source internal... [HW]   setting rx channel 0 [HW]   setting rx channel 1 [WARNING] [0/Radio#0] Attempting to set tick rate to 0. Skipping. [HW]   RF board max packet size 368, size for 100µs jitter 6144 [HW]   rx_max_num_samps 368 [WARNING] [0/Radio#0] Attempting to set tick rate to 0. Skipping. [HW]   RX Channel 0 [HW]     Actual RX sample rate: 61.440000MSps... [HW]     Actual RX frequency: 3.319680GHz... [HW]     Actual RX gain: 75.000000... [HW]     Actual RX bandwidth: 100.000000M... [HW]     Actual RX antenna: RX2... [HW]   RX Channel 1 [HW]     Actual RX sample rate: 61.440000MSps... [HW]     Actual RX frequency: 3.319680GHz... [HW]     Actual RX gain: 75.000000... [HW]     Actual RX bandwidth: 100.000000M... [HW]     Actual RX antenna: RX2... [HW]   TX Channel 0 [HW]     Actual TX sample rate: 61.440000MSps... [HW]     Actual TX frequency: 3.319680GHz... [HW]     Actual TX gain: 65.000000... [HW]     Actual TX bandwidth: 100.000000M... [HW]     Actual TX antenna: TX/RX... [HW]     Actual TX packet size: 368 [HW]   TX Channel 1 [HW]     Actual TX sample rate: 61.440000MSps... [HW]     Actual TX frequency: 3.319680GHz... [HW]     Actual TX gain: 65.000000... [HW]     Actual TX bandwidth: 100.000000M... [HW]     Actual TX antenna: TX/RX... [HW]     Actual TX packet size: 368 Using Device: Single USRP:  Device: N300-Series Device  Mboard 0: n310  RX Channel: 0    RX DSP: 0    RX Dboard: A    RX Subdev: Magnesium  RX Channel: 1    RX DSP: 1    RX Dboard: A    RX Subdev: Magnesium  RX Channel: 2    RX DSP: 2    RX Dboard: B    RX Subdev: Magnesium  RX Channel: 3    RX DSP: 3    RX Dboard: B    RX Subdev: Magnesium  TX Channel: 0    TX DSP: 0    TX Dboard: A    TX Subdev: Magnesium  TX Channel: 1    TX DSP: 1    TX Dboard: A    TX Subdev: Magnesium  TX Channel: 2    TX DSP: 2    TX Dboard: B    TX Subdev: Magnesium  TX Channel: 3    TX DSP: 3    TX Dboard: B    TX Subdev: Magnesium [HW]   Device timestamp: 0.177981... [HW]   [RAU] has loaded USRP N300 device. setup_RU_buffers: frame_parms = 0x7ffff782d010 [PHY]   RU 0 Setting N_TA_offset to 800 samples (factor 2.000000, UL Freq 3300600, N_RB 106, mu 1) [PHY]   Signaling main thread that RU 0 is ready, sl_ahead 6 waiting for sync (ru_thread,-1/0x555556ad20b4,0x555557329fa0,0x555557329f60) RC.ru_mask:00 [PHY]   RUs configured ALL RUs READY! RC.nb_RU:1 ALL RUs ready - init gNBs Not NFAPI mode - call init_eNB_afterRU() [PHY]   init_eNB_afterRU() RC.nb_nr_inst:1 [PHY]   RC.nb_nr_CC[inst:0]:0x7ffff7469010 [PHY]   [gNB 0] phy_init_nr_gNB() About to wait for gNB to be configured [LIBCONFIG] loader.dfts: 2/2 parameters successfully set, (1 to default value) shlib_path libdfts.so [LOADER] library libdfts.so successfully loaded [LIBCONFIG] loader.ldpc: 2/2 parameters successfully set, (1 to default value) shlib_path libldpc.so [LOADER] library libldpc.so successfully loaded [PHY]   Initialise nr transport [PHY]   Mapping RX ports from 1 RUs to gNB 0 [PHY]   gNB->num_RU:1 [PHY]   Attaching RU 0 antenna 0 to gNB antenna 0 [PHY]   Attaching RU 0 antenna 1 to gNB antenna 1 create a thread for core -1 [UTIL]   Creating thread Tpool0_-1 with affinity -1 and priority 50 [Detaching after vfork from child process 1195082] [New Thread 0x7fff8cc13640 (LWP 1195084)] create a thread for core -1 [UTIL]   Creating thread Tpool1_-1 with affinity -1 and priority 50 [Detaching after vfork from child process 1195085] [New Thread 0x7fff8c412640 (LWP 1195087)] create a thread for core -1 [UTIL]   Creating thread Tpool2_-1 with affinity -1 and priority 50 [Detaching after vfork from child process 1195088] [New Thread 0x7fff8bc11640 (LWP 1195090)] create a thread for core -1 [UTIL]   Creating thread Tpool3_-1 with affinity -1 and priority 50 [Detaching after vfork from child process 1195091] [New Thread 0x7fff8b410640 (LWP 1195093)] create a thread for core -1 [UTIL]   Creating thread Tpool4_-1 with affinity -1 and priority 50 [Detaching after vfork from child process 1195094] [New Thread 0x7fff8ac0f640 (LWP 1195096)] create a thread for core -1 [UTIL]   Creating thread Tpool5_-1 with affinity -1 and priority 50 [Detaching after vfork from child process 1195097] [New Thread 0x7fff8a40e640 (LWP 1195099)] create a thread for core -1 [UTIL]   Creating thread Tpool6_-1 with affinity -1 and priority 50 [Detaching after vfork from child process 1195100] [New Thread 0x7fff89c0d640 (LWP 1195102)] create a thread for core -1 [UTIL]   Creating thread Tpool7_-1 with affinity -1 and priority 50 [Detaching after vfork from child process 1195103] [New Thread 0x7fff8940c640 (LWP 1195105)] [PHY]   Creating thread for TX reordering and dispatching to RU [UTIL]   Creating thread thread_tx_reorder with affinity -1 and priority 97 [Detaching after vfork from child process 1195106] [New Thread 0x7fff85ad3640 (LWP 1195108)] [UTIL]   Creating thread L1_stats with affinity -1 and priority 1 [Detaching after vfork from child process 1195109] [New Thread 0x7fff852d2640 (LWP 1195111)] waiting for sync (L1_stats_thread,-1/0x555556ad20b4,0x555557329fa0,0x555557329f60) ALL RUs ready - ALL gNBs ready Sending sync to all threads Entering ITTI signals handler TYPE <CTRL-C> TO TERMINATE got sync (L1_stats_thread) got sync (ru_thread) [HW]   current pps at 1.000000, starting streaming at 2.000000 [PHY]   RU 0 rf device ready [PHY]   RU 0 RF started opp_enabled 0 sleep... sleep... sleep... sleep... sleep... sleep... sleep... sleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... Osleep... sleep... O Thread 9 "ru_thread" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffef7fe640 (LWP 1292168)] __memmove_avx_unaligned_erms() at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:540 540     ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such file or directory. (gdb) bt #0 __memmove_avx_unaligned_erms() at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:540 #1 0x00007fffe1ced9bfin uhd::transport::rx_streamer_impl<uhd::rfnoc::chdr_rx_data_xport, false>::recv(uhd::ref_vector<void*> const&, unsigned long, uhd::rx_metadata_t&, double, bool)() from /usr/local/lib/libuhd.so.4.4.0 #2 0x00007fffe29c762bin trx_usrp_read(device=0x55555a1d9700, ptimestamp=0x7fffef7fd2c8, buff=0x7fffef7fd1d0, nsamps=30720, cc=2) at /home/nornetpp/src/openairinterface5g/radio/USRP/usrp_lib.cpp:757 #3 0x0000555555f8a235in rx_rf(ru=0x55555a1d9280, frame=0x7fffef7fd7e8, slot=0x7fffef7fd7e4) at /home/nornetpp/src/openairinterface5g/executables/nr-ru.c:655 #4 0x0000555555f95434in ru_thread(param=0x55555a1d9280) at /home/nornetpp/src/openairinterface5g/executables/nr-ru.c:1257 #5 0x00007ffff7294b43in start_thread(arg=<optimized out>) at ./nptl/pthread_create.c:442 #6 0x00007ffff7326a00in clone3() at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81 (gdb) where full #0 __memmove_avx_unaligned_erms() at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:540 No locals. #1 0x00007fffe1ced9bfin uhd::transport::rx_streamer_impl<uhd::rfnoc::chdr_rx_data_xport, false>::recv(uhd::ref_vector<void*> const&, unsigned long, uhd::rx_metadata_t&, double, bool)() from /usr/local/lib/libuhd.so.4.4.0 No symbol table info available. #2 0x00007fffe29c762bin trx_usrp_read(device=0x55555a1d9700, ptimestamp=0x7fffef7fd2c8, buff=0x7fffef7fd1d0, nsamps=30720, cc=2) at /home/nornetpp/src/openairinterface5g/radio/USRP/usrp_lib.cpp:757 buff_ptrs= std::vector of length 2, capacity 2 = {0x7ffff000f860, 0x7ffff002d860} s= 0x7fffdc094aa0 samples_received= 272233 nsamps2= 3840 buff_tmp= <error reading variable buff_tmp (value requires 245760 bytes, which is more than max-value-size)> (gdb) but full Undefined command: "but".  Try "help". (gdb) bt full #0 __memmove_avx_unaligned_erms() at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:540 No locals. #1 0x00007fffe1ced9bfin uhd::transport::rx_streamer_impl<uhd::rfnoc::chdr_rx_data_xport, false>::recv(uhd::ref_vector<void*> const&, unsigned long, uhd::rx_metadata_t&, double, bool)() from /usr/local/lib/libuhd.so.4.4.0 No symbol table info available. #2 0x00007fffe29c762bin trx_usrp_read(device=0x55555a1d9700, ptimestamp=0x7fffef7fd2c8, buff=0x7fffef7fd1d0, nsamps=30720, cc=2) at /home/nornetpp/src/openairinterface5g/radio/USRP/usrp_lib.cpp:757 buff_ptrs= std::vector of length 2, capacity 2 = {0x7ffff000f860, 0x7ffff002d860} s= 0x7fffdc094aa0 samples_received= 272233 nsamps2= 3840 buff_tmp= <error reading variable buff_tmp (value requires 245760 bytes, which is more than max-value-size)> read_count= 0 rxshift= 2 __FUNCTION__= "trx_usrp_read" recPlay= 0x7fffdc184b30 #3 0x0000555555f8a235in rx_rf(ru=0x55555a1d9280, frame=0x7fffef7fd7e8, slot=0x7fffef7fd7e4) at /home/nornetpp/src/openairinterface5g/executables/nr-ru.c:655 proc= 0x55555a1daeb0 fp= 0x7ffff782d010 cfg= 0x55555a1d9db8 rxp= {0x7fffee0f2040, 0x7fffede99040} rxs= 4146746579 i= 2 samples_per_slot= 30720 samples_per_slot_prev= 32767 ts= 140737211524672 old_ts= 0 __FUNCTION__= "rx_rf" gps_sec= 6.9533421303430063e-310 #4 0x0000555555f95434in ru_thread(param=0x55555a1d9280) at /home/nornetpp/src/openairinterface5g/executables/nr-ru.c:1257 sl= 0 absslot_rx= 0 rt_prof_idx= 0 slot_type= 0 --Type <RET> for more, q to quit, c to continue without paging-- ru_thread_status= 0 ru= 0x55555a1d9280 proc= 0x55555a1daeb0 fp= 0x7ffff782d010 gNB= 0x7ffff7469010 ret= 0 slot= 0 frame= 0 threadname= "ru_thread 0", '\000' <repeats 28 times> initial_wait= 0 opp_enabled0= 0 cfg= 0x55555a1d9378 __FUNCTION__= "ru_thread" syncMsg= 0x0 res= 0x0 slot_start= {tv_sec= 1182185, tv_nsec= 141695065} slot_duration= {tv_sec= 0, tv_nsec= 500000} #5 0x00007ffff7294b43in start_thread(arg=<optimized out>) at ./nptl/pthread_create.c:442 ret= <optimized out> pd= <optimized out> out= <optimized out> unwind_buf= {cancel_jmp_buf= {{jmp_buf= {4294967295, -2513490550454601873, 140737211524672, 0, 140737340065872, 140737488343888, -2513490550927509649, -2513438483471124625}, mask_was_saved= 0}}, priv= {pad= {0x0, 0x0, 0x0, 0x0}, data= {prev= 0x0, cleanup= 0x0, canceltype= 0}}} not_first_call= <optimized out> #6 0x00007ffff7326a00in clone3() at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81 No locals. (gdb) The N310 is of course reachable on both fibre ports as well as on the copper port, i.e. ping to all IP addresses is working. The MTU on the fibre ports is properly configured to 9000 as well. The N310 firmware is up-to-date. OAI compiled with: 1. Trial #1: cd ~/src/openairinterface5g source oaienv ./cmake_targets/build_oai -w USRP -c --eNB --gNB --run-with-gdb RelWithDebInfo 2. Trial #2: cd ~/src/openairinterface5g source oaienv export BUILD_UHD_FROM_SOURCE=True export UHD_VERSION=4.4.0.0   # (also tried different versions here) ./cmake_targets/build_oai -I -w USRP ./cmake_targets/build_oai -w USRP -c --eNB --gNB --run-with-gdb RelWithDebInfo 3. Also tried with Debug instead of RelWithDebInfo The problem is reproducible, i.e. I can easily provide further details if necessary. -- Best regards / Mit freundlichen Grüßen / Med vennlig hilsen ======================================================================= Thomas Dreibholz SimulaMet — Simula Metropolitan Centre for Digital Engineering Centre for Resilient Networks and Applications Pilestredet 52 0167 Oslo, Norway ----------------------------------------------------------------------- E-Mail:dreibh@simula.no Homepage:http://simula.no/people/dreibh =======================================================================
TD
Thomas Dreibholz
Wed, Sep 13, 2023 9:32 AM

Hi,

the issue occurs in this code (radio/USRP/usrp_lib.cpp of OAI), in the
red-marked line (line 757):

 samples_received=0;
while(samples_received != nsamps) {

if(cc>1) {
// receive multiple channels (e.g. RF A and RF B)
     std::vector<void*> buff_ptrs;

for(inti=0; i<cc; i++) buff_ptrs.push_back(buff_tmp[i]+samples_received);
*samples_received += s->rx_stream->recv(buff_ptrs, nsamps, s->rx_md); *
}else{
// receive a single channel (e.g. from connector RF A)

     samples_received +=
s->rx_stream->recv((void*)((int32_t*)buff_tmp[0]+samples_received),
                                            nsamps-samples_received,
s->rx_md);
}
if ((s->wait_for_first_pps == 0) &&
(s->rx_md.error_code!=uhd::rx_metadata_t::ERROR_CODE_NONE))
break;

if((s->wait_for_first_pps == 1) && (samples_received != nsamps)) {
     printf("sleep...\n"); //usleep(100);
}
}

Reading the code, it seems to be for reading N channels and reading 1
channel. For reading 1 channel, the length given to s->rx_stream->recv
is nsamps-samples_received. However, for reading N channels, the length
is always nsamps. Since the buffer may have already been incremented by
samples_received > 0, this leads to overwriting the stack. So, this is
very likely a bug in libuhd.

Changing the code by:

      for (int i=0; i<cc; i++)
buff_ptrs.push_back(buff_tmp[i]+samples_received);

  •      samples_received += s->rx_stream->recv(buff_ptrs, nsamps, s->rx_md);
  •      samples_received += s->rx_stream->recv(buff_ptrs,
    nsamps-samples_received, s->rx_md);
        } else {

lets nr-softmodem proceed without segfault. But then, it prints a lot of
these lines:

[PHY]   rx_rf: Asked for 30720 samples, got 20941 from USRP
[PHY]   problem receiving samples
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLO[HW]
  [recv] received 20941 samples out of 30720
[HW]   Time: 4.35875 s
ERROR_CODE_OVERFLOW (Overflow)

[PHY]   rx_rf: Asked for 30720 samples, got 20941 from USRP
[PHY]   problem receiving samples
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLO[HW]
  [recv] received 20941 samples out of 30720
[HW]   Time: 4.41057 s
ERROR_CODE_OVERFLOW (Overflow)
...

On 9/13/23 10:55, Thomas Dreibholz wrote:

I am trying to get OAI's nr-softmodem to run with an Ettus URSP N310,
using
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf
with just having adapted the IP addresses of the core and device.
Regardless of trying with UHD 4.1 to 4.4, and regardless of the tags
for OAI used (latest tried: 2023.w36), running nr-softmodem
reproducibly segfaults after a few seconds in libuhd:

--
Best regards / Mit freundlichen Grüßen / Med vennlig hilsen


---=====
Thomas Dreibholz

SimulaMet — Simula Metropolitan Centre for Digital Engineering
Centre for Resilient Networks and Applications
Pilestredet 52
0167 Oslo, Norway

E-Mail:dreibh@simula.no
Homepage:http://simula.no/people/dreibh


---=====

Hi, the issue occurs in this code (radio/USRP/usrp_lib.cpp of OAI), in the red-marked line (line 757):  samples_received=0; while(samples_received != nsamps) { if(cc>1) { // receive multiple channels (e.g. RF A and RF B)      std::vector<void*> buff_ptrs; for(inti=0; i<cc; i++) buff_ptrs.push_back(buff_tmp[i]+samples_received); *samples_received += s->rx_stream->recv(buff_ptrs, nsamps, s->rx_md); * }else{ // receive a single channel (e.g. from connector RF A)      samples_received += s->rx_stream->recv((void*)((int32_t*)buff_tmp[0]+samples_received),                                             nsamps-samples_received, s->rx_md); } if ((s->wait_for_first_pps == 0) && (s->rx_md.error_code!=uhd::rx_metadata_t::ERROR_CODE_NONE)) break; if((s->wait_for_first_pps == 1) && (samples_received != nsamps)) {      printf("sleep...\n"); //usleep(100); } } Reading the code, it seems to be for reading N channels and reading 1 channel. For reading 1 channel, the length given to s->rx_stream->recv is nsamps-samples_received. However, for reading N channels, the length is always nsamps. Since the buffer may have already been incremented by samples_received > 0, this leads to overwriting the stack. So, this is very likely a bug in libuhd. Changing the code by:       for (int i=0; i<cc; i++) buff_ptrs.push_back(buff_tmp[i]+samples_received); -      samples_received += s->rx_stream->recv(buff_ptrs, nsamps, s->rx_md); +      samples_received += s->rx_stream->recv(buff_ptrs, nsamps-samples_received, s->rx_md);     } else { lets nr-softmodem proceed without segfault. But then, it prints a lot of these lines: [PHY]   rx_rf: Asked for 30720 samples, got 20941 from USRP [PHY]   problem receiving samples LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLO[HW]   [recv] received 20941 samples out of 30720 [HW]   Time: 4.35875 s ERROR_CODE_OVERFLOW (Overflow) [PHY]   rx_rf: Asked for 30720 samples, got 20941 from USRP [PHY]   problem receiving samples LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLO[HW]   [recv] received 20941 samples out of 30720 [HW]   Time: 4.41057 s ERROR_CODE_OVERFLOW (Overflow) ... On 9/13/23 10:55, Thomas Dreibholz wrote: > I am trying to get OAI's nr-softmodem to run with an Ettus URSP N310, > using > targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf > with just having adapted the IP addresses of the core and device. > Regardless of trying with UHD 4.1 to 4.4, and regardless of the tags > for OAI used (latest tried: 2023.w36), running nr-softmodem > reproducibly segfaults after a few seconds in libuhd: -- Best regards / Mit freundlichen Grüßen / Med vennlig hilsen ======================================================================= Thomas Dreibholz SimulaMet — Simula Metropolitan Centre for Digital Engineering Centre for Resilient Networks and Applications Pilestredet 52 0167 Oslo, Norway ----------------------------------------------------------------------- E-Mail:dreibh@simula.no Homepage:http://simula.no/people/dreibh =======================================================================
MD
Marcus D. Leech
Wed, Sep 13, 2023 1:25 PM

On 13/09/2023 05:32, Thomas Dreibholz wrote:

Hi,

the issue occurs in this code (radio/USRP/usrp_lib.cpp of OAI), in the
red-marked line (line 757):

 samples_received=0;
while(samples_received != nsamps) {

if(cc>1) {
// receive multiple channels (e.g. RF A and RF B)
     std::vector<void*> buff_ptrs;

for(inti=0; i<cc; i++) buff_ptrs.push_back(buff_tmp[i]+samples_received);
*samples_received += s->rx_stream->recv(buff_ptrs, nsamps, s->rx_md); *
}else{
// receive a single channel (e.g. from connector RF A)

     samples_received +=
s->rx_stream->recv((void*)((int32_t*)buff_tmp[0]+samples_received),
                                            nsamps-samples_received,
s->rx_md);
}
if ((s->wait_for_first_pps == 0) &&
(s->rx_md.error_code!=uhd::rx_metadata_t::ERROR_CODE_NONE))
break;

if((s->wait_for_first_pps == 1) && (samples_received != nsamps)) {
     printf("sleep...\n"); //usleep(100);
}
}

Reading the code, it seems to be for reading N channels and reading 1
channel. For reading 1 channel, the length given to s->rx_stream->recv
is nsamps-samples_received. However, for reading N channels, the
length is always nsamps. Since the buffer may have already been
incremented by samples_received > 0, this leads to overwriting the
stack. So, this is very likely a bug in libuhd.

Changing the code by:

      for (int i=0; i<cc; i++)
buff_ptrs.push_back(buff_tmp[i]+samples_received);

  •      samples_received += s->rx_stream->recv(buff_ptrs, nsamps,
    s->rx_md);
  •      samples_received += s->rx_stream->recv(buff_ptrs,
    nsamps-samples_received, s->rx_md);
        } else {

lets nr-softmodem proceed without segfault. But then, it prints a lot
of these lines:

[PHY]   rx_rf: Asked for 30720 samples, got 20941 from USRP
[PHY]   problem receiving samples
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLO[HW]
  [recv] received 20941 samples out of 30720
[HW]   Time: 4.35875 s
ERROR_CODE_OVERFLOW (Overflow)

[PHY]   rx_rf: Asked for 30720 samples, got 20941 from USRP
[PHY]   problem receiving samples
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLO[HW]
  [recv] received 20941 samples out of 30720
[HW]   Time: 4.41057 s
ERROR_CODE_OVERFLOW (Overflow)
...

On 9/13/23 10:55, Thomas Dreibholz wrote:

I am trying to get OAI's nr-softmodem to run with an Ettus URSP N310,
using
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf
with just having adapted the IP addresses of the core and device.
Regardless of trying with UHD 4.1 to 4.4, and regardless of the tags
for OAI used (latest tried: 2023.w36), running nr-softmodem
reproducibly segfaults after a few seconds in libuhd:

--
Best regards / Mit freundlichen Grüßen / Med vennlig hilsen


---=====
Thomas Dreibholz

SimulaMet — Simula Metropolitan Centre for Digital Engineering
Centre for Resilient Networks and Applications
Pilestredet 52
0167 Oslo, Norway

E-Mail:dreibh@simula.no
Homepage:http://simula.no/people/dreibh


---=====


USRP-users mailing list --usrp-users@lists.ettus.com
To unsubscribe send an email tousrp-users-leave@lists.ettus.com

Unless I'm badly mistaken, this IS NOT a bug in UHD, but rather a bug in
nr-softmodem--it's mis-managing its buffer pointers.
  Nothing that UHD can do about that.  C++ doesn't have run-time bounds
checking.

On 13/09/2023 05:32, Thomas Dreibholz wrote: > Hi, > > the issue occurs in this code (radio/USRP/usrp_lib.cpp of OAI), in the > red-marked line (line 757): > >  samples_received=0; > while(samples_received != nsamps) { > > if(cc>1) { > // receive multiple channels (e.g. RF A and RF B) >      std::vector<void*> buff_ptrs; > > for(inti=0; i<cc; i++) buff_ptrs.push_back(buff_tmp[i]+samples_received); > *samples_received += s->rx_stream->recv(buff_ptrs, nsamps, s->rx_md); * > }else{ > // receive a single channel (e.g. from connector RF A) > >      samples_received += > s->rx_stream->recv((void*)((int32_t*)buff_tmp[0]+samples_received), >                                             nsamps-samples_received, > s->rx_md); > } > if ((s->wait_for_first_pps == 0) && > (s->rx_md.error_code!=uhd::rx_metadata_t::ERROR_CODE_NONE)) > break; > > if((s->wait_for_first_pps == 1) && (samples_received != nsamps)) { >      printf("sleep...\n"); //usleep(100); > } > } > > Reading the code, it seems to be for reading N channels and reading 1 > channel. For reading 1 channel, the length given to s->rx_stream->recv > is nsamps-samples_received. However, for reading N channels, the > length is always nsamps. Since the buffer may have already been > incremented by samples_received > 0, this leads to overwriting the > stack. So, this is very likely a bug in libuhd. > > Changing the code by: > >       for (int i=0; i<cc; i++) > buff_ptrs.push_back(buff_tmp[i]+samples_received); > -      samples_received += s->rx_stream->recv(buff_ptrs, nsamps, > s->rx_md); > +      samples_received += s->rx_stream->recv(buff_ptrs, > nsamps-samples_received, s->rx_md); >     } else { > > lets nr-softmodem proceed without segfault. But then, it prints a lot > of these lines: > > [PHY]   rx_rf: Asked for 30720 samples, got 20941 from USRP > [PHY]   problem receiving samples > LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLO[HW] >   [recv] received 20941 samples out of 30720 > [HW]   Time: 4.35875 s > ERROR_CODE_OVERFLOW (Overflow) > > [PHY]   rx_rf: Asked for 30720 samples, got 20941 from USRP > [PHY]   problem receiving samples > LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLO[HW] >   [recv] received 20941 samples out of 30720 > [HW]   Time: 4.41057 s > ERROR_CODE_OVERFLOW (Overflow) > ... > > > On 9/13/23 10:55, Thomas Dreibholz wrote: >> I am trying to get OAI's nr-softmodem to run with an Ettus URSP N310, >> using >> targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf >> with just having adapted the IP addresses of the core and device. >> Regardless of trying with UHD 4.1 to 4.4, and regardless of the tags >> for OAI used (latest tried: 2023.w36), running nr-softmodem >> reproducibly segfaults after a few seconds in libuhd: > -- > Best regards / Mit freundlichen Grüßen / Med vennlig hilsen > > ======================================================================= > Thomas Dreibholz > > SimulaMet — Simula Metropolitan Centre for Digital Engineering > Centre for Resilient Networks and Applications > Pilestredet 52 > 0167 Oslo, Norway > ----------------------------------------------------------------------- > E-Mail:dreibh@simula.no > Homepage:http://simula.no/people/dreibh > ======================================================================= > > _______________________________________________ > USRP-users mailing list --usrp-users@lists.ettus.com > To unsubscribe send an email tousrp-users-leave@lists.ettus.com Unless I'm badly mistaken, this IS NOT a bug in UHD, but rather a bug in nr-softmodem--it's mis-managing its buffer pointers.   Nothing that UHD can do about that.  C++ doesn't have run-time bounds checking.
TD
Thomas Dreibholz
Wed, Sep 13, 2023 1:29 PM

Hi,

indeed, this is a bug in OpenAirInterface. I already filed a bug report
with fix there:
https://gitlab.eurecom.fr/oai/openairinterface5g/-/issues/681 . The
proposed fix seems to work.

On 9/13/23 15:25, Marcus D. Leech wrote:

Unless I'm badly mistaken, this IS NOT a bug in UHD, but rather a bug
in nr-softmodem--it's mis-managing its buffer pointers.
  Nothing that UHD can do about that.  C++ doesn't have run-time
bounds checking.

--
Best regards / Mit freundlichen Grüßen / Med vennlig hilsen


---=====
Thomas Dreibholz

SimulaMet — Simula Metropolitan Centre for Digital Engineering
Centre for Resilient Networks and Applications
Pilestredet 52
0167 Oslo, Norway

E-Mail:    dreibh@simula.no
Homepage:  http://simula.no/people/dreibh


---=====

Hi, indeed, this is a bug in OpenAirInterface. I already filed a bug report with fix there: https://gitlab.eurecom.fr/oai/openairinterface5g/-/issues/681 . The proposed fix seems to work. On 9/13/23 15:25, Marcus D. Leech wrote: > Unless I'm badly mistaken, this IS NOT a bug in UHD, but rather a bug > in nr-softmodem--it's mis-managing its buffer pointers. >   Nothing that UHD can do about that.  C++ doesn't have run-time > bounds checking. -- Best regards / Mit freundlichen Grüßen / Med vennlig hilsen ======================================================================= Thomas Dreibholz SimulaMet — Simula Metropolitan Centre for Digital Engineering Centre for Resilient Networks and Applications Pilestredet 52 0167 Oslo, Norway ----------------------------------------------------------------------- E-Mail: dreibh@simula.no Homepage: http://simula.no/people/dreibh =======================================================================
MD
Marcus D. Leech
Wed, Sep 13, 2023 2:30 PM

On 13/09/2023 09:29, Thomas Dreibholz wrote:

Hi,

indeed, this is a bug in OpenAirInterface. I already filed a bug
report with fix there:
https://gitlab.eurecom.fr/oai/openairinterface5g/-/issues/681 . The
proposed fix seems to work.

OK, it was this phrase you used here:

    "So, this is very likely a bug in libuhd"

That had me thinking you were reporting a bug in UHD (which, on many
systems, is contained in a package/library called libuhd)

On 9/13/23 15:25, Marcus D. Leech wrote:

Unless I'm badly mistaken, this IS NOT a bug in UHD, but rather a bug
in nr-softmodem--it's mis-managing its buffer pointers.
  Nothing that UHD can do about that.  C++ doesn't have run-time
bounds checking.


USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-leave@lists.ettus.com

On 13/09/2023 09:29, Thomas Dreibholz wrote: > Hi, > > indeed, this is a bug in OpenAirInterface. I already filed a bug > report with fix there: > https://gitlab.eurecom.fr/oai/openairinterface5g/-/issues/681 . The > proposed fix seems to work. > OK, it was this phrase you used here:     "So, this is very likely a bug in libuhd" That had me thinking you were reporting a bug in UHD (which, on many systems, is contained in a package/library called libuhd) > On 9/13/23 15:25, Marcus D. Leech wrote: >> Unless I'm badly mistaken, this IS NOT a bug in UHD, but rather a bug >> in nr-softmodem--it's mis-managing its buffer pointers. >>   Nothing that UHD can do about that.  C++ doesn't have run-time >> bounds checking. > > > _______________________________________________ > USRP-users mailing list -- usrp-users@lists.ettus.com > To unsubscribe send an email to usrp-users-leave@lists.ettus.com