Project

General

Profile

Bug #4636

osmo-trx-uhd crashes with 3 channels multi-ARFCN mode

Added by fixeria 5 days ago. Updated 5 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
UHD
Target version:
-
Start date:
06/29/2020
Due date:
% Done:

0%

Spec Reference:

Description

The user manual [1] (section 13.2 "Multi-ARFCN mode") states:

Up to three ARFCN’s is supported for multi-TRX

[1] http://ftp.osmocom.org/docs/latest/osmotrx-usermanual.pdf

I have a USRP B210, and 2 channels in multi-TRX work fine:

trx
  ...
  multi-arfcn enable
  rx-sps 4
  tx-sps 4
  chan 0
    tx-path TX/RX
    rx-path RX2
  chan 1
    tx-path TX/RX
    rx-path RX2

Trying to start osmo-trx with 3 channels:

trx
  ...
  multi-arfcn enable
  rx-sps 4
  tx-sps 4
  chan 0
    tx-path TX/RX
    rx-path RX2
  chan 1
    tx-path TX/RX
    rx-path RX2
  chan 2
    tx-path TX/RX
    rx-path RX2

leads to the following error:

DDEV DEBUG UHDDevice.cpp:207 [tid=140737288886144][chan=0] Configuring Tx antenna TX/RX
DDEV DEBUG UHDDevice.cpp:207 [tid=140737288886144][chan=1] Configuring Tx antenna TX/RX
DDEV DEBUG UHDDevice.cpp:207 [tid=140737288886144][chan=2] Configuring Tx antenna TX/RX
terminate called after throwing an instance of 'uhd::index_error'                                                                                                        
  what():  LookupError: IndexError: multi_usrp: TX channel 2 out of range for configured TX frontends

Program received signal SIGABRT
pwndbg> bt
#0  0x00007ffff6821355 in raise () from /usr/lib/libc.so.6
#1  0x00007ffff680a853 in abort () from /usr/lib/libc.so.6
#2  0x00007ffff6ba186a in __gnu_cxx::__verbose_terminate_handler () at /build/gcc/src/gcc/libstdc++-v3/libsupc++/vterminate.cc:95
#3  0x00007ffff6badd8a in __cxxabiv1::__terminate (handler=<optimized out>) at /build/gcc/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:48
#4  0x00007ffff6baddf7 in std::terminate () at /build/gcc/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:58
#5  0x00007ffff6bae09e in __cxxabiv1::__cxa_throw (obj=<optimized out>, tinfo=0x7ffff7a563a8 <typeinfo for uhd::index_error>, dest=0x7ffff70d5990) at /build/gcc/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc:95
#6  0x00007ffff71b8315 in ?? () from /usr/lib/libuhd.so.3.15.0
#7  0x00007ffff71b83cb in ?? () from /usr/lib/libuhd.so.3.15.0
#8  0x00007ffff71b9da1 in ?? () from /usr/lib/libuhd.so.3.15.0
#9  0x000055555556ecaf in uhd_device::setTxAntenna (this=0x5555555e4ae0, ant="TX/RX", chan=2) at /usr/include/boost/smart_ptr/shared_ptr.hpp:732
#10 0x00005555555747f6 in RadioDevice::set_antennas (this=this@entry=0x5555555e4ae0) at /usr/include/c++/10.1.0/bits/stl_vector.h:1043
#11 0x000055555557298b in uhd_device::open (this=0x5555555e4ae0, args=..., ref=0, swap_channels=<optimized out>) at UHDDevice.cpp:564
#12 0x0000555555563826 in trx_start (trx=0x5555555e4150) at osmo-trx.cpp:516
#13 main (argc=<optimized out>, argv=<optimized out>) at osmo-trx.cpp:645
#14 0x00007ffff680c002 in __libc_start_main () from /usr/lib/libc.so.6
#15 0x0000555555565a2e in _start () at osmo-trx.cpp:657

Either our documentation is wrong and 2 channels is the maximum in multi-ARFCN mode, or it's a bug somewhere in osmo-trx / UHD driver.

P.S. I just tested setting 3 channels for a "UHD Source" block in GNU Radio (see attachment) - same error.

multi_usrp.png View multi_usrp.png 49.8 KB fixeria, 06/29/2020 09:48 AM
multi_usrp.grc multi_usrp.grc 10.1 KB fixeria, 06/29/2020 09:48 AM
4214

History

#1 Updated by fixeria 5 days ago

No matter if N > 2 channels is supported by USRP B210 or not, we should terminate gracefully and not crash:

https://gerrit.osmocom.org/c/osmo-trx/+/19040 UHDDevice: catch LookupError/IndexError in set{Rx,Tx}Antenna()

#2 Updated by fixeria 5 days ago

Here is an extract from the log output during a successful run with 2 channels:

DDEV INFO UHDDevice.cpp:639 [tid=140375369013120] Device configuration: Single USRP:
  Device: B-Series Device
  Mboard 0: B210
  RX Channel: 0
    RX DSP: 0
    RX Dboard: A
    RX Subdev: FE-RX2
  RX Channel: 1
    RX DSP: 1
    RX Dboard: A
    RX Subdev: FE-RX1
  TX Channel: 0
    TX DSP: 0
    TX Dboard: A
    TX Subdev: FE-TX2
  TX Channel: 1
    TX DSP: 1
    TX Dboard: A
    TX Subdev: FE-TX1

#3 Updated by Hoernchen 5 days ago

I don't know where the number 3 comes from, unless you use the mcbts mode the b210 has only 2 channels to offer, which still are not independent due to the shared LO.

#4 Updated by Hoernchen 5 days ago

Err, duh, the mctbs mode is what you're trying to use.. it should support 5 arfcns, and it's actually just one channel that contains the whole bw. Still no idea where that 3 comes from.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)