flightaware / dump978

FlightAware's 978MHz UAT demodulator
BSD 2-Clause "Simplified" License
40 stars 16 forks source link

dump978-fa on Ubuntu 20.04 #12

Closed phipac closed 3 years ago

phipac commented 3 years ago

Greetings, friends. I was able to get dump1090-fa and piaware and all of the goodies set up and working on my Ubuntu 20.04 machine, but dump978 is giving me a hassle. I have a feeling it has something to do with soapy, because at some point I probably installed soapy while playing with another SDR. The problem is, I can't find the exact problem. I appreciate your patience with someone who is newish to coding. Thank you!

uname -a Linux hamdell 5.8.0-48-generic #54~20.04.1-Ubuntu SMP Sat Mar 20 13:40:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

sfixphdi@hamdell:~$ sudo systemctl start dump978-fa sfixphdi@hamdell:~$ sudo systemctl status dump978-fa ● dump978-fa.service - dump978 ADS-B UAT receiver Loaded: loaded (/lib/systemd/system/dump978-fa.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: core-dump) since Tue 2021-03-30 18:46:05 PDT; 5s ago Docs: https://flightaware.com/adsb/piaware/ Process: 5703 ExecStart=/usr/share/dump978-fa/start-dump978-fa (code=dumped, signal=SEGV) Main PID: 5703 (code=dumped, signal=SEGV)

From /var/log/syslog:

Mar 30 18:46:35 hamdell systemd[1]: dump978-fa.service: Scheduled restart job, restart counter is at 24. Mar 30 18:46:35 hamdell systemd[1]: Stopped dump978 ADS-B UAT receiver. Mar 30 18:46:35 hamdell systemd[1]: Started dump978 ADS-B UAT receiver. Mar 30 18:46:35 hamdell dump978-fa[5786]: raw-port: listening for connections on 0.0.0.0:30978 Mar 30 18:46:35 hamdell dump978-fa[5786]: raw-port: listening for connections on [::]:30978 Mar 30 18:46:35 hamdell dump978-fa[5786]: json-port: listening for connections on 0.0.0.0:30979 Mar 30 18:46:35 hamdell dump978-fa[5786]: json-port: listening for connections on [::]:30979 Mar 30 18:46:35 hamdell dump978-fa[5786]: usb_claim_interface error -6 Mar 30 18:46:36 hamdell dump978-fa[5786]: Found Rafael Micro R820T tuner Mar 30 18:46:36 hamdell dump978-fa[5786]: Detached kernel driver Mar 30 18:46:36 hamdell dump978-fa[5786]: Found Rafael Micro R820T tuner Mar 30 18:46:37 hamdell dump978-fa[5786]: Reattached kernel driver Mar 30 18:46:37 hamdell dump978-fa[5786]: Detached kernel driver Mar 30 18:46:37 hamdell dump978-fa[5786]: Found Rafael Micro R820T tuner Mar 30 18:46:37 hamdell dump978-fa[5786]: Reattached kernel driver Mar 30 18:46:37 hamdell dump978-fa[5786]: Detached kernel driver Mar 30 18:46:37 hamdell dump978-fa[5786]: Found Rafael Micro R820T tuner Mar 30 18:46:38 hamdell dump978-fa[5786]: Reattached kernel driver Mar 30 18:46:38 hamdell dump978-fa[5786]: Detached kernel driver Mar 30 18:46:38 hamdell dump978-fa[5786]: Found Rafael Micro R820T tuner Mar 30 18:46:38 hamdell dump978-fa[5786]: Reattached kernel driver Mar 30 18:46:38 hamdell dump978-fa[5786]: Detached kernel driver Mar 30 18:46:39 hamdell dump978-fa[5786]: Found Rafael Micro R820T tuner Mar 30 18:46:39 hamdell dump978-fa[5786]: Reattached kernel driver Mar 30 18:46:39 hamdell dump978-fa[5786]: Found Rafael Micro R820T tuner Mar 30 18:46:39 hamdell kernel: [ 829.175093] dump978-fa[5786]: segfault at 1 ip 00007f3c92862891 sp 00007ffdea9e8080 error 4 in libSoapySDR.so.0.7.2[7f3c92857000+38000] Mar 30 18:46:39 hamdell systemd[1]: dump978-fa.service: Main process exited, code=dumped, status=11/SEGV Mar 30 18:46:39 hamdell systemd[1]: dump978-fa.service: Failed with result 'core-dump'.

Thank you very much for your assistance!

mutability commented 3 years ago

Mar 30 18:46:35 hamdell dump978-fa[5786]: usb_claim_interface error -6

This means that there is another process which is using the SDR device, preventing dump978 from using it. Is this a dual 1090/978 setup? Are you also running dump1090? Have you serialized your dongles and configured dump1090/978 with corresponding serial numbers?

Mar 30 18:46:39 hamdell kernel: [ 829.175093] dump978-fa[5786]: segfault at 1 ip 00007f3c92862891 sp 00007ffdea9e8080 error 4 in libSoapySDR.so.0.7.2[7f3c92857000+38000]

Haven't seen that one before. I do have a similar Ubuntu install here so I'll have a play and see if I can reproduce it.

mutability commented 3 years ago

No luck reproducing that segfault with:

VERSION="20.04.2 LTS (Focal Fossa)"

ii  libsoapysdr0.7:amd64               0.7.2-1        amd64        software defined radio interface library
ii  soapysdr0.7-module-rtlsdr:amd64    0.3.0-2build1  amd64        RTL-SDR device support for SoapySDR

Linux travel 5.4.0-66-generic #74-Ubuntu SMP Wed Jan 27 22:54:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ ./dump978-fa --sdr 'driver=rtlsdr' --format CS8 --raw-port 30978 --json-port 30979
raw-port: listening for connections on 0.0.0.0:30978
raw-port: listening for connections on [::]:30978
json-port: listening for connections on 0.0.0.0:30979
json-port: listening for connections on [::]:30979
usb_claim_interface error -6
usb_claim_interface error -6
SoapySDR: using maximum manual gain 0.0 dB
SoapySDR: using stream setting buffsize=262144
Message source reports error: TIMEOUT
Abnormal exit
phipac commented 3 years ago

Thank you for your time. I do have many things running on here, but for testing purposes I have disconnected all other dongles and stopped all other services.

$ rtl_test -d 00000978 Found 1 device(s): 0: Realtek, RTL2832U, SN: 00000978

Using device 0: Generic RTL2832U Found Rafael Micro R820T tuner Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6 [R82XX] PLL not locked! Sampling at 2048000 S/s.

Info: This tool will continuously read from the device, and report if samples get lost. If you observe no further output, everything is fine.

Reading samples in async mode... lost at least 32 bytes

$ ./dump978-fa --sdr driver=rtlsdr,serial=00000978 --format CS8 Found Rafael Micro R820T tuner Found Rafael Micro R820T tuner Segmentation fault (core dumped)

$ cat /var/log/syslog | grep kernel Mar 31 11:25:22 hamdell kernel: [60752.423205] dump978-fa[224450]: segfault at 1 ip 00007f5c1c1eb891 sp 00007ffdfac146c0 error 4 in libSoapySDR.so.0.7.2[7f5c1c1e0000+38000] Mar 31 11:25:22 hamdell kernel: [60752.423223] Code: 55 ff ff 66 0f 1f 44 00 00 f3 0f 1e fa 41 55 41 54 49 89 fc 55 53 48 83 ec 48 64 48 8b 04 25 28 00 00 00 48 89 44 24 38 31 c0 <48> 8b 06 48 c7 07 00 00 00 00 48 c7 47 08 00 00 00 00 48 8b 80 f0

phipac commented 3 years ago

Update

I did $ sudo apt install --reinstall soapysdr*

Now I get an additional error

$ ./dump978-fa --sdr driver=rtlsdr,serial=00000978 --format CS8 SoapySDR: ERROR: SoapySDR::loadModule(/usr/lib/x86_64-linux-gnu/SoapySDR/modules0.7/librfspaceSupport.so) dlopen() failed: /usr/lib/x86_64-linux-gnu/SoapySDR/modules0.7/librfspaceSupport.so: undefined symbol: _ZN5boost6chrono12steady_clock3nowEv usb_claim_interface error -6 Found Rafael Micro R820T tuner Found Rafael Micro R820T tuner Segmentation fault (core dumped)

mutability commented 3 years ago

How did you build dump978?

phipac commented 3 years ago

Using option 3.3 from this guide: https://discussions.flightaware.com/t/howto-install-piaware-4-0-on-debian-10-amd64-ubuntu-20-amd64-kali-2020-amd64-on-pc/69753

phipac commented 3 years ago

I am so sorry to have used up so much of your time.

After carefully removing all instances of Soapy* on the system, I was finally able to get a clean install of Soapy so that now all is well. Feel free to close the ticket, and again I appreciate your time.

-Phil