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

Segmentation fault #17

Open
sjackman opened this issue Dec 1, 2017 · 5 comments
Open

Segmentation fault #17

sjackman opened this issue Dec 1, 2017 · 5 comments

Comments

@sjackman
Copy link

sjackman commented Dec 1, 2017

Any thoughts on why bfc segfaulted here? It had been running for 11.5 hours and was using 952 GB of RAM when it crashed.

❯❯❯ bfc -v
r181
❯❯❯ gunzip -c data.fq.gz | bfc -t16 -s14G -d data.bfc /dev/stdin /dev/null
[M::main] applied `-k 35 -b 37'
[M::bfc_count_cb] read 663715 sequences
[M::bfc_count_cb] read 663537 sequences
[M::bfc_count_cb @248.2*112.3%] processed 663715 sequences; # distinct k-mers: 4945319
[M::bfc_count_cb] read 663527 sequences
…
[M::bfc_count_cb] read 663411 sequences
[M::bfc_count_cb @39980.6*1512.8%] processed 663497 sequences; # distinct k-mers: 12783060251
[M::bfc_count_cb] read 663383 sequences
[M::bfc_count_cb @39987.7*1512.8%] processed 663411 sequences; # distinct k-mers: 12784917041
[M::bfc_count_cb] read 663362 sequences
Segmentation fault (core dumped)
@aclum
Copy link

aclum commented May 8, 2018

Was there any resolution to this? I'm having a similar issue with a similar amount of distinct kmers.

@sjackman
Copy link
Author

Not from me

@aclum
Copy link

aclum commented May 12, 2018

When I run valgrind I get

==9907== Thread 4:
==9907== Invalid read of size 8
==9907== at 0x402F98: bfc_ch_insert (htab.c:75)
==9907== by 0x404BF1: bfc_kmer_insert (count.c:61)
==9907== by 0x404BF1: worker_count (count.c:86)
==9907== by 0x401B22: ktf_worker (kthread.c:41)
==9907== by 0x5355743: start_thread (in /os/lib64/libpthread-2.22.so)
==9907== Address 0x35c8f7ec0 is 0 bytes after a block of size 32,768 alloc'd
==9907== at 0x4C2B46E: realloc (in /os/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==9907== by 0x403501: kh_resize_cnt (htab.c:9)
==9907== by 0x403501: kh_put_cnt (htab.c:9)
==9907== by 0x403501: bfc_ch_insert (htab.c:73)
==9907== by 0x404BF1: bfc_kmer_insert (count.c:61)
==9907== by 0x404BF1: worker_count (count.c:86)
==9907== by 0x401B22: ktf_worker (kthread.c:41)
==9907== by 0x5355743: start_thread (in /os/lib64/libpthread-2.22.so)
==9907==
==9907== Thread 3:
==9907== Invalid write of size 8
==9907== at 0x402731: bseq_read (bseq.c:65)
==9907== by 0x40470C: bfc_count_cb (count.c:97)
==9907== by 0x401C5C: ktp_worker (kthread.c:106)
==9907== by 0x5355743: start_thread (in /os/lib64/libpthread-2.22.so)
==9907== Address 0xc010 is not stack'd, malloc'd or (recently) free'd
==9907==
==9907==
==9907== Process terminating with default action of signal 11 (SIGSEGV)
==9907== Access not within mapped region at address 0xC010
==9907== at 0x402731: bseq_read (bseq.c:65)
==9907== by 0x40470C: bfc_count_cb (count.c:97)
==9907== by 0x401C5C: ktp_worker (kthread.c:106)
==9907== by 0x5355743: start_thread (in /os/lib64/libpthread-2.22.so)
==9907== If you believe this happened as a result of a stack
==9907== overflow in your program's main thread (unlikely but
==9907== possible), you can try to increase the size of the
==9907== main thread stack using the --main-stacksize= flag.
==9907== The main thread stack size used in this run was 8388608.
==9907==
==9907== HEAP SUMMARY:
==9907== in use at exit: 48,324,538,206 bytes in 5,370,731 blocks
==9907== total heap usage: 175,663,029 allocs, 170,292,298 frees, 120,721,831,998 bytes allocated
==9907==

@GuillaumeHolley
Copy link

Just had a Segmentation Fault (SIGSEGV) when bfc_correct started (right after bfc_count_cb finished).

@myronpeto
Copy link

I was getting a segmentation fault at that exact location but after specifying the approximate genome size and giving it more threads it completed. I also noticed that it automatically set -k 33 and -b 37. Unsure which, if any, of those changes got it working.

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