-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Segmentation fault on Alpine Linux #446
Comments
So I also tried to cmake RTLSDR-Airband with Debug flag SoapySDR: device 'driver=airspy,device_id=0' initialized
[New LWP 57]
[New LWP 58]
[LWP 58 exited]
Thread 6 "rtl_airband" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 57]
0x0000007ff7e0c744 in SoapySDRDevice_setupStream () from /usr/local/lib/libSoapySDR.so.0.8-3 backtrace shows: #0 0x0000007ff7e0c744 in SoapySDRDevice_setupStream () from /usr/local/lib/libSoapySDR.so.0.8-3
#1 0x000000555556b46c in soapysdr_rx_thread (ctx=0x7ff7f3ce70) at /app/RTLSDR-Airband-4.2.0/src/input-soapysdr.cpp:315
#2 0x0000007ff7f9f118 in start (p=0x7ff6aa96a0) at src/thread/pthread_create.c:207
#3 0x0000007ff7f9d4c8 in __clone () at src/thread/aarch64/clone.s:28
Backtrace stopped: previous frame identical to this frame (corrupt stack?) |
I also tried to build the SoapySDR libs with debug and run the Airband again: (gdb) bt
#0 0x0000007ff7de3e9c in SoapySDRDevice_setupStream (device=<error reading variable: Cannot access memory at address 0x7ff6a1b368>,
direction=<error reading variable: Cannot access memory at address 0x7ff6a1b364>,
format=<error reading variable: Cannot access memory at address 0x7ff6a1b358>,
channels=<error reading variable: Cannot access memory at address 0x7ff6a1b350>,
numChans=<error reading variable: Cannot access memory at address 0x7ff6a1b348>,
args=<error reading variable: Cannot access memory at address 0x7ff6a1b340>) at /app/SoapySDR/lib/DeviceC.cpp:161
#1 0x000000555556b46c in soapysdr_rx_thread (ctx=0x7ff7f3ce70) at /app/RTLSDR-Airband-4.2.0/src/input-soapysdr.cpp:315
#2 0x0000007ff7f9f118 in start (p=0x7ff6a696b8) at src/thread/pthread_create.c:207
#3 0x0000007ff7f9d4c8 in __clone () at src/thread/aarch64/clone.s:28
Backtrace stopped: previous frame identical to this frame (corrupt stack?) |
I started something similar in #444 with Are you building the docker container and running it on the same machine? What is the underlying hardware? One thing you can try is adding It's interesting that using |
Thanks for a really quick reply! I will let you know after I try all of it. Its true, that I am using github actions and compiling it for aarch64 (64 bit ARM for Raspberry PI..). But it is not cross compiling. The Actions create QEMU virtual machine with the same architecture. But I will also try it in a Linux VM on x86. I have already tried the prebuilt packages, that was my first try in "fixing it", but no fun. Anyways its not dealbreaking when it works without issues on Debian base, but I will try to narrow the problem! |
Hi, I tried to dockerize RTLSDR-Airband with alpine linux as a base image. It worked great using just librtlsdr driver. But when I also built it with SoapySDR support and then tried to use it, it segfaults just before starting the device.
The device works when I try to probe it inside alpine container and test rate using SoapySDRUtil. But RTLSDR-Airband segfaults. Can it be that Alpine uses smaller stack memory?
This works:
docker run --device="/dev/bus/usb:/dev/bus/usb" -it container_name sh SoapySDRUtil --args=driver=airspy --rate=3000000 --direction=RX
But when starting RTLSDR-Airband -> Last 2 lines from debug:
First I tried to use multi-stage build to make more optimized images, but in order to minimize errors, I also built it in one go. Still same error. When I used much bigger debian as a base, it worked right away. The alpine is nice that it gives 18-20MB image size.
Alpine Linux Dockerfile (using just one stage)
Working debian base:
rtl_airband.conf
The text was updated successfully, but these errors were encountered: