sharkdp / binocle

a graphical tool to visualize binary data
Apache License 2.0
1.12k stars 32 forks source link

Segmentation fault on Linux Mint 20.2 #30

Closed romain-dartigues closed 2 years ago

romain-dartigues commented 3 years ago

I was really exited to test it but I get a segfault every times...

Tested the debian and tarball build on Linux Mint 20.2 ( / Unbuntu bionic) x86_64 (Linux 5.4.0-88-generic) inside VirtualBox. I also attempted a custom build with cargo 1.56.0 with no better results.

Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `binocle xq'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fe980281b40 in ?? () from /usr/lib/x86_64-linux-gnu/libvulkan_lvp.so
[Current thread is 1 (Thread 0x7fe94d7fa700 (LWP 315115))]
$ dpkg -l | grep vulkan
ii  libvulkan1:amd64           1.2.131.2-1                amd64  Vulkan loader library
ii  mesa-vulkan-drivers:amd64  21.0.3-0ubuntu0.3~20.04.3  amd64  Mesa Vulkan graphics drivers
sharkdp commented 3 years ago

Thank you very much for reporting this. Unfortunately, I don't really know how to move forward with debugging this. Looks very much like it could be Vulkan related somehow, but I don't really have any experience with this. Does vkcube work for you?

romain-dartigues commented 3 years ago

Yes, vkube (from vulkan-tools amd64 1.2.131.1+dfsg1-1) does work.

The problem I get with binocle is weird; the interface does popup and display for a fraction of second before segfaulting.

If you can guide me through some steps to generate an useful trace, I will happily provide.

parasyte commented 3 years ago

libvulkan_lvp.so is the LLVMpipe driver, which is known to have some bugs. Updating to a more recent Mesa package might help...

sharkdp commented 3 years ago

@parasyte Thank you for answering here. And thank you very much for the great library!

@romain-dartigues did you have a chance to test this?

romain-dartigues commented 2 years ago

With a lot of delay I finally tried @parasyte suggestion.

After adding kisak/kisak-mesa PPA the following packages were updated:

libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libegl1-mesa libgl1-mesa-glx libgles2-mesa libva-drm2 libva-wayland2 libva-x11-2 libva2 libwayland-egl1-mesa va-driver-all

Unfortunately libvulkan_lvp.so is provided by the package mesa-vulkan-drivers which was kept back (and it didn't affect the segfault). So apt-get install mesa-vulkan-drivers=21.3.1~kisak2~f, apt upgrade, yada yada, then trying to recompile with cargo install --force (in doubt).

And now it does work. Thank you Jay! Thank you Peter.