1. 13 Aug, 2024 1 commit
    • Robert Schmidt's avatar
      Merge branch 'integration_2024_w32' into 'develop' · 871078a6
      Robert Schmidt authored
      Integration: `2024.w32`
      
      See merge request oai/openairinterface5g!2900
      
      * !2810 add harqid in wireshark traces, refactor the trace_pdu parameters
      * !2897 nr rlc: add a lock to protect access to time variables
      * !2903 remove some openair1 headers included in opeinair2 files
      * !2876 Enable 32 HARQ Processes in DL, UL
      * !2849 Fix UE SRS crash
      * !2898 Fix memory leaks in OAI gNB and OAI UE
      871078a6
  2. 12 Aug, 2024 14 commits
    • Jaroslava Fiedlerova's avatar
    • Jaroslava Fiedlerova's avatar
    • Jaroslava Fiedlerova's avatar
    • Jaroslava Fiedlerova's avatar
    • Jaroslava Fiedlerova's avatar
    • Jaroslava Fiedlerova's avatar
    • Guido Casati's avatar
      Cleanup of unused parallel/worker thread configuration in NR · 7c788be9
      Guido Casati authored
      * In LTE there is logic that checks the thread configurtion with the
        getters `get_thread_parallel_conf()` and `get_thread_worker_conf()`
        in NR these getters are not used, only setters, which have no impact
      7c788be9
    • Guido Casati's avatar
      Fix memory leak in do_NR_ULInformationTransfer · 14b7311b
      Guido Casati authored
      * buffer is allocated but not freed after use by PDCP
      
      > Direct leak of 192 byte(s) in 3 object(s) allocated from:
          > 0 0x7ffff74b4c38 in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:164
          > 1 0x55555775ee74 in encode_dyn_cb /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/per_encoder.c:23
          > 2 0x55555774776e in _uper_encode_flush_outp /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_encoder.c:126
          > 3 0x55555774776e in uper_encode /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_encoder.c:36
          > 4 0x555557747c91 in uper_encode_to_new_buffer /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_encoder.c:85
          > 5 0x5555576c5172 in do_NR_ULInformationTransfer /openair2/RRC/NR/MESSAGES/asn1_msg.c:965
          > 6 0x555556fba691 in rrc_nrue /openair2/RRC/NR_UE/rrc_UE.c:1819
          > 7 0x555556fc4d2e in rrc_nrue_task /openair2/RRC/NR_UE/rrc_UE.c:1717
          > 8 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
      14b7311b
    • Guido Casati's avatar
      Fix memory leak in nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message · aa8cf7c4
      Guido Casati authored
      * bcch_message is malloced by ASN.1 decoder and needs to be always freed after use along with its contents
      
      > Direct leak of 64 byte(s) in 1 object(s) allocated from:
         >0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
         >1 0x555557737ecd in SEQUENCE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:37
         >2 0x555557746f81 in uper_decode /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:83
         >3 0x5555577471fe in uper_decode_complete /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:16
         >4 0x555556f8b1c9 in nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message /openair2/RRC/NR_UE/rrc_UE.c:732
         >5 0x555556fbc365 in rrc_nrue /openair2/RRC/NR_UE/rrc_UE.c:1775
         >6 0x555556fc4c2e in rrc_nrue_task /openair2/RRC/NR_UE/rrc_UE.c:1718
         >7 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
      aa8cf7c4
    • Guido Casati's avatar
      Fix memory leak in nr-uesoftmodem · b1609e05
      Guido Casati authored
      * strdup is returning a malloced string that needs to freed after use
      
      > Direct leak of 90 byte(s) in 1 object(s) allocated from:
          >0 0x7ffff745b9a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
          >1 0x555556c7b341 in main /executables/nr-uesoftmodem.c:461
          >2 0x7ffff5e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
      b1609e05
    • Guido Casati's avatar
      Fix memory leak in nr_rrc_ue_decode_dcch · e8063159
      Guido Casati authored
      * local dl_dcch_msg shall be freed after use
      
      > Direct leak of 384 byte(s) in 6 object(s) allocated from:
          >0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
          >1 0x555557737ced in SEQUENCE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:37
          >2 0x555557746da1 in uper_decode /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:83
          >3 0x555556fa4b31 in nr_rrc_ue_decode_dcch /openair2/RRC/NR_UE/rrc_UE.c:1612
          >4 0x555556fbb25c in rrc_nrue /openair2/RRC/NR_UE/rrc_UE.c:1792
          >5 0x555556fc4a4e in rrc_nrue_task /openair2/RRC/NR_UE/rrc_UE.c:1718
          >6 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
      e8063159
    • Guido Casati's avatar
      Fix direct leak of memory allocate by deliver_sdu_srb with itti_malloc · 3d2b32ac
      Guido Casati authored
      * The RRC task is freeing the ITTI message but the message members that are allocated separetely still need to be freed
      
      > Direct leak of 470 byte(s) in 6 object(s) allocated from:
          >0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
          >1 0x55555721f117 in itti_malloc /common/utils/ocp_itti/intertask_interface.cpp:64
          >2 0x555556f2356c in deliver_sdu_srb /openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c:775
          >3 0x555556f4e10e in nr_pdcp_entity_recv_pdu /openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c:184
          >4 0x555556f278ad in do_pdcp_data_ind /openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c:285
          >5 0x555556f278ad in pdcp_data_ind_thread /openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c:307
          >6 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
      3d2b32ac
    • Guido Casati's avatar
      Fix strdup-related memory leak in nr-softmodem · a59a69d5
      Guido Casati authored
      * strdup is returning a malloced string which needs to be freed after use
      
      > Direct leak of 90 byte(s) in 1 object(s) allocated from:
      	> 0 0x7ffff745b9a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
      	> 1 0x5555591598a3 in main /executables/nr-softmodem.c:667
      	> 2 0x7ffff5e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
      a59a69d5
    • Guido Casati's avatar
      Fix memory leak in NR UE nr_rrc_ue_process_ueCapabilityEnquiry · 6435ed30
      Guido Casati authored
      * allocate memory in heap for the struct ue_CapabilityRAT_Container used locally for buffer encoding
      * free the struct members only for the ul_dcch_msg allocated on the stack
      
      > Direct leak of 40 byte(s) in 1 object(s) allocated from:
          > 0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
          > 1 0x555556f7a89f in nr_rrc_ue_process_ueCapabilityEnquiry /openair2/RRC/NR_UE/rrc_UE.c:1861
          > 2 0x555556fa4d85 in nr_rrc_ue_decode_dcch /openair2/RRC/NR_UE/rrc_UE.c:1650
          > 3 0x555556fbb33c in rrc_nrue /openair2/RRC/NR_UE/rrc_UE.c:1790
          > 4 0x555556fc4b2e in rrc_nrue_task /openair2/RRC/NR_UE/rrc_UE.c:1716
          > 5 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
      6435ed30
  3. 09 Aug, 2024 1 commit
  4. 08 Aug, 2024 3 commits
    • Guido Casati's avatar
      fb554dc6
    • Guido Casati's avatar
      Fix memory leak in RCconfig_nr_parallel · 6e7ea5ce
      Guido Casati authored
      * strdup() function is returning a malloced string
        which must be freed after use
      * replace the strdup with direct use of strings to avoid heap allocation
      
      > Direct leak of 23 byte(s) in 1 object(s) allocated from:
          > 0 0x7ffff745b9a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
          > 1 0x555559e36f87 in RCconfig_nr_parallel /openair2/GNB_APP/gnb_config.c:2054
          > 2 0x555559e38ea3 in NRRCConfig /openair2/GNB_APP/gnb_config.c:2097
          > 3 0x555559155542 in get_options /executables/nr-softmodem.c:423
          > 4 0x555559155542 in main /executables/nr-softmodem.c:623
          > 5 0x7ffff5e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
      
      > Direct leak of 14 byte(s) in 1 object(s) allocated from:
          > 0 0x7ffff745b9a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
          > 1 0x555559e370c5 in RCconfig_nr_parallel /openair2/GNB_APP/gnb_config.c:2063
          > 2 0x555559e38ea3 in NRRCConfig /openair2/GNB_APP/gnb_config.c:2097
          > 3 0x555559155542 in get_options /executables/nr-softmodem.c:423
          > 4 0x555559155542 in main /executables/nr-softmodem.c:623
          > 5 0x7ffff5e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
      6e7ea5ce
    • Raghavendra Dinavahi's avatar
      enable HARQ32, Changes in UE · dafaea7d
      Raghavendra Dinavahi authored
      	- num DL/UL harq processes, bits for harq id in DCIs, set according to IEs configured in RRC messages
      	- removed going through all the harq processes before triggering nr_ue_ulsch_procedures in phy_procedures_nr_ue.c
      	- did not remove usage of MAX_HARQ_PROCESSES in init phase
      dafaea7d
  5. 07 Aug, 2024 1 commit
    • Raghavendra Dinavahi's avatar
      enable HARQ32, Changes in gNB · 9726a47f
      Raghavendra Dinavahi authored
      	- Enabled configuration for number of dl, ul harq processes in conf file
      		- set "num_dlharq = 32; num_ulharq = 32;" under "gNBs" section in the conf file
      		- default values when not configured is 16 for DL, UL harq processes
      		- IEs in the RRC messages set according to the number of DL, UL harq processes configured.
      		- If value 32 is configured , then IEs related to num harq processes and dci bits also configured in Bandwidth parts.
      9726a47f
  6. 06 Aug, 2024 2 commits
    • Raghavendra Dinavahi's avatar
      enable HARQ32, Changes common to gNB and UE · e586efb2
      Raghavendra Dinavahi authored
      	- MAX HARQ PROCESSES set to 32
      	- for PDSCH - default setting in OAI is 16, according to 3GPP rel17 38.331 these are the possible configs
      		- if no IES are defined then 8
      		- if nrofHARQ-ProcessesForPDSCH is defined then these values-  {n2, n4, n6, n10, n12, n16}
      		- if nrofHARQ-ProcessesForPDSCH-v1700 is defined then 32
      		- for harq bits in DCI
      			- DCI 1_0 - 4 bits spec 38.212, section 7.3.1.2.1
      			- DCI 1_1 - 4/5 bits according to IE harq-ProcessNumberSizeDCI-1-1, spec 38.212, section 7.3.1.2.2
      	- for PUSCH - default setting in OAI is 16, according to 3GPP rel17 38.331 these are possible configs
                      - if no IES are defined then 16
                      - if nrofHARQ-ProcessesForPUSCH-v1700 is defined then 32
                      - for harq bits in DCI
                              - DCI 0_0 - 4 bits spec 38.212, section 7.3.1.1.1
                              - DCI 0_1 - 4/5 bits according to IE harq-ProcessNumberSizeDCI-0-1, spec 38.212, section 7.3.1.1.2
      	- FOR HARQ32 , DCI 1_1, DCI 0_1 should be configured in UE dedicated search space. In OAI it is set.
      e586efb2
    • Cedric Roux's avatar
      nr rlc: add a lock to protect access to time variables · b22891d4
      Cedric Roux authored
      ThreadSanitizer reported a data race, let's remove it.
      
      Here is the warning.
      
      WARNING: ThreadSanitizer: data race (pid=7361)
        Write of size 8 at 0x000003b42770 by thread T22 (mutexes: write M0):
          #0 nr_rlc_tick /home/richie/openairinterface5g/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c:1101 (nr-softmodem+0x107d275) (BuildId: 291c846fc591e10c3838e9c53f4738997de8f984)
          #1 gNB_dlsch_ulsch_scheduler /home/richie/openairinterface5g/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c:220 (nr-softmodem+0xaec72a) (BuildId: 291c846fc591e10c3838e9c53f4738997de8f984)
          #2 run_scheduler /home/richie/openairinterface5g/openair2/NR_PHY_INTERFACE/NR_IF_Module.c:406 (nr-softmodem+0xad8515) (BuildId: 291c846fc591e10c3838e9c53f4738997de8f984)
          #3 tx_func /home/richie/openairinterface5g/executables/nr-gnb.c:134 (nr-softmodem+0x7002cc) (BuildId: 291c846fc591e10c3838e9c53f4738997de8f984)
          #4 L1_tx_thread /home/richie/openairinterface5g/executables/nr-gnb.c:197 (nr-softmodem+0x7002cc)
      
        Previous read of size 8 at 0x000003b42770 by thread T2 (mutexes: write M1):
          #0 rlc_data_req /home/richie/openairinterface5g/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c:348 (nr-softmodem+0x1076f4e) (BuildId: 291c846fc591e10c3838e9c53f4738997de8f984)
          #1 rlc_data_req_thread /home/richie/openairinterface5g/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c:139 (nr-softmodem+0xa671ce) (BuildId: 291c846fc591e10c3838e9c53f4738997de8f984)
      b22891d4
  7. 05 Aug, 2024 12 commits
  8. 02 Aug, 2024 6 commits