ast / SoapyAirspyHF

SoapySDR plugin to support the Airspy HF+
https://github.com/pothosware/SoapyAirspyHF/wiki
MIT License
5 stars 1 forks source link

Segfault when connecting via SoapySDRServer #1

Open andrewpile opened 1 year ago

andrewpile commented 1 year ago

I've built SoapySDR from source with the new libairspyhfSupport.so:

# SoapySDRUtil --info
######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

Lib Version: v0.8.1-g637023d5
API Version: v0.8.200
ABI Version: v0.8-2
Install root: /usr/local
Search path:  /usr/local/lib/arm-linux-gnueabihf/SoapySDR/modules0.8-2
Module found: /usr/local/lib/arm-linux-gnueabihf/SoapySDR/modules0.8-2/libairspyhfSupport.so (0.2.0-3e28581)
Module found: /usr/local/lib/arm-linux-gnueabihf/SoapySDR/modules0.8-2/libremoteSupport.so   (0.6.0-f7dca6e)
Available factories... airspyhf, remote
Available converters...
 -  CF32 -> [CF32, CS16, CS8, CU16, CU8]
 -  CS16 -> [CF32, CS16, CS8, CU16, CU8]
 -  CS32 -> [CS32]
 -   CS8 -> [CF32, CS16, CS8, CU16, CU8]
 -  CU16 -> [CF32, CS16, CS8]
 -   CU8 -> [CF32, CS16, CS8]
 -   F32 -> [F32, S16, S8, U16, U8]
 -   S16 -> [F32, S16, S8, U16, U8]
 -   S32 -> [S32]
 -    S8 -> [F32, S16, S8, U16, U8]
 -   U16 -> [F32, S16, S8]
 -    U8 -> [F32, S16, S8]

However when using it via SoapySDRServer it segfaults.

# SoapySDRServer --bind
######################################################
## Soapy Server -- Use any Soapy SDR remotely
######################################################

Server version: 0.6.0-gf7dca6e6
Server UUID: d8562bf0-f670-1722-8567-05d3007f0101
Launching the server... tcp://[::]:55132
Server bound to [::]:55132
Launching discovery server...
Connecting to DNS-SD daemon...
[INFO] Avahi version:  avahi 0.8
[INFO] Avahi hostname: radar-radio
[INFO] Avahi domain:   local
[INFO] Avahi FQDN:     radar-radio.local
[INFO] avahi_entry_group_add_service(radar-radio._soapy._tcp)
Press Ctrl+C to stop the server
SoapyServerListener::accept([::ffff:10.0.2.100]:60541)
SoapyServerListener::close()
SoapyServerListener::accept([::ffff:10.0.2.100]:60583)
SoapyServerListener::accept([::ffff:10.0.2.100]:60584)
Segmentation fault

The initial accept connections appear to be from the mdns connections, the crash only happens when actually activating the SDR. I tested this with Gqrz and openwebrx.

Let me know what else I can provide, if anything. I tried to get some specifics with gdb but it didn't reveal anything useful.

ast commented 1 year ago

Thanks for testing and the report @andrewpile! I will take a look as soon as I can.

ast commented 1 year ago

This was due to SoapySDRServer wanting to read very small buffers size. I have fixed that now. SoapySDRServer should not have segfaulted though. That's another bug we have to look into.

alphafox02 commented 1 year ago

Connection to SoapySDRServer, at least for me, now appears fine when connected to from Cubicsdr and SigDigger. I was able to tune and use the radio without a segmentation fault.

andrewpile commented 1 year ago

Hey I can confirm this is working for me as well, thanks!