Open junaruga opened 1 year ago
The SIGABRT is happening at the line below.
#7 BranchQueue::front (this=<optimized out>) at /builddir/build/BUILD/bowtie-1.3.1-> src/range_source.h:1164
I was able to reproduce with minimal reproducing script on the current master branch <86c6d7797228ec808ace59f368979c3019471ec7>.
Without the CXXFLAGS='-Wp,-D_GLIBCXX_ASSERTIONS'
, the test passed.
$ g++ --version
g++ (GCC) 13.0.1 20230127 (Red Hat 13.0.1-0)
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ CXXFLAGS='-Wp,-D_GLIBCXX_ASSERTIONS' make allall
$ scripts/test/simple_tests.pl --bowtie=./bowtie --bowtie-build=./bowtie-build
...
Cline paired 2 (fw:1, sam:1)
References:
>0
AGCATCGATCAAAAACTGA
./bowtie-build --threads 2 --quiet --sanity .simple_tests.pl.fa .simple_tests.tmp
./bowtie --debug -s 1 -S --quiet -a .simple_tests.tmp -c -1 AGCATCGATC:IIIIIIIIII,TCAGTTTTTGA:IIIIIIIIIII -2 TCAGTTTTTGA:IIIIIIIIIII,AGCATCGATC:IIIIIIIIII
Setting the index via positional argument will be deprecated in a future release. Please use -x option instead.
/usr/include/c++/13/bits/stl_queue.h:725: std::priority_queue<_Tp, _Sequence, _Compare>::const_reference std::priority_queue<_Tp, _Sequence, _Compare>::top() const [with _Tp = Branch*; _Sequence = std::vector<Branch*>; _Compare = CostCompare; const_reference = Branch* const&]: Assertion '!this->empty()' failed.
bowtie aborted with exitlevel 134
$ ./bowtie-build --threads 2 --quiet --sanity .simple_tests.pl.fa .simple_tests.tmp
$ ./bowtie --debug -s 1 -S --quiet -a .simple_tests.tmp -c -1 AGCATCGATC:IIIIIIIIII,TCAGTTTTTGA:IIIIIIIIIII -2 TCAGTTTTTGA:IIIIIIIIIII,AGCATCGATC:IIIIIIIIII
Setting the index via positional argument will be deprecated in a future release. Please use -x option instead.
/usr/include/c++/13/bits/stl_queue.h:725: std::priority_queue<_Tp, _Sequence, _Compare>::const_reference std::priority_queue<_Tp, _Sequence, _Compare>::top() const [with _Tp = Branch*; _Sequence = std::vector<Branch*>; _Compare = CostCompare; const_reference = Branch* const&]: Assertion '!this->empty()' failed.
Aborted (core dumped)
I was also able to reproduce this issue by adding the following modification on my forked repository's GitHub Actions - Ubuntu 22.04.1.
diff --git a/.github/workflows/simple_tests.yml b/.github/workflows/simple_tests.yml
index 6753530..01f66b6 100644
--- a/.github/workflows/simple_tests.yml
+++ b/.github/workflows/simple_tests.yml
@@ -42,7 +42,7 @@ jobs:
- uses: actions/checkout@v2
- name: Run simple tests
run: |
- make allall
+ CXXFLAGS='-Wp,-D_GLIBCXX_ASSERTIONS' make allall
make simple-test
macos:
runs-on: macos-latest
https://github.com/junaruga/bowtie/actions/runs/4208463552/jobs/7304505628#step:3:302
Cline paired 2 (fw:1, sam:1)
References:
>0
AGCATCGATCAAAAACTGA
./bowtie-build --threads 1 --quiet --sanity .simple_tests.pl.fa .simple_tests.tmp
./bowtie --debug -s 1 -S --quiet -a .simple_tests.tmp -c -1 AGCATCGATC:IIIIIIIIII,TCAGTTTTTGA:IIIIIIIIIII -2 TCAGTTTTTGA:IIIIIIIIIII,AGCATCGATC:IIIIIIIIII
Setting the index via positional argument will be deprecated in a future release. Please use -x option instead.
bowtie aborted with exitlevel 134
make: *** [Makefile:415: simple-test] Error 255
Hello Jun,
Looks like the issue is in range_source.h:1353
. We pop a branch from the queue, but never check if the queue is empty before updating the minCost
. A simple fix would be to wrap this assignment in an if
statement.
When building bowtie 1.3.1 on Fedora rawhide (development version = version 39) on the build environment on the Fedora project, I saw one test failure. Below is my initial debug on the environment. I will try to create a minimal reproducer. But if you find the cause in the log, please let me know. The CPU is x86_64. The g++ version is 13.0.1 (RPM package version:
13.0.1-0.2.fc38
).Test failure
The full log is here.
Then ran the 2 commands above just in case.
Then ran the command below to find the executed binary command line internally in the Python script
bowtie
. It was to un the command line with gdb.GDB backtrace
Before debugging with gdb, I installed the debug info pakcages on the environment.
Then below is the gdb backtrace.
ltrace
Below is the ltrace log.
As the log is too big, I would share only the last 100 lines.