-
Notifications
You must be signed in to change notification settings - Fork 164
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
Segmentation fault with shipped example #835
Comments
/cc: @rob-p |
Hi @tillea and @nileshpatra, thanks for the report (and ping). Can you point me to a Docker / Singularity container of the relevant Debian build so I can try and reproduce locally? This will make debugging much easier. For example, I am unable to reproduce this issue building the latest release from the In particular, release 1.10 addresses a rare (but stubborn) segfault that certainly was present in 1.9. However, the fix for this is in the corresponding tagged release of pufferfish, which is pulled in by the build script when salmon is built. |
I also tried on the Attempt to reproduce segfault on Debian:testing
which leads to the output
The
returns succesfully with a built index
So on |
Weird. Can you try with a debian:sid image instead? I am able to repro this in a debian-sid choot for instance. |
I can try that later today. Does your list of installed dependencies look different? The thing that's strange about this is that the main motivation for releasing 1.10 was a discovery of an intermittent segfault due to UB at exactly this spot. But that was resolved in the associated tagged pufferfish upstream and checked further with both valgrind and asan. |
I've tried to reproduce the issue in docker by using the Build-Depends that are used in Debian:
So somehow this does not build - but I have the impression that the linker issues are caused by some missing CMAKE options (as well as using the build directory). Thus I used the cmake command line as its used in the Debian packaging:
Please note that Hope this helps tracking down the issue. Kind regards, Andreas. |
Hi @tillea! Thanks for the added details, I'll try and repro with these. I noticed 2 other differences and wonder if they matter. The first is that your configure does The other is that you seem to be doing an in source build. I.e. building directly in the salmon dir rather than in a build directory. I'm actually a bit surprised the build works in that way, as it isn't designed to be an in source build. I can try and see if either of those matter on my end, but wonder if you have insight into either. Thanks, |
Hi @tillea, Thanks for the further details. I'll try with your approach. Two other differences to note between the builds that I wonder if they would matter:
Anyway, I will try these out today but wanted to mention them to get your read just in case. Thanks, |
Ok, when I attempt the build the way you say above, I get the following error during CMake:
It seems At that point, I was able to reproduce the issue! So, it seems to me the underlying problem is coming from one of the upstream dependencies (i.e. libraries being linked to). I will try see if I can find the offender. In general, we like to statically link salmon for exactly this reason. Outside of package systems with which I am familiar (e.g. conda), we don't have a lot of experience in specifying dependent package version constrains, which I believe to be at fault here. |
Using the rest of the same configure flags without --Rob |
So, it turns out that with the dependency setup that is pulled in, I can't even get For the time being, I think the options are to do a more "standard" build (i.e. like the first one I suggested that pull in only that minimal set of dependencies and let salmon itself statically link the rest), or to try and look at the upstream shared libraries being linked and figure out which of them is misversioned. --Rob |
Did you do the
step? I can't imagine that you get this problem if you follow my log step by step. Debian is usually using dynamic linking. By having all Build-Dependencies (which is ensured in the step above) the existence of the libraries is granted and the options for cmake I specified are ensuring that the libs are found. Kind regards, Andreas. |
Hi @tillea, It seems this is exactly the problem. The build deps here are not quite correct. There are dependencies that salmon no longer has, and some of the dependencies it does have are out of date and can't be used from upstream (e.g. libstaden in the latest version, among others). On the bright side, it's not the dynamic linking alone that is problematic. The following works fine on my end:
This is preferring dynamic linking, and the resulting installed executable runs fine without a segfault. Can you try this on your end? Then the thing to do may be to find what is discordant between the packages I install above and what gets pulled in by Thanks, |
Hi @rob-p,
which does not change the SEGFAULT problem. If the issue belongs to something we need to download from somewhere please let me know what looks suspicious to you. This would be helpful since we could either add it to the Debian package source in debian/missing-sources ... or rather fix the predependency that would break salmon. |
Hi Andreas, So I don't know if there is a easy way to get the specific list of reverse dependencies, but then we can cross-check it with my explicit list above:
One thing I noticed during build is that, while I included Regarding dependencies that can't be used — the current So, I think the easiest way to move forward is to:
Best, |
I think we should sort out this issue step by step. If you say |
Hi @tillea, So I went through the list of deps pulled in by As a result I came up with this list of dependencies. The offending dependency seems to be Please let me know if this you observe this same behavior as well (also @nileshpatra may want to try this out). If so, perhaps we can get Best, |
Hi @tillea and @nileshpatra, Ok, I dug deeper and found out what's going on. The culprit is, in fact, On the plus side, this was relatively easy to fix by bumping the included cereal headers in pufferfish. I also updated the This is now tagged and released as Thanks! |
Hi, |
Thanks! We can circle back around to the |
The bug is primarily related to salmon (bulk mode)
Describe the bug
After building salmon it segfaults with the example file shipped with the source tarball.
The problem is described in detail in the Debian bug tracking system. While the Debian bug is against version 1.9.0 I can perfectly reproduce the issue with a recent download of version 1.10.0
To Reproduce
Steps and data to reproduce the behavior:
Download your release tarball.
sample_data
shipped with the release tarballExpected behavior
Clean processing without SEGFAULT.
Desktop (please complete the following information):
Additional context
Kind regards, Andreas.
The text was updated successfully, but these errors were encountered: