rob-p / jemalloc_segfault_test

0 stars 0 forks source link

reproduce segfault #1

Open rob-p opened 5 years ago

rob-p commented 5 years ago

Tagging @epruesse and @k3yavi here in the new repo.

To reproduce the segfault, build the executable with build.sh. You must have the following variables in the path (either exported or on the command line); BOOST_INC, BOOST_LIB, and JEMALLOC_LIB which should be, respectively the paths to the boost include directory, the boost libraries directory and the directory containing libjemalloc.a.

The segfault is triggered under valgrind and with the option MALLOC_CONF=tcache:false, but the run.sh script will take care of executing the binary in a manner that triggers the segfault. So far, this is the minimum reproducible example that I have been able to make.

rob-p commented 5 years ago

Over on the jemalloc repo, it was pointed out that valgrind is not supported in jemalloc >= 5.0. If I use version 4.5.0 instead (both in this MWE and salmon), then the execution under valgrind finishes cleanly. Unfortunately, this leaves me with no idea as to how to hunt down the cause of the salmon segfault that launched this whole endeavor, as, apparently, valgrind (and asan) are not an option. Further, as I mentioned on the bioconda issue, the problem doesn't seem to happen with the system allocator.

epruesse commented 5 years ago

Sorry to hear that @rob-p

So back to that segfault.

Can you get to the point where that exact condition happens in a binary built locally while running with gdb?

rob-p commented 5 years ago

Hi @epruesse,

Unfortunately not. Under valgrind, I am unable to get the segfault using the locally compiled version --- regardless of the version of jemalloc I use. Also, I tried installing via bioconda under s docker on the offending machine against exactly the same ubuntu distribution we have locally (16.10), but this does not produce the segfault --- the bioconda executable runs cleanly there. I am really starting to wonder what special sauce the combination of the bioconda executable and running natively on our server has.

epruesse commented 5 years ago

I'm sorry this is so tedious.

You could try using the bioconda-utils-build-env container to reproduce the bioconda build process. In theory, you should get the same binary. From there, you could try to narrow things down.