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

segfault: OpenMemoryMappedFile datatest/OverflowTable mmap failed: Invalid argument #129

Closed
mr-c opened this issue Nov 28, 2020 · 5 comments

Comments

@mr-c
Copy link
Contributor

mr-c commented Nov 28, 2020

Hello, while updating the snap-aligner package to version 1.0.0 I've run into a segfault running a test:

snap-aligner single datatest datatest.fq -o output.sam
Welcome to SNAP version 1.0.0.

Loading index from directory... snap-aligner: OpenMemoryMappedFile datatest/OverflowTable mmap failed: Invalid argument
debian/tests/run-unit-test: line 37: 3913446 Segmentation fault      (core dumped) snap-aligner single datatest datatest.fq -o output.sam
Core was generated by `snap-aligner single datatest datatest.fq -o output.sam'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000055a729889ec4 in AdviseMemoryMappedFilePrefetch (mappedFile=0x0) at SNAPLib/Compat.cpp:1602

1602	  if (madvise(mappedFile->map, mappedFile->length, MADV_SEQUENTIAL)) {
(gdb) bt
#0  0x000055a729889ec4 in AdviseMemoryMappedFilePrefetch (mappedFile=0x0) at SNAPLib/Compat.cpp:1602
#1  0x000055a72989970d in GenericFile_map::prefetch (this=0x55a729c5c370) at SNAPLib/GenericFile_map.cpp:61
#2  0x000055a72989d68c in GenomeIndex::loadFromDirectory (directoryName=0x7ffcdfe1d04a "datatest", map=<optimized out>, prefetch=<optimized out>) at SNAPLib/GenomeIndex.cpp:1791
#3  0x000055a72986d1a0 in AlignerContext::initialize (this=0x7ffcdfc1b610) at SNAPLib/AlignerContext.cpp:211
#4  0x000055a72986e994 in AlignerContext::runAlignment (this=0x7ffcdfc1b610, argc=5, argv=<optimized out>, version=<optimized out>, argsConsumed=0x7ffcdfc1b60c) at SNAPLib/AlignerContext.cpp:101
#5  0x000055a729888ba4 in ProcessNonDaemonCommands (argc=6, argv=0x7ffcdfe1ba48) at SNAPLib/CommandProcessor.cpp:67
#6  0x000055a72986b069 in main (argc=<optimized out>, argv=<optimized out>) at apps/snap/Main.cpp:32

Here's the complete build log with Debian package versions and exact compilation flags used: https://gist.github.com/mr-c/c8b4c61d511a80bfcae7bef65fde105e

@arun-sub
Copy link
Collaborator

Thanks for reporting this. I pushed a fix to the affineGap branch. Could you please try it out and let me know if it works for you ?

--Arun

@mr-c
Copy link
Contributor Author

mr-c commented Nov 29, 2020

Dear @arun-sub ; that worked, thanks! I've just upload snap-aligner v1.0.0 to Debian's development distribution with your patch.

@arun-sub
Copy link
Collaborator

I merged the changes to master, so you can pull the latest commit with the fix as well.

@bolosky
Copy link
Contributor

bolosky commented Nov 29, 2020 via email

@mr-c
Copy link
Contributor Author

mr-c commented Nov 29, 2020

Thanks all, I think this issue has been resolved!

@mr-c mr-c closed this as completed Nov 29, 2020
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

3 participants