SoapyRemote: SoapySDRServer segfault

Using the Osmocom source block with Soapy Remote, I sometimes get a segfault:

Here is what GNUradio says:

gr-osmosdr v0.1.x-xxx-xunknown (0.1.5git) gnuradio 3.7.8.1
built-in source types: file fcd rtl_tcp sdrplay rfspace soapy redpitaya 
[INFO] SoapyRemote::setupRxStream(remoteFormat=CS16, localFormat=CF32, scaleFactor=32767, mtu=1500, window=44040192)
[INFO] Client side stream bound to <CLIENT's IP>:47903
[INFO] Client side status bound to <CLIENT's IP>:45892
[INFO] Using format CS16.
[INFO] Server side stream bound to [::ffff:<SERVER's IP>]:48810
[INFO] Server side stream connected to [::ffff:<CLIENT's IP>]:47903
[INFO] Server side status connected to [::ffff:<CLIENT's IP>]:45892
[INFO] Configured sender endpoint: dgram=1452 bytes, 357 elements @ 4 bytes, window=43008 KiB
[INFO] Client side stream connected to <SERVER's IP>:48810
[INFO] Configured receiver endpoint: dgram=1452 bytes, 357 elements @ 4 bytes, window=43008 KiB
[WARNING] Set thread priority 0.5 failed: Operation not permitted
Using Volk machine: avx_64_mmx_orc
[ERROR] SoapyLogAcceptor::handlerLoop() 
thread[thread-per-block[0]: <block soapy_source_c (2)>]: SoapyRPCUnpacker::recv(header) FAIL: 

Here is what the remote server running SoapySDRServer says right before it segfaults:

mir_sdr_usb_GetDevices Dev0:vid=1df7 pid=2500 rev=0206 serno=B0001P0004 bus=001 port=004 devAvail=1
mir_sdr_usb_SetDeviceIdx idx=0 numDevices=1
Opened device with idVendor = 0x1df7 idProduct = 0x2500 fwVersion = 0x0206 busNum = 001 portNum = 004
mir_sdr_DCoffsetIQimbalanceControl: DC:1 IQ:1
mir_sdr_AgcControl: 1 -30 0 0 0 0 1
mir_sdr_StreamInit()
mir_sdr_Init: starting hardware initialization
mir_sdr_Init: gR=20dB fs=7.000MHz rf=479.000MHz bw=6.000MHz if=0.000MHz
DownConvert: Enable=0 DecM=1 OutScale=0 (fs=7.000000 bw=6000 if=0)
mir_sdr_usb_USB DLL: Revision 0.1.1
mir_sdr_2500_Init: fnaddr = 2 detected, trying to change...
mir_sdr_2500_Init: fnaddr = 6
mir_sdr_2500_Init: adjusting squelch trim 0x1, rx gating enable 1, tx_trim 0, reg2 = 0x4801
initHw: Register7 = 0x000085
initRfFreqDependentHw(1): Tuner Register0 = 0x057480
Error: libusb_submit_transfer() -1
mir_sdr_2500_StreamInit: Open failed
initHw: mir_sdr_2500_StreamInit() Error 0x00000001
mir_sdr_Init: initHw returns error 7

Is this because the server cannot keep up with the requested sample rate?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 66 (30 by maintainers)

Most upvoted comments

I think I’ve got to the bottom of the issue on Odroid.

For anyone that has Odroid, insert…

mir_sdr_SetTransferMode(mir_sdr_BULK);

immediately before the mir_sdr_StreamInit call in the Streaming.cpp file and rebuild SoapySDRPlay.

It’s a compilation issue and I’ll fix it in the API build as soon as I can.

Done, commited on SoapySDRplay master.

We need a chat 😃