Skip to content
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

SIGSEGV: memory access violation (Running test app: caribou_dump1090) #196

Open
ki6uve opened this issue Mar 11, 2024 · 30 comments
Open

SIGSEGV: memory access violation (Running test app: caribou_dump1090) #196

ki6uve opened this issue Mar 11, 2024 · 30 comments

Comments

@ki6uve
Copy link

ki6uve commented Mar 11, 2024

Getting this error with running the CaribouLite test app:
./caribou_dump1090

soapy_sighandler caught SIGSEGV
[INFO] soapy_sighandler killing soapy_cariboulite (cariboulite_release_driver)
CaribouLite: Signal [11] received from pid=[-1695350262]
Signal [11] caught, with the following information:
signal errno = 0
signal process pid = -1695350262
signal process uid = 65535
signal status = 0
signal errno / SIGSEGV / the process access a valid region of memory in an invalid way - violated memory access permissions
SIGSEGV: memory access violation

Anyone have any solutions?

@mjmckenna
Copy link

Hi.... are you running with PiOS or DragonOS? I downloaded the latest DragonOS with the 6.5 kernel (https://www.youtube.com/watch?v=oa9ZlwYyCxA&t=310s) and was able to get the cariboulite to transmit CW with the test app from both the 1HGz narrowband and wideband channels.

@ki6uve
Copy link
Author

ki6uve commented Mar 11, 2024

Yes, I'm using the latest DragonOS. SDR++ works but cannot get Dump1090 to work with the CaribouLite.

@ki6uve
Copy link
Author

ki6uve commented Mar 12, 2024

Does anyone know if the CaribouLite SDR project is abandoned? Are there any other places to reach people who have one and can help with getting it working?

@alphafox02
Copy link

I’m trying to get back to checking this as well, can someone confirm the main branch compiled on DragonOS. I only tested the fork someone had created to address the 6.5 kernel. I’ll rebuild and try the dump1090 app, but out of curiosity - does it need to be that specific app vs using another that’s capable of using soapy input for 1090 info? I mean for a temporary workaround.

@ki6uve
Copy link
Author

ki6uve commented Mar 12, 2024

I don't know if I specifically need dump1090...I'm just trying to get the RPi with CaribouLite to feed ADSB data into my Virtual Radar app for displaying air traffic. When I run the dump1090 test app, I get the error above. When I run the full version of Dump1090, it fails to launch stating that it couldn't find a compatible RTLSDR.

@mjmckenna
Copy link

mjmckenna commented Mar 13, 2024 via email

@alphafox02
Copy link

I just attempted to build from main on this repo on latest DragonOS Pi64, but making the changes as shown roughly in the video from the forked repo, checking user groups, and applying the chmod g+rw /dev/gpiomem

and even CubicSDR I’m getting a SIGSEGV memory access violation. I swear every time I get exited to see new updates to the repo I run into an issue with running it each time. I’ll have to drop back to the forked repo where I last new things would run and try the 1090 app with that.

@alphafox02
Copy link

Nevermind I made a mistake and left dtparam=i2c_arm=on in place without commenting it out.

Fixed that, rebooted, built the dump1090 app and it’s now running. Waiting to see if it shows any aircraft.

@ki6uve
Copy link
Author

ki6uve commented Mar 13, 2024

Are you using the CaribouLite on an RPi4? Please post a link to which Dump1090 branch you used. Thanks!!

@alphafox02
Copy link

I may have been confused as to what you meant by dump 1090. I thought you were trying to use the dump 1090 app that is in this repository for the hat. Seems to be a very basic one. I’ll try something else.

@ki6uve
Copy link
Author

ki6uve commented Mar 13, 2024

Redid every again to test it and I still cannot get it working. These are the exact steps I used:

  1. Flashed card with DragonOS Pi64 Beta 35.1
  2. mkdir projects
  3. git clone https://github.com/unixpunk/cariboulite.git
  4. cd cariboulite
  5. git checkout patch-1
  6. ./install.sh
  7. edit /boot/firmware/config.txt with the following:
  8. Comment out 'dtparam=i2c_arm=on' and ' dtparam=spi=on
  9. Added: 'dtparam=i2c_vc=on' and 'dtoverlay=spi1-3cs'
  10. sudo usermod -aG dialout,root ubuntu
  11. sudo nano /etc/rc.local
  12. Added: 'chmod g+rw /dev/gpiomem'
  13. Rebooted
  14. Navigate to ~/projects/cariboulite/examples/cpp
  15. mkdir build
  16. cd build/
  17. cmake ../
  18. make
  19. ./caribou_dump1090

Then I get the error listed above regarding memory violation

@ki6uve
Copy link
Author

ki6uve commented Mar 14, 2024

Well, I tried again with 32bit bullseye version of the OS, but same error. So frustrating.

@alphafox02
Copy link

Can you show your config.txt ?

@ki6uve
Copy link
Author

ki6uve commented Mar 14, 2024

[all]
kernel=vmlinuz
cmdline=cmdline.txt
initramfs initrd.img followkernel

[pi4]
max_framebuffers=2
arm_boost=1

[all]

Enable the audio output, I2C and SPI interfaces on the GPIO header. As these

parameters related to the base device-tree they must appear before any

other dtoverlay= specification

dtparam=audio=on
#dtparam=i2c_arm=on
#dtparam=spi=on
dtparam=i2c_vc=on
dtoverlay=spi1-3cs
dtoverlay=smi-dev

Comment out the following line if the edges of the desktop appear outside

the edges of your display

disable_overscan=1

uncomment this if your display has a black border of unused pixels visible

and your display can output without overscan

#disable_overscan=1

If you have issues with audio, you may try uncommenting the following line

which forces the HDMI output into HDMI mode instead of DVI (which doesn't

support audio output)

#hdmi_drive=2
hdmi_force_hotplug=1

#Next is for headless usage only (no HDMI connected) and 1080P resolution
#hdmi_force_mode=1
#hdmi_group=2
#hdmi_mode=82

[cm4]

Enable the USB2 outputs on the IO board (assuming your CM4 is plugged into

such a board)

dtoverlay=dwc2,dr_mode=host

[all]

Enable the KMS ("full" KMS) graphics overlay, leaving GPU memory as the

default (the kernel is in control of graphics memory with full KMS)

#Comment the below line for headless usage
dtoverlay=vc4-kms-v3d

Autoload overlays for any recognized cameras or displays that are attached

@ki6uve
Copy link
Author

ki6uve commented Mar 14, 2024

Maybe my headers are not correct. I do get this error too:
sudo apt-get -y install raspberrypi-kernel-headers module-assistant
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package raspberrypi-kernel-headers

@mjmckenna
Copy link

mjmckenna commented Mar 14, 2024 via email

@ki6uve
Copy link
Author

ki6uve commented Mar 15, 2024

Mark:
The video for R34 didn't show commenting out the RPi headers in the install.sh. Does that still need to be done if I am trying this with Dragon R35.1?

@mjmckenna
Copy link

mjmckenna commented Mar 15, 2024 via email

@ki6uve
Copy link
Author

ki6uve commented Mar 15, 2024

Mark:
Were you ever able to get cariboulite working with dump1090? If so, what DragonOS version? Also, what cariboulite branch? UnixPunk patch-1 or something else.

@unixpunk
Copy link
Contributor

@ki6uve @mjmckenna i don't believe anyone has gotten much to work beyond software that supports SoapySDR. the different dump1090's don't seem to work yet (unless you find one supporting soapysdr), gnuradio, gqrx and other software trying to use the driver directly might still be a problem. SoapySDRServer / SoapyRemote, CubicSDR work fine as examples of some using SoapySDR.

You also need to make sure your user/group has rw access to /dev/gpiomem so that you don't need to use sudo as using sudo will cause other issues with CubicSDR, for example, because pulseaudio may not be running at the system level/under root.

hth. we're all mostly waiting and trying to contribute where we can but appears most of us end-users aren't software developers by day, though I'm seeing some new hero's contributing!

@mjmckenna
Copy link

mjmckenna commented Mar 15, 2024 via email

@mjmckenna
Copy link

mjmckenna commented Mar 15, 2024 via email

@unixpunk
Copy link
Contributor

i've not tried tx yet, last i saw it was cw-only until this pr is complete: #197

@alphafox02
Copy link

alphafox02 commented Mar 17, 2024

Okay I'm back! in the copy/paste above of the config.txt on DragonOS I notice you have this line,
dtoverlay=smi-dev

Did you add that? In my configuration I've got the two dtparam lines commented out, then added the i2c_vc and spi1-3cs and right after that it does into the comment out the following line if the edges blah blah.

Remove that dtoverlay=smi-dev and reboot. See if your issue goes away.

Also to catch everyone up on the latest DragonOS Pi64 image I shoved in the 6.5 kernel to provide 22.04 the ability to run on the Pi5. I have also put the kernel headers for that specific kernel. There's no need to add anything else nor change the kernel. In fact the kernel won't ever update unless you pull down and manually do so.

@alphafox02
Copy link

Aslo @unixpunk I did try the from main code here and manually had to edit the cpp file that you did, the line number has changed where the extra parameter needs removed. If the developer made that one change, the install goes basically perfectly to include the groups being added to the user.

@ki6uve
Copy link
Author

ki6uve commented Mar 17, 2024 via email

@alphafox02
Copy link

I made a new ticket with the exact steps I took. I’ll go update it thought to mention building the dump1090 app.

@ki6uve
Copy link
Author

ki6uve commented Mar 18, 2024 via email

@alphafox02
Copy link

I'm getting now a memmor access violation with gqrx, but nothing else (yet).

@unixpunk
Copy link
Contributor

Aslo @unixpunk I did try the from main code here and manually had to edit the cpp file that you did, the line number has changed where the extra parameter needs removed. If the developer made that one change, the install goes basically perfectly to include the groups being added to the user.

@alphafox02 I found my change solves the issue for DragonOS's version of Ubuntu but it breaks it for other OS versions, don't recall specifically if it was Raspbian or what I saw it with and had to undo my change to build... I have no idea why the difference; this is why they haven't merged it yet I assume.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants