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 with empty input fastq #23

Open
sstrong99 opened this issue Nov 8, 2023 · 0 comments
Open

segfault with empty input fastq #23

sstrong99 opened this issue Nov 8, 2023 · 0 comments

Comments

@sstrong99
Copy link

sstrong99 commented Nov 8, 2023

When running with an empty input fastq (or fastqs for PE), the software fails with a segmentation fault. The output before the error is

...
p29745_AGTACGATCGAGTGTACAGTGAACA: 0
0
Mean depth: 0

Result: NEGATIVE (threshold: 0.1)

Duplication rate (may be overestimated since this is SE data): 0%
Segmentation fault

To reproduce:

gzip -c /dev/null > in1.fastq.gz
fastv --in1 in1.fastq.gz -k data/SARS-CoV-2.kmer.fa
  • The same error occurs if you also provide an empty fastq for --in2
  • The same error occurs if you provide uncompressed input files
  • I have been running this in an ubuntu docker container containing fastv. When I build the container using --platform linux/amd64, this error occurs, but when i build it with --platform linux/arm64/v8, the error does not occur.

The backtrace at the segfault (from gdb) is below:

#0  0x000055555541ecf5 in std::char_traits<char>::copy (__n=4, __s2=0x7fffffffd1d0 "-nan", __s1=<optimized out>) at /usr/include/c++/7/bits/char_traits.h:350
#1  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy (__n=4, __s=0x7fffffffd1d0 "-nan", __d=<optimized out>)
    at /usr/include/c++/7/bits/basic_string.h:340
#2  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy_chars (__k2=0x7fffffffd1d4 "", __k1=0x7fffffffd1d0 "-nan",
    __p=<optimized out>) at /usr/include/c++/7/bits/basic_string.h:382
#3  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*> (__end=0x7fffffffd1d4 "", __beg=0x7fffffffd1d0 "-nan",
    this=0x7fffffffd4c0) at /usr/include/c++/7/bits/basic_string.tcc:225
#4  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct_aux<char*> (__end=0x7fffffffd1d4 "",
    __beg=0x7fffffffd1d0 "-nan", this=0x7fffffffd4c0) at /usr/include/c++/7/bits/basic_string.h:236
#5  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*> (__end=0x7fffffffd1d4 "", __beg=0x7fffffffd1d0 "-nan",
    this=0x7fffffffd4c0) at /usr/include/c++/7/bits/basic_string.h:255
#6  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*, void> (__a=..., __end=0x7fffffffd1d4 "",
    __beg=0x7fffffffd1d0 "-nan", this=0x7fffffffd4c0) at /usr/include/c++/7/bits/basic_string.h:607
#7  __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char> (__convf=<optimized out>, __n=328,
    __fmt=0x5555554862c4 "%f", __fmt=0x5555554862c4 "%f", __n=328, __convf=<optimized out>) at /usr/include/c++/7/ext/string_conversions.h:115
#8  0x0000555555421124 in std:: (__val=<optimized out>) at /usr/include/c++/7/bits/basic_string.h:6462
#9  FilterResult::reportHtml (this=0x555556213f10, ofs=..., totalReads=<optimized out>, totalBases=0) at src/filterresult.cpp:319
#10 0x0000000000000000 in ?? ()
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

1 participant