[srslte-users] Segmentation fault during LTE-UE Prach procedure

Liqun Liu lliu at w2bi.com
Fri Oct 6 21:15:14 UTC 2017


Pedro,


I hardcode the PLMN and UE start doing PRACH.


but unfortunately, it still has segmentation fault on the same spot as the previous version.


pased gdb output for reference


Home MCC 62225, Received MCC 62225
Home MNC 62592, Received MNC 62592
Found PLMN:  Id=311480, TAC=1
Select cell: PCI=19, EARFCN=5230, Cell ID=0x13
Random Access Transmission: seq=1, ra-rnti=0x4

------------------------------

Thread 9 "srsue_debug_oct" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffda294700 (LWP 23676)]
0x000000000052927a in srslte::sch_subh::get_payload_size (this=0x0) at /home/w2bi/CLionProjects/srsLTE/lib/src/common/pdu.cc:463
463      return nof_bytes;
(gdb) bt
#0  0x000000000052927a in srslte::sch_subh::get_payload_size (this=0x0) at /home/w2bi/CLionProjects/srsLTE/lib/src/common/pdu.cc:463
#1  0x0000000000528797 in srslte::sch_pdu::write_packet (this=0x7ffff1a61d10, log_h=0x7ffff1abf0b8) at /home/w2bi/CLionProjects/srsLTE/lib/src/common/pdu.cc:229
#2  0x00000000004eac5c in srsue::mux::pdu_get (this=0x7ffff1a61c00, payload=0x7ffff1a61c8b "", pdu_sz=117, tx_tti=0, pid=0) at /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/mux.cc:257
#3  0x00000000004eb4f9 in srsue::mux::msg3_get (this=0x7ffff1a61c00, payload=0x4d51600 "", pdu_sz=117) at /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/mux.cc:352
#4  0x00000000004e76af in srsue::ul_harq_entity<8ul, srsue::mac_interface_phy::mac_grant_t, srsue::mac_interface_phy::tb_action_ul_t, srslte_phy_grant_t>::ul_harq_process::run_tti (this=0x3177ce0,
    tti_tx=1585, grant=0x7fffda2935d0, action=0x7fffda293bd0) at /home/w2bi/CLionProjects/srsLTE/srsue/hdr/mac/ul_harq.h:231
#5  0x00000000004e5895 in srsue::ul_harq_entity<8ul, srsue::mac_interface_phy::mac_grant_t, srsue::mac_interface_phy::tb_action_ul_t, srslte_phy_grant_t>::run_tti (this=0x7ffff1a623e0, tti=1581,
    grant=0x7fffda2935d0, action=0x7fffda293bd0) at /home/w2bi/CLionProjects/srsLTE/srsue/hdr/mac/ul_harq.h:402
#6  0x00000000004e4bcf in srsue::ul_harq_entity<8ul, srsue::mac_interface_phy::mac_grant_t, srsue::mac_interface_phy::tb_action_ul_t, srslte_phy_grant_t>::new_grant_ul (this=0x7ffff1a623e0, grant=...,
    action=0x7fffda293bd0) at /home/w2bi/CLionProjects/srsLTE/srsue/hdr/mac/ul_harq.h:118
#7  0x00000000004e25c5 in srsue::mac::new_grant_ul (this=0x7ffff1a61a90, grant=..., action=0x7fffda293bd0) at /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/mac.cc:304
#8  0x00000000004fcd3a in srsue::phch_worker::work_imp (this=0x7ffff7ef4010) at /home/w2bi/CLionProjects/srsLTE/srsue/src/phy/phch_worker.cc:323
#9  0x000000000052dd0b in srslte::thread_pool::worker::run_thread (this=0x7ffff7ef4010) at /home/w2bi/CLionProjects/srsLTE/lib/src/common/thread_pool.cc:61
#10 0x00000000004bc696 in thread::thread_function_entry (_this=0x7ffff7ef4010) at /home/w2bi/CLionProjects/srsLTE/lib/include/srslte/common/threads.h:73
#11 0x00007ffff7bc16ba in start_thread (arg=0x7fffda294700) at pthread_create.c:333
#12 0x00007ffff61273dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
(gdb)




Liqun

________________________________
From: Pedro Alvarez <pinheirp at tcd.ie>
Sent: Friday, October 6, 2017 4:15:33 PM
To: srslte-users at lists.softwareradiosystems.com; Liqun Liu; Andre Puschmann
Subject: Segmentation fault during LTE-UE Prach procedure

Liqun,

Would you be so kind to do the following:

Go to srsue/src/upper/nas.cc and add the following code:

printf("Home MCC %d, Received MCC %d\n",home_plmn.mcc, plmn_id.mcc);
printf("Home MNC %d, Received MNC %d\n",home_plmn.mnc, plmn_id.mnc);

//Add the code just before these lines:
if (plmn_id.mcc == home_plmn.mcc && plmn_id.mnc == home_plmn.mnc) {
    rrc->plmn_select(plmn_id);
    selecting_plmn = plmn_id;
}

My *guess* is that your received MCC and MNC do not match the "home"
MCC and MNC. You never go into the if and you never do anything but
stay in the cell search.

You can see that the "home" MCC and MNC are hard-coded in the
nas::init function.
The quick and easy fix is to hard-code the home_plmn.mcc and
home_plmn.mnc in the nas::init() function so that it matches the
values you are receiving.

This is just a guess, let me know how you got along.

Cheers,
Pedro

> Date: Fri, 6 Oct 2017 21:02:58 +0200
> From: Andre Puschmann <andre.puschmann at softwareradiosystems.com>
> To: Liqun Liu <lliu at w2bi.com>,
>         "srslte-users at lists.softwareradiosystems.com"
>         <srslte-users at lists.softwareradiosystems.com>
> Subject: Re: [srslte-users] Segmentation fault during LTE-UE Prach
>         procedure
> Message-ID:
>         <46c2f4dc-9f91-8439-8723-b7bf74d7aaf5 at softwareradiosystems.com>
> Content-Type: text/plain; charset=windows-1252
>
> Hey,
>
> can you attach logs with PHY level set to info please.
>
> Thanks
> Andre
>
> On 06/10/17 20:39, Liqun Liu wrote:
>> Ismael,
>>
>>
>>
>> I tried the 17-09 version of lteue and get different result.
>>
>> In the older version, lteue will try to prach and get segmentation fault.
>>
>> In the 17-09 version, lteue
>>
>>
>>
>> Fount cell: PCI=19, PRB=50, Ports=2, CFO=-1.4 Khz
>>
>> Fount PLMN: Id=311480, TAC=1
>>
>>
>>
>>
>>
>> Log also shows lteue get mib and sib1. But it just go to the cell search
>> loop again and never try to do the PRACH procedure.
>>
>>
>>
>> Liqun
>>
>>
>>
>> *From:*Liqun Liu
>> *Sent:* Wednesday, October 04, 2017 9:55 AM
>> *To:* Ismael Gomez <ismael.gomez at softwareradiosystems.com>;
>> srslte-users at lists.softwareradiosystems.com
>> *Subject:* Re: [srslte-users] Segmentation fault during LTE-UE Prach
>> procedure
>>
>>
>>
>> Ismael,
>>
>>
>>
>> Sure. looking forward to test the new release.
>>
>> To add some background of test,
>>
>>
>>
>> LTE-UE attached to the Amarisoft enb. but crashed on a  commercial eNB.
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Liqun
>>
>> ------------------------------------------------------------------------
>>
>> *From:*Ismael Gomez <ismael.gomez at softwareradiosystems.com
>> <mailto:ismael.gomez at softwareradiosystems.com>>
>> *Sent:* Wednesday, October 4, 2017 6:19:02 AM
>> *To:* Liqun Liu; srslte-users at lists.softwareradiosystems.com
>> <mailto:srslte-users at lists.softwareradiosystems.com>
>> *Subject:* Re: [srslte-users] Segmentation fault during LTE-UE Prach
>> procedure
>>
>>
>>
>> Hi Li,
>>
>>
>>
>> We are going to release a new version this Friday. Probably the best is
>> to wait and see if the bug is still present with that new version.
>>
>>
>>
>> Thanks
>>
>>
>>
>> On Tue, 3 Oct 2017 at 23:00 Liqun Liu <lliu at w2bi.com
>> <mailto:lliu at w2bi.com>> wrote:
>>
>>     Hi all,
>>
>>
>>
>>     I experience this segmentation fault issue when lte-UE try to PRACH.
>>     It looks likely the subheaders of pdu_msg was not initialized
>>     properly.  I went through archive and do not see anyone else has
>>     similar issue. Can someone give some help?
>>
>>
>>
>>
>>
>>     I attached the gdb log below
>>
>>
>>
>>     Searching for cell...
>>     Using Volk machine: avx2_64_mmx_orc
>>     Found CELL ID: 19 CP: Normal  , CFO: -0.6 KHz.
>>     Trying to decode MIB...
>>      - Cell ID:         19
>>      - Nof ports:       2
>>      - CP:              Normal
>>      - PRB:             50
>>      - PHICH Length:    Normal
>>      - PHICH Resources: 1/6
>>      - SFN:             0
>>     MIB received BW=10 MHz
>>     [New Thread 0x7fffc37fe700 (LWP 17177)]
>>     Initializating cell configuration...
>>     -- Asking for clock rate 23.040000 MHz...
>>     -- Actually got clock rate 23.040000 MHz.
>>     -- Performing timer loopback test... pass
>>     Setting Sampling frequency 11.52 MHz
>>     Setting TX/RX offset 120 samples, 10.42 us
>>     SIB1 received, CellID=19,  PLMN Id: MCC 311 MNC 480
>>     SIB2 received
>>     [Thread 0x7fffc37fe700 (LWP 17177) exited]
>>     Random Access Transmission: seq=1, ra-rnti=0x4
>>
>>     ------------------------------
>>
>>     Thread 24 "srsue_debug" received signal SIGSEGV, Segmentation fault.
>>     [Switching to Thread 0x7fffd97fa700 (LWP 17157)]
>>     0x000000000050091e in srslte::sch_subh::get_payload_size (this=0x0)
>>     at /home/w2bi/CLionProjects/srsLTE/lib/src/common/pdu.cc:459
>>     459      return nof_bytes;
>>     (gdb) backtrace
>>     #0  0x000000000050091e in srslte::sch_subh::get_payload_size
>>     (this=0x0) at /home/w2bi/CLionProjects/srsLTE/lib/src/common/pdu.cc:459
>>     #1  0x00000000004ffe7b in srslte::sch_pdu::write_packet
>>     (this=0x7ffff1a5f708, log_h=0x7ffff1abf5e0) at
>>     /home/w2bi/CLionProjects/srsLTE/lib/src/common/pdu.cc:229
>>     #2  0x00000000004c9567 in srsue::mux::pdu_get (this=0x7ffff1a5f618,
>>     payload=0x7ffff1a5f682 "", pdu_sz=117, tx_tti=0, pid=0) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/mux.cc:253
>>     #3  0x00000000004c9db8 in srsue::mux::msg3_get (this=0x7ffff1a5f618,
>>     payload=0x4c93800 "", pdu_sz=117) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/mux.cc:348
>>     #4  0x00000000004d43ee in
>>     srsue::ul_harq_entity::ul_harq_process::run_tti
>>     (this=0x7ffff1a60bf8, tti_tx=1945, grant=0x7fffd97f9720,
>>     action=0x7fffd97f9c40)
>>         at /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/ul_harq.cc:250
>>     #5  0x00000000004d3c0e in srsue::ul_harq_entity::run_tti
>>     (this=0x7ffff1a60a68, tti=1941, grant=0x7fffd97f9720,
>>     action=0x7fffd97f9c40) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/ul_harq.cc:143
>>     #6  0x00000000004d39ba in srsue::ul_harq_entity::new_grant_ul
>>     (this=0x7ffff1a60a68, grant=..., action=0x7fffd97f9c40) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/ul_harq.cc:119
>>     #7  0x00000000004c6bf2 in srsue::mac::new_grant_ul
>>     (this=0x7ffff1a5f4a8, grant=..., action=0x7fffd97f9c40) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/mac.cc:316
>>     #8  0x00000000004d81e9 in srsue::phch_worker::work_imp
>>     (this=0x7ffff7f1b010) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/phy/phch_worker.cc:247
>>     #9  0x00000000005054bb in srslte::thread_pool::worker::run_thread
>>     (this=0x7ffff7f1b010) at
>>     /home/w2bi/CLionProjects/srsLTE/lib/src/common/thread_pool.cc:61
>>     #10 0x00000000004c7f28 in thread::thread_function_entry
>>     (_this=0x7ffff7f1b010) at
>>     /home/w2bi/CLionProjects/srsLTE/lib/include/srslte/common/threads.h:73
>>     #11 0x00007ffff7bc16ba in start_thread (arg=0x7fffd97fa700) at
>>     pthread_create.c:333
>>     #12 0x00007ffff61273dd in clone () at
>>     ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
>>     (gdb) frame 0
>>     #0  0x000000000050091e in srslte::sch_subh::get_payload_size
>>     (this=0x0) at /home/w2bi/CLionProjects/srsLTE/lib/src/common/pdu.cc:459
>>     459      return nof_bytes;
>>     (gdb) print this
>>     $1 = (srslte::sch_subh * const) 0x0
>>     (gdb) frame 1
>>     #1  0x00000000004ffe7b in srslte::sch_pdu::write_packet
>>     (this=0x7ffff1a5f708, log_h=0x7ffff1abf5e0) at
>>     /home/w2bi/CLionProjects/srsLTE/lib/src/common/pdu.cc:229
>>     229          printf("SUBH %d is_sdu=%d, payload=%d\n", i,
>>     subheaders[i].is_sdu(), subheaders[i].get_payload_size());
>>     (gdb) print i
>>     $2 = 0
>>     (gdb) print subheaders[0]
>>     Cannot access memory at address 0x0
>>     (gdb) print subheaders
>>     $3 = std::vector of length 0, capacity 0
>>
>>
>>
>>     comment out /srsLTE/lib/src/common/pdu.cc:459 \, run again and get
>>     similar error
>>
>>
>>
>>     Searching for cell...
>>     Using Volk machine: avx2_64_mmx_orc
>>     Found CELL ID: 19 CP: Normal  , CFO: -0.7 KHz.
>>     Trying to decode MIB...
>>      - Cell ID:         19
>>      - Nof ports:       2
>>      - CP:              Normal
>>      - PRB:             50
>>      - PHICH Length:    Normal
>>      - PHICH Resources: 1/6
>>      - SFN:             0
>>     MIB received BW=10 MHz
>>     [New Thread 0x7fffc37fe700 (LWP 3125)]
>>     Initializating cell configuration...
>>     -- Asking for clock rate 23.040000 MHz...
>>     -- Actually got clock rate 23.040000 MHz.
>>     -- Performing timer loopback test... pass
>>     Setting Sampling frequency 11.52 MHz
>>     Setting TX/RX offset 120 samples, 10.42 us
>>     SIB1 received, CellID=19,  PLMN Id: MCC 311 MNC 480
>>     SIB2 received
>>     [Thread 0x7fffc37fe700 (LWP 3125) exited]
>>     Random Access Transmission: seq=1, ra-rnti=0x9
>>
>>     ------------------------------
>>     Random Access Transmission: seq=2, ra-rnti=0x4
>>
>>     Thread 26 "srsue_debug_rad" received signal SIGSEGV, Segmentation fault.
>>     [Switching to Thread 0x7fffcbfff700 (LWP 3106)]
>>     0x00000000004c3539 in srslte::pdu<srslte::sch_subh>::init_
>>     (this=0x7ffff1a5f708, buffer_tx_ptr=0x7ffff1a5f682 "",
>>     pdu_len_bytes=117, is_ulsch=true)
>>         at
>>     /home/w2bi/CLionProjects/srsLTE/lib/include/srslte/common/pdu.h:173
>>     173          subheaders[i].parent = this;
>>     (gdb) backtrace
>>     #0  0x00000000004c3539 in srslte::pdu<srslte::sch_subh>::init_
>>     (this=0x7ffff1a5f708, buffer_tx_ptr=0x7ffff1a5f682 "",
>>     pdu_len_bytes=117, is_ulsch=true)
>>         at
>>     /home/w2bi/CLionProjects/srsLTE/lib/include/srslte/common/pdu.h:173
>>     #1  0x00000000004ca1e3 in srslte::pdu<srslte::sch_subh>::init_tx
>>     (this=0x7ffff1a5f708, payload=0x7ffff1a5f682 "", pdu_len_bytes=117,
>>     is_ulsch=true)
>>         at
>>     /home/w2bi/CLionProjects/srsLTE/lib/include/srslte/common/pdu.h:78
>>     #2  0x00000000004c8d11 in srsue::mux::pdu_get (this=0x7ffff1a5f618,
>>     payload=0x7ffff1a5f682 "", pdu_sz=117, tx_tti=0, pid=0) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/mux.cc:167
>>     #3  0x00000000004c9db8 in srsue::mux::msg3_get (this=0x7ffff1a5f618,
>>     payload=0x4c90500 "", pdu_sz=117) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/mux.cc:348
>>     #4  0x00000000004d43ee in
>>     srsue::ul_harq_entity::ul_harq_process::run_tti
>>     (this=0x7ffff1a60bf8, tti_tx=3905, grant=0x7fffcbffe720,
>>     action=0x7fffcbffec40)
>>         at /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/ul_harq.cc:250
>>     #5  0x00000000004d3c0e in srsue::ul_harq_entity::run_tti
>>     (this=0x7ffff1a60a68, tti=3901, grant=0x7fffcbffe720,
>>     action=0x7fffcbffec40) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/ul_harq.cc:143
>>     #6  0x00000000004d39ba in srsue::ul_harq_entity::new_grant_ul
>>     (this=0x7ffff1a60a68, grant=..., action=0x7fffcbffec40) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/ul_harq.cc:119
>>     #7  0x00000000004c6bf2 in srsue::mac::new_grant_ul
>>     (this=0x7ffff1a5f4a8, grant=..., action=0x7fffcbffec40) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/mac.cc:316
>>     #8  0x00000000004d81e9 in srsue::phch_worker::work_imp
>>     (this=0x7ffff7f3aa98) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/phy/phch_worker.cc:247
>>     #9  0x0000000000505211 in srslte::thread_pool::worker::run_thread
>>     (this=0x7ffff7f3aa98) at
>>     /home/w2bi/CLionProjects/srsLTE/lib/src/common/thread_pool.cc:61
>>     #10 0x00000000004c7f28 in thread::thread_function_entry
>>     (_this=0x7ffff7f3aa98) at
>>     /home/w2bi/CLionProjects/srsLTE/lib/include/srslte/common/threads.h:73
>>     #11 0x00007ffff7bc16ba in start_thread (arg=0x7fffcbfff700) at
>>     pthread_create.c:333
>>     #12 0x00007ffff61273dd in clone () at
>>     ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
>>     (gdb) frame 0
>>     #0  0x00000000004c3539 in srslte::pdu<srslte::sch_subh>::init_
>>     (this=0x7ffff1a5f708, buffer_tx_ptr=0x7ffff1a5f682 "",
>>     pdu_len_bytes=117, is_ulsch=true)
>>         at
>>     /home/w2bi/CLionProjects/srsLTE/lib/include/srslte/common/pdu.h:173
>>     173          subheaders[i].parent = this;
>>     (gdb) print i
>>     $1 = 0
>>     (gdb) print subheaders
>>     $2 = std::vector of length 0, capacity 0
>>     (gdb) frame 1
>>     #1  0x00000000004ca1e3 in srslte::pdu<srslte::sch_subh>::init_tx
>>     (this=0x7ffff1a5f708, payload=0x7ffff1a5f682 "", pdu_len_bytes=117,
>>     is_ulsch=true)
>>         at
>>     /home/w2bi/CLionProjects/srsLTE/lib/include/srslte/common/pdu.h:78
>>     78        init_(payload, pdu_len_bytes, is_ulsch);
>>
>>     thanks,
>>
>>
>>
>>     Liqun
>>
>>
>>
>>     _______________________________________________
>>     srslte-users mailing list
>>     srslte-users at lists.softwareradiosystems.com
>>     <mailto:srslte-users at lists.softwareradiosystems.com>
>>     http://www.softwareradiosystems.com/mailman/listinfo/srslte-users
>>
>>
>>
>> _______________________________________________
>> srslte-users mailing list
>> srslte-users at lists.softwareradiosystems.com
>> http://www.softwareradiosystems.com/mailman/listinfo/srslte-users
>>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 6 Oct 2017 19:20:10 +0000
> From: Liqun Liu <lliu at w2bi.com>
> To: Andre Puschmann <andre.puschmann at softwareradiosystems.com>,
>         "srslte-users at lists.softwareradiosystems.com"
>         <srslte-users at lists.softwareradiosystems.com>
> Subject: Re: [srslte-users] Segmentation fault during LTE-UE Prach
>         procedure
> Message-ID:
>         <BLUPR17MB00183F56D87ACDFD36462AACE7710 at BLUPR17MB0018.namprd17.prod.outlook.com>
>
> Content-Type: text/plain; charset="iso-8859-1"
>
>
> Andre,
>
> I have all layers set to debug. But around line 200, log start to repeat itself.
>
> Thanks,
>
> Liqun
> -----Original Message-----
> From: Andre Puschmann [mailto:andre.puschmann at softwareradiosystems.com]
> Sent: Friday, October 06, 2017 3:03 PM
> To: Liqun Liu <lliu at w2bi.com>; srslte-users at lists.softwareradiosystems.com
> Subject: Re: [srslte-users] Segmentation fault during LTE-UE Prach procedure
>
> Hey,
>
> can you attach logs with PHY level set to info please.
>
> Thanks
> Andre
>
> On 06/10/17 20:39, Liqun Liu wrote:
>> Ismael,
>>
>>
>>
>> I tried the 17-09 version of lteue and get different result.
>>
>> In the older version, lteue will try to prach and get segmentation fault.
>>
>> In the 17-09 version, lteue
>>
>>
>>
>> Fount cell: PCI=19, PRB=50, Ports=2, CFO=-1.4 Khz
>>
>> Fount PLMN: Id=311480, TAC=1
>>
>>
>>
>>
>>
>> Log also shows lteue get mib and sib1. But it just go to the cell
>> search loop again and never try to do the PRACH procedure.
>>
>>
>>
>> Liqun
>>
>>
>>
>> *From:*Liqun Liu
>> *Sent:* Wednesday, October 04, 2017 9:55 AM
>> *To:* Ismael Gomez <ismael.gomez at softwareradiosystems.com>;
>> srslte-users at lists.softwareradiosystems.com
>> *Subject:* Re: [srslte-users] Segmentation fault during LTE-UE Prach
>> procedure
>>
>>
>>
>> Ismael,
>>
>>
>>
>> Sure. looking forward to test the new release.
>>
>> To add some background of test,
>>
>>
>>
>> LTE-UE attached to the Amarisoft enb. but crashed on a  commercial eNB.
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Liqun
>>
>> ----------------------------------------------------------------------
>> --
>>
>> *From:*Ismael Gomez <ismael.gomez at softwareradiosystems.com
>> <mailto:ismael.gomez at softwareradiosystems.com>>
>> *Sent:* Wednesday, October 4, 2017 6:19:02 AM
>> *To:* Liqun Liu; srslte-users at lists.softwareradiosystems.com
>> <mailto:srslte-users at lists.softwareradiosystems.com>
>> *Subject:* Re: [srslte-users] Segmentation fault during LTE-UE Prach
>> procedure
>>
>>
>>
>> Hi Li,
>>
>>
>>
>> We are going to release a new version this Friday. Probably the best
>> is to wait and see if the bug is still present with that new version.
>>
>>
>>
>> Thanks
>>
>>
>>
>> On Tue, 3 Oct 2017 at 23:00 Liqun Liu <lliu at w2bi.com
>> <mailto:lliu at w2bi.com>> wrote:
>>
>>     Hi all,
>>
>>
>>
>>     I experience this segmentation fault issue when lte-UE try to PRACH.
>>     It looks likely the subheaders of pdu_msg was not initialized
>>     properly.  I went through archive and do not see anyone else has
>>     similar issue. Can someone give some help?
>>
>>
>>
>>
>>
>>     I attached the gdb log below
>>
>>
>>
>>     Searching for cell...
>>     Using Volk machine: avx2_64_mmx_orc
>>     Found CELL ID: 19 CP: Normal  , CFO: -0.6 KHz.
>>     Trying to decode MIB...
>>      - Cell ID:         19
>>      - Nof ports:       2
>>      - CP:              Normal
>>      - PRB:             50
>>      - PHICH Length:    Normal
>>      - PHICH Resources: 1/6
>>      - SFN:             0
>>     MIB received BW=10 MHz
>>     [New Thread 0x7fffc37fe700 (LWP 17177)]
>>     Initializating cell configuration...
>>     -- Asking for clock rate 23.040000 MHz...
>>     -- Actually got clock rate 23.040000 MHz.
>>     -- Performing timer loopback test... pass
>>     Setting Sampling frequency 11.52 MHz
>>     Setting TX/RX offset 120 samples, 10.42 us
>>     SIB1 received, CellID=19,  PLMN Id: MCC 311 MNC 480
>>     SIB2 received
>>     [Thread 0x7fffc37fe700 (LWP 17177) exited]
>>     Random Access Transmission: seq=1, ra-rnti=0x4
>>
>>     ------------------------------
>>
>>     Thread 24 "srsue_debug" received signal SIGSEGV, Segmentation fault.
>>     [Switching to Thread 0x7fffd97fa700 (LWP 17157)]
>>     0x000000000050091e in srslte::sch_subh::get_payload_size (this=0x0)
>>     at /home/w2bi/CLionProjects/srsLTE/lib/src/common/pdu.cc:459
>>     459      return nof_bytes;
>>     (gdb) backtrace
>>     #0  0x000000000050091e in srslte::sch_subh::get_payload_size
>>     (this=0x0) at /home/w2bi/CLionProjects/srsLTE/lib/src/common/pdu.cc:459
>>     #1  0x00000000004ffe7b in srslte::sch_pdu::write_packet
>>     (this=0x7ffff1a5f708, log_h=0x7ffff1abf5e0) at
>>     /home/w2bi/CLionProjects/srsLTE/lib/src/common/pdu.cc:229
>>     #2  0x00000000004c9567 in srsue::mux::pdu_get (this=0x7ffff1a5f618,
>>     payload=0x7ffff1a5f682 "", pdu_sz=117, tx_tti=0, pid=0) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/mux.cc:253
>>     #3  0x00000000004c9db8 in srsue::mux::msg3_get (this=0x7ffff1a5f618,
>>     payload=0x4c93800 "", pdu_sz=117) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/mux.cc:348
>>     #4  0x00000000004d43ee in
>>     srsue::ul_harq_entity::ul_harq_process::run_tti
>>     (this=0x7ffff1a60bf8, tti_tx=1945, grant=0x7fffd97f9720,
>>     action=0x7fffd97f9c40)
>>         at /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/ul_harq.cc:250
>>     #5  0x00000000004d3c0e in srsue::ul_harq_entity::run_tti
>>     (this=0x7ffff1a60a68, tti=1941, grant=0x7fffd97f9720,
>>     action=0x7fffd97f9c40) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/ul_harq.cc:143
>>     #6  0x00000000004d39ba in srsue::ul_harq_entity::new_grant_ul
>>     (this=0x7ffff1a60a68, grant=..., action=0x7fffd97f9c40) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/ul_harq.cc:119
>>     #7  0x00000000004c6bf2 in srsue::mac::new_grant_ul
>>     (this=0x7ffff1a5f4a8, grant=..., action=0x7fffd97f9c40) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/mac.cc:316
>>     #8  0x00000000004d81e9 in srsue::phch_worker::work_imp
>>     (this=0x7ffff7f1b010) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/phy/phch_worker.cc:247
>>     #9  0x00000000005054bb in srslte::thread_pool::worker::run_thread
>>     (this=0x7ffff7f1b010) at
>>     /home/w2bi/CLionProjects/srsLTE/lib/src/common/thread_pool.cc:61
>>     #10 0x00000000004c7f28 in thread::thread_function_entry
>>     (_this=0x7ffff7f1b010) at
>>     /home/w2bi/CLionProjects/srsLTE/lib/include/srslte/common/threads.h:73
>>     #11 0x00007ffff7bc16ba in start_thread (arg=0x7fffd97fa700) at
>>     pthread_create.c:333
>>     #12 0x00007ffff61273dd in clone () at
>>     ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
>>     (gdb) frame 0
>>     #0  0x000000000050091e in srslte::sch_subh::get_payload_size
>>     (this=0x0) at /home/w2bi/CLionProjects/srsLTE/lib/src/common/pdu.cc:459
>>     459      return nof_bytes;
>>     (gdb) print this
>>     $1 = (srslte::sch_subh * const) 0x0
>>     (gdb) frame 1
>>     #1  0x00000000004ffe7b in srslte::sch_pdu::write_packet
>>     (this=0x7ffff1a5f708, log_h=0x7ffff1abf5e0) at
>>     /home/w2bi/CLionProjects/srsLTE/lib/src/common/pdu.cc:229
>>     229          printf("SUBH %d is_sdu=%d, payload=%d\n", i,
>>     subheaders[i].is_sdu(), subheaders[i].get_payload_size());
>>     (gdb) print i
>>     $2 = 0
>>     (gdb) print subheaders[0]
>>     Cannot access memory at address 0x0
>>     (gdb) print subheaders
>>     $3 = std::vector of length 0, capacity 0
>>
>>
>>
>>     comment out /srsLTE/lib/src/common/pdu.cc:459 \, run again and get
>>     similar error
>>
>>
>>
>>     Searching for cell...
>>     Using Volk machine: avx2_64_mmx_orc
>>     Found CELL ID: 19 CP: Normal  , CFO: -0.7 KHz.
>>     Trying to decode MIB...
>>      - Cell ID:         19
>>      - Nof ports:       2
>>      - CP:              Normal
>>      - PRB:             50
>>      - PHICH Length:    Normal
>>      - PHICH Resources: 1/6
>>      - SFN:             0
>>     MIB received BW=10 MHz
>>     [New Thread 0x7fffc37fe700 (LWP 3125)]
>>     Initializating cell configuration...
>>     -- Asking for clock rate 23.040000 MHz...
>>     -- Actually got clock rate 23.040000 MHz.
>>     -- Performing timer loopback test... pass
>>     Setting Sampling frequency 11.52 MHz
>>     Setting TX/RX offset 120 samples, 10.42 us
>>     SIB1 received, CellID=19,  PLMN Id: MCC 311 MNC 480
>>     SIB2 received
>>     [Thread 0x7fffc37fe700 (LWP 3125) exited]
>>     Random Access Transmission: seq=1, ra-rnti=0x9
>>
>>     ------------------------------
>>     Random Access Transmission: seq=2, ra-rnti=0x4
>>
>>     Thread 26 "srsue_debug_rad" received signal SIGSEGV, Segmentation fault.
>>     [Switching to Thread 0x7fffcbfff700 (LWP 3106)]
>>     0x00000000004c3539 in srslte::pdu<srslte::sch_subh>::init_
>>     (this=0x7ffff1a5f708, buffer_tx_ptr=0x7ffff1a5f682 "",
>>     pdu_len_bytes=117, is_ulsch=true)
>>         at
>>     /home/w2bi/CLionProjects/srsLTE/lib/include/srslte/common/pdu.h:173
>>     173          subheaders[i].parent = this;
>>     (gdb) backtrace
>>     #0  0x00000000004c3539 in srslte::pdu<srslte::sch_subh>::init_
>>     (this=0x7ffff1a5f708, buffer_tx_ptr=0x7ffff1a5f682 "",
>>     pdu_len_bytes=117, is_ulsch=true)
>>         at
>>     /home/w2bi/CLionProjects/srsLTE/lib/include/srslte/common/pdu.h:173
>>     #1  0x00000000004ca1e3 in srslte::pdu<srslte::sch_subh>::init_tx
>>     (this=0x7ffff1a5f708, payload=0x7ffff1a5f682 "", pdu_len_bytes=117,
>>     is_ulsch=true)
>>         at
>>     /home/w2bi/CLionProjects/srsLTE/lib/include/srslte/common/pdu.h:78
>>     #2  0x00000000004c8d11 in srsue::mux::pdu_get (this=0x7ffff1a5f618,
>>     payload=0x7ffff1a5f682 "", pdu_sz=117, tx_tti=0, pid=0) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/mux.cc:167
>>     #3  0x00000000004c9db8 in srsue::mux::msg3_get (this=0x7ffff1a5f618,
>>     payload=0x4c90500 "", pdu_sz=117) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/mux.cc:348
>>     #4  0x00000000004d43ee in
>>     srsue::ul_harq_entity::ul_harq_process::run_tti
>>     (this=0x7ffff1a60bf8, tti_tx=3905, grant=0x7fffcbffe720,
>>     action=0x7fffcbffec40)
>>         at /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/ul_harq.cc:250
>>     #5  0x00000000004d3c0e in srsue::ul_harq_entity::run_tti
>>     (this=0x7ffff1a60a68, tti=3901, grant=0x7fffcbffe720,
>>     action=0x7fffcbffec40) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/ul_harq.cc:143
>>     #6  0x00000000004d39ba in srsue::ul_harq_entity::new_grant_ul
>>     (this=0x7ffff1a60a68, grant=..., action=0x7fffcbffec40) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/ul_harq.cc:119
>>     #7  0x00000000004c6bf2 in srsue::mac::new_grant_ul
>>     (this=0x7ffff1a5f4a8, grant=..., action=0x7fffcbffec40) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/mac/mac.cc:316
>>     #8  0x00000000004d81e9 in srsue::phch_worker::work_imp
>>     (this=0x7ffff7f3aa98) at
>>     /home/w2bi/CLionProjects/srsLTE/srsue/src/phy/phch_worker.cc:247
>>     #9  0x0000000000505211 in srslte::thread_pool::worker::run_thread
>>     (this=0x7ffff7f3aa98) at
>>     /home/w2bi/CLionProjects/srsLTE/lib/src/common/thread_pool.cc:61
>>     #10 0x00000000004c7f28 in thread::thread_function_entry
>>     (_this=0x7ffff7f3aa98) at
>>     /home/w2bi/CLionProjects/srsLTE/lib/include/srslte/common/threads.h:73
>>     #11 0x00007ffff7bc16ba in start_thread (arg=0x7fffcbfff700) at
>>     pthread_create.c:333
>>     #12 0x00007ffff61273dd in clone () at
>>     ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
>>     (gdb) frame 0
>>     #0  0x00000000004c3539 in srslte::pdu<srslte::sch_subh>::init_
>>     (this=0x7ffff1a5f708, buffer_tx_ptr=0x7ffff1a5f682 "",
>>     pdu_len_bytes=117, is_ulsch=true)
>>         at
>>     /home/w2bi/CLionProjects/srsLTE/lib/include/srslte/common/pdu.h:173
>>     173          subheaders[i].parent = this;
>>     (gdb) print i
>>     $1 = 0
>>     (gdb) print subheaders
>>     $2 = std::vector of length 0, capacity 0
>>     (gdb) frame 1
>>     #1  0x00000000004ca1e3 in srslte::pdu<srslte::sch_subh>::init_tx
>>     (this=0x7ffff1a5f708, payload=0x7ffff1a5f682 "", pdu_len_bytes=117,
>>     is_ulsch=true)
>>         at
>>     /home/w2bi/CLionProjects/srsLTE/lib/include/srslte/common/pdu.h:78
>>     78        init_(payload, pdu_len_bytes, is_ulsch);
>>
>>     thanks,
>>
>>
>>
>>     Liqun
>>
>>
>>
>>     _______________________________________________
>>     srslte-users mailing list
>>     srslte-users at lists.softwareradiosystems.com
>>     <mailto:srslte-users at lists.softwareradiosystems.com>
>>     http://www.softwareradiosystems.com/mailman/listinfo/srslte-users
>>
>>
>>
>> _______________________________________________
>> srslte-users mailing list
>> srslte-users at lists.softwareradiosystems.com
>> http://www.softwareradiosystems.com/mailman/listinfo/srslte-users
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.srsran.com/pipermail/srsran-users/attachments/20171006/a0dfec77/attachment.htm>


More information about the srsran-users mailing list