Bug#1028713: Comment

2023-02-22 Thread Andreas Tille
Hi,

I've put the test suite line below (and others) into some autopkgtest
and for the moment forced the build time test to pass[1] to get some
package to test.  I've built this and installed salmon as well as
salmon-dbgsym and was running the same test as Dominik via:

cp -a /usr/share/doc/salmon/examples/* .
gdb --args salmon index -t transcripts.fasta -i sample_salmon_quasi_index
(gdb) run
Starting program: /usr/bin/salmon index -t transcripts.fasta -i 
sample_salmon_quasi_index
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
index ["sample_salmon_quasi_index"] did not previously exist  . . . creating it
[2023-02-22 15:10:42.244] [jLog] [warning] The salmon index is being built 
without any decoy sequences.  It is recommended that decoy sequence (either 
computed auxiliary decoy sequence oor the genome of the organism) be provided 
during indexing. Further details can be found at 
https://salmon.readthedocs.io/en/latest/salmon.html#preparing-transcriptome-indices-mapping-bsased-mode.
[2023-02-22 15:10:42.244] [jLog] [info] building index
out : sample_salmon_quasi_index
[2023-02-22 15:10:42.244] [puff::index::jointLog] [info] Running fixFasta
[New Thread 0x757ff6c0 (LWP 2115402)]

[Step 1 of 4] : counting k-mers
[Thread 0x757ff6c0 (LWP 2115402) exited]

[2023-02-22 15:10:42.248] [puff::index::jointLog] [info] Replaced 0 non-ATCG 
nucleotides
[2023-02-22 15:10:42.248] [puff::index::jointLog] [info] Clipped poly-A tails 
from 0 transcripts
wrote 15 cleaned references

Thread 1 "salmon" received signal SIGSEGV, Segmentation fault.
rapidjson::PrettyWriter, 
rapidjson::UTF8, rapidjson::UTF8, rapidjson::CrtAllocator, 
2u>::StartObject (this=0x7fff8168) at 
/usr/include/rapidjson/prettywriter.h:113
113 new (Base::level_stack_.template Push()) 
typename Base::Level(false);
(gdb) bt 20
#0  rapidjson::PrettyWriter, 
rapidjson::UTF8, rapidjson::UTF8, rapidjson::CrtAllocator, 
2u>::StartObject (this=0x7fff8168)
at /usr/include/rapidjson/prettywriter.h:113
#1  cereal::JSONOutputArchive::writeName (this=0x7fff8030) at 
/usr/include/cereal/archives/json.hpp:347
#2  0x55b04428 in cereal::prologue (ar=...) at 
./external/pufferfish/include/cereal/archives/json.hpp:891
#3  cereal::OutputArchive::process 
(head=@0x7fff7d55: false, this=0x7fff8030) at 
./external/pufferfish/include/cereal/cereal.hpp:416
#4  cereal::OutputArchive::operator() 
(this=) at ./external/pufferfish/include/cereal/cereal.hpp:311
#5  cereal::save (t=..., ar=...) at 
./external/pufferfish/include/cereal/archives/json.hpp:944
#6  cereal::OutputArchive::processImpl, 
(cereal::traits::detail::sfinae)0> (t=..., this=)
at ./external/pufferfish/include/cereal/cereal.hpp:505
#7  cereal::OutputArchive::process > (head=..., this=) at 
./external/pufferfish/include/cereal/cereal.hpp:417
#8  cereal::OutputArchive::operator() > (this=0x7fff8030) at 
./external/pufferfish/include/cereal/cereal.hpp:311
#9  fixFasta (parser=0x76076800, decoyNames=..., keepDuplicates=false, 
k=31, sepStr=" \t", expect_transcriptome=true, noclip_polya=false, iomutex=..., 
log=std::shared_ptr (use count 4, weak count 0) = {...}, 
outFile="sample_salmon_quasi_index/ref_k31_fixed.fa", 
refIdExtensions=std::vector of length 15, capacity 15 = {...}, 
shortRefs=std::vector of length 0, capacity 0) at 
./external/pufferfish/src/FixFasta.cpp:456  o
#10 0x55b08195 in fixFastaMain (args=std::vector of length 7, capacity 
8 = {...}, refIdExtension=std::vector of length 15, capacity 15 = {...},
  s
shortRefs=std::vector of length 0, capacity 0, 
log=std::shared_ptr (use count 4, weak count 0) = {...}, 
hasFeatures=hasFeatures@entry=false)
at ./external/pufferfish/src/FixFasta.cpp:686
#11 0x55a8a510 in pufferfishIndex (indexOpts=...) at 
./external/pufferfish/src/PufferfishIndexer.cpp:432
#12 0x5566399e in SalmonIndex::buildPuffIndex_ (idxOpt=..., 
indexDir=..., this=0x7603e280) at ./include/SalmonIndex.hpp:111
#13 SalmonIndex::build (idxOpt=..., indexDir=..., this=0x7603e280) at 
./include/SalmonIndex.hpp:76
#14 salmonIndex (argc=, argv=) at 
./src/BuildSalmonIndex.cpp:247
#15 0x555fe9a0 in std::function 
>&)>::operator()(int, char const**, std::unique_ptr >&) const 
(__args#2=std::unique_ptr = {...}, __args#1=, 
__args#0=, this=0x7604e1a8)
at /usr/include/c++/12/bits/std_function.h:591
#16 main (argc=, argv=0x7fffde98) at ./src/Salmon.cpp:267


The traceback with the latest Pufferfish is different before

   ./include/SalmonIndex.hpp:111

Interestingly the old pufferfish (used by Dominik) triggers failures in
spdlog while the updated pufferfish above triggers the problem in
rapidjson.


I now tried to check the original upstream tarball, have built it via

> cmake -DCONDA_BUILD=1 -DFETCHED_RAPMAP=1 -DBZIP2_LIBRARIES=-lbz2 
> 

Bug#1028713: Comment

2023-01-31 Thread Andreas Tille
Hi Dominik,

thanks for your attempt to track this down.  I'm wondering what might
happen if I refresh the pufferfish code in debian/external which I tried
in my last commit.  Unfortunately this failed as well:

   https://salsa.debian.org/med-team/salmon/-/jobs/3876351

Kind regards
   Andreas.

Am Sun, Jan 29, 2023 at 09:05:51PM +0100 schrieb Dominik Stadler:
> A stacktrace from the segmentation fault looks like follows.
> 
> It triggers consistently for me with the following steps in a source-tree
> 
> fakeroot debian/rules binary
> cd sample_data/
> /tmp/salmon-1.9.0+ds1/obj-x86_64-linux-gnu/src/salmon index -t
> transcripts.fasta -i sample_salmon_quasi_index
> 
> 
> #0  0x77495993 in __GI__IO_fwrite (buf=0x7fffc978, size=1,
> count=82,
> fp=0x76060400) at ./libio/iofwrite.c:37
> #1  0x5560f55d in spdlog::details::file_helper::write
> (this=0x7607f980,
> msg=...) at ./include/spdlog/details/../sinks/../details/file_helper.h:90
> #2  0x556299dd in
> spdlog::sinks::simple_file_sink::_sink_it
> (msg=...,
> this=0x7607f970) at ./include/spdlog/details/../sinks/file_sinks.h:45
> #3  spdlog::sinks::base_sink::log
> (this=0x7607f970,
> msg=...) at ./include/spdlog/sinks/base_sink.h:37
> #4  0x55618aa3 in spdlog::logger::_sink_it
> (this=0x76025810, msg=...)
> at /usr/include/c++/12/bits/shared_ptr_base.h:1665
> #5  0x55a8ae19 in spdlog::logger::log (fmt=0x55cd7f0b
> "mphf size = {} MB", lvl=spdlog::level::info, this=0x76025810) at
> ./external/pufferfish/include/spdlog/details/logger_impl.h:74
> #6  spdlog::logger::info (arg1=, fmt=0x55cd7f0b
> "mphf size = {} MB", this=0x76025810) at
> ./external/pufferfish/include/spdlog/details/logger_impl.h:145
> #7  pufferfishIndex (indexOpts=...) at
> ./external/pufferfish/src/PufferfishIndexer.cpp:660
> #8  0x556636ae in SalmonIndex::buildPuffIndex_ (idxOpt=...,
> indexDir=...,
> this=0x7603e280) at ./include/SalmonIndex.hpp:111
> #9  SalmonIndex::build (idxOpt=..., indexDir=..., this=0x7603e280) at
> ./include/SalmonIndex.hpp:76
> #10 salmonIndex (argc=, argv=) at
> ./src/BuildSalmonIndex.cpp:247
> #11 0x555fe510 in std::function std::unique_ptr
> >&)>::operator()(int, char const**, std::unique_ptr std::default_delete almonIndex> >&) const (__args#2=std::unique_ptr = {...},
> __args#1=, __args#0=, this=0x7604e1a8) at
> /usr/include/c++/12/bits/std_function.h:591
> #12 main (argc=, argv=0x7fffe028) at ./src/Salmon.cpp:267

> ___
> Debian-med-packaging mailing list
> debian-med-packag...@alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-packaging


-- 
http://fam-tille.de



Bug#1028713: Comment

2023-01-29 Thread Dominik Stadler
A stacktrace from the segmentation fault looks like follows.

It triggers consistently for me with the following steps in a source-tree

fakeroot debian/rules binary
cd sample_data/
/tmp/salmon-1.9.0+ds1/obj-x86_64-linux-gnu/src/salmon index -t
transcripts.fasta -i sample_salmon_quasi_index


#0  0x77495993 in __GI__IO_fwrite (buf=0x7fffc978, size=1,
count=82,
fp=0x76060400) at ./libio/iofwrite.c:37
#1  0x5560f55d in spdlog::details::file_helper::write
(this=0x7607f980,
msg=...) at ./include/spdlog/details/../sinks/../details/file_helper.h:90
#2  0x556299dd in
spdlog::sinks::simple_file_sink::_sink_it
(msg=...,
this=0x7607f970) at ./include/spdlog/details/../sinks/file_sinks.h:45
#3  spdlog::sinks::base_sink::log
(this=0x7607f970,
msg=...) at ./include/spdlog/sinks/base_sink.h:37
#4  0x55618aa3 in spdlog::logger::_sink_it
(this=0x76025810, msg=...)
at /usr/include/c++/12/bits/shared_ptr_base.h:1665
#5  0x55a8ae19 in spdlog::logger::log (fmt=0x55cd7f0b
"mphf size = {} MB", lvl=spdlog::level::info, this=0x76025810) at
./external/pufferfish/include/spdlog/details/logger_impl.h:74
#6  spdlog::logger::info (arg1=, fmt=0x55cd7f0b
"mphf size = {} MB", this=0x76025810) at
./external/pufferfish/include/spdlog/details/logger_impl.h:145
#7  pufferfishIndex (indexOpts=...) at
./external/pufferfish/src/PufferfishIndexer.cpp:660
#8  0x556636ae in SalmonIndex::buildPuffIndex_ (idxOpt=...,
indexDir=...,
this=0x7603e280) at ./include/SalmonIndex.hpp:111
#9  SalmonIndex::build (idxOpt=..., indexDir=..., this=0x7603e280) at
./include/SalmonIndex.hpp:76
#10 salmonIndex (argc=, argv=) at
./src/BuildSalmonIndex.cpp:247
#11 0x555fe510 in std::function
>&)>::operator()(int, char const**, std::unique_ptr >&) const (__args#2=std::unique_ptr = {...},
__args#1=, __args#0=, this=0x7604e1a8) at
/usr/include/c++/12/bits/std_function.h:591
#12 main (argc=, argv=0x7fffe028) at ./src/Salmon.cpp:267