Project

General

Profile

Actions

Bug #4147

closed

osmo-trx-uhd crash during exit after bind IP addr failure

Added by pespin over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
UHD
Target version:
-
Start date:
08/12/2019
Due date:
% Done:

100%

Spec Reference:

Description

I forgot to set up correctly the IP addresses I usually use on the "lo" iface. So osmo-trx was started with IPs set to ones non-available in the system (not in the 127.0.0.X range, but in 192.168.30.0/24).

osmo-trx-uhd -C /foobar/build/new/conf/osmo-trx-uhd.cfg
+ osmo-trx-uhd -C /foobar/build/new/conf/osmo-trx-uhd.cfg
Info: SSE3 support compiled in and supported by CPU
Info: SSE4.1 support compiled in and supported by CPU
Mon Aug 12 19:06:31 2019 DLGLOBAL <0004> telnet_interface.c:104 Available via telnet 127.0.0.1 4237
Mon Aug 12 19:06:31 2019 DLCTRL <000b> control_if.c:911 CTRL at 127.0.0.1 4236
Mon Aug 12 19:06:31 2019 DMAIN <0000> osmo-trx.cpp:480 [tid=139970790905216] Config Settings
   Log Level............... 0
   Device args............. type=b200
   TRX Base Port........... 5700
   TRX Address............. 192.168.30.100
   GSM BTS Address......... 192.168.30.1
   Channels................ 1
   Tx Samples-per-Symbol... 4
   Rx Samples-per-Symbol... 4
   EDGE support............ 0
   Extended RACH support... 0
   Reference............... 0
   C0 Filler Table......... 1
   Multi-Carrier........... 0
   Tuning offset........... 0
   RSSI to dBm offset...... 0
   Swap channels........... 0
   Tx Antennas............. '<default>'
   Rx Antennas............. '<default>'

Mon Aug 12 19:06:31 2019 DMAIN <0000> osmo-trx.cpp:436 [tid=139970790905216] Setting SCHED_RR priority 18
[INFO] [UHD] linux; GNU C++ version 8.3.0; Boost_106900; UHD_3.14.0.0-0-unknown
[INFO] [B200] Loading firmware image: /usr/share/uhd/images/usrp_b200_fw.hex...
Mon Aug 12 19:06:33 2019 DDEV <0002> UHDDevice.cpp:431 [tid=139970790905216] Using discovered UHD device type=b200,name=MyB200,serial=3166C0B,product=B200
[INFO] [B200] Detected Device: B200
[INFO] [B200] Loading FPGA image: /usr/share/uhd/images/usrp_b200_fpga.bin...
[INFO] [B200] Operating over USB 3.
[INFO] [B200] Detecting internal GPSDO....
[INFO] [GPS] No GPSDO found
[INFO] [B200] Initialize CODEC control...
[INFO] [B200] Initialize Radio control...
[INFO] [B200] Performing register loopback test...
[INFO] [B200] Register loopback test passed
[INFO] [B200] Setting master clock rate selection to 'automatic'.
[INFO] [B200] Asking for clock rate 16.000000 MHz...
[INFO] [B200] Actually got clock rate 16.000000 MHz.
Mon Aug 12 19:06:45 2019 DMAIN <0000> UHDDevice.cpp:209 [tid=139970790905216] Antennas configured successfully
[INFO] [MULTI_USRP] Setting master clock rate selection to 'manual'.
[INFO] [B200] Asking for clock rate 26.000000 MHz...
[INFO] [B200] Actually got clock rate 26.000000 MHz.
Mon Aug 12 19:06:45 2019 DDEV <0002> UHDDevice.cpp:246 [tid=139970790905216] Rates configured for B200 4 SPS
Mon Aug 12 19:06:45 2019 DDEV <0002> UHDDevice.cpp:206 [tid=139970790905216] Supported Tx gain range [0; 89.75]
Mon Aug 12 19:06:45 2019 DDEV <0002> UHDDevice.cpp:211 [tid=139970790905216] Supported Rx gain range [0; 76]
Mon Aug 12 19:06:45 2019 DDEV <0002> UHDDevice.cpp:215 [tid=139970790905216] Default setting Tx gain for channel 0 to 44.875
Mon Aug 12 19:06:45 2019 DDEV <0002> UHDDevice.cpp:222 [tid=139970790905216] Default setting Rx gain for channel 0 to 38
Mon Aug 12 19:06:45 2019 DDEV <0002> UHDDevice.cpp:530 [tid=139970790905216]
Single USRP:
  Device: B-Series Device
  Mboard 0: B200
  RX Channel: 0
    RX DSP: 0
    RX Dboard: A
    RX Subdev: FE-RX1
  TX Channel: 0
    TX DSP: 0
    TX Dboard: A
    TX Subdev: FE-TX1
Mon Aug 12 19:06:45 2019 DLGLOBAL <0004> socket.c:227 unable to bind socket: 192.168.30.100:5700: Cannot assign requested address
Mon Aug 12 19:06:45 2019 DLGLOBAL <0004> socket.c:236 no suitable local addr found for: 192.168.30.100:5700
Mon Aug 12 19:06:45 2019 DLGLOBAL <0004> socket.c:227 unable to bind socket: 192.168.30.100:5701: Cannot assign requested address
Mon Aug 12 19:06:45 2019 DLGLOBAL <0004> socket.c:236 no suitable local addr found for: 192.168.30.100:5701
Mon Aug 12 19:06:45 2019 DMAIN <0000> osmo-trx.cpp:153 [tid=139970790905216] Failed to initialize transceiver
Mon Aug 12 19:06:45 2019 DMAIN <0000> osmo-trx.cpp:485 [tid=139970790905216] Shutting down transceiver...
AddressSanitizer:DEADLYSIGNAL
=================================================================
==9500==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x5616278b6b8e bp 0x7fff724f0220 sp 0x7fff724f0210 T0)
==9500==The signal is caused by a READ memory access.
==9500==Hint: address points to the zero page.
    #0 0x5616278b6b8d in Thread::cancel() /foobar/git/osmo-trx/CommonLibs/Threads.h:188
    #1 0x5616278d29f4 in Transceiver::~Transceiver() /foobar/git/osmo-trx/Transceiver52M/Transceiver.cpp:154
    #2 0x5616278a9999 in trx_stop /foobar/git/osmo-trx/Transceiver52M/osmo-trx.cpp:487
    #3 0x5616278a9ff5 in trx_start /foobar/git/osmo-trx/Transceiver52M/osmo-trx.cpp:534
    #4 0x5616278aa67d in main /foobar/git/osmo-trx/Transceiver52M/osmo-trx.cpp:639
    #5 0x7f4d7fda2ee2 in __libc_start_main (/usr/lib/libc.so.6+0x26ee2)
    #6 0x5616278a701d in _start (/foobar/build/new/out/bin/osmo-trx-uhd+0xc01d)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /foobar/git/osmo-trx/CommonLibs/Threads.h:188 in Thread::cancel()
==9500==ABORTING

Actions #1

Updated by pespin over 4 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

Fixed here, ticket can be closed once merged:

remote: https://gerrit.osmocom.org/c/osmo-trx/+/15286 Transceiver: fix segfault during init if IP addr binding fails
remote: https://gerrit.osmocom.org/c/osmo-trx/+/15287 Transceiver: Check return value when binding IP addr for clock socket

Actions #2

Updated by pespin over 4 years ago

  • Status changed from Feedback to Resolved

Merged, closing ticket.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)