[Debian-med-packaging] Bug#1028713: Comment

Andreas Tille andreas at an3as.eu
Wed Feb 22 15:21:37 GMT 2023


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 0x7ffff57ff6c0 (LWP 2115402)]

[Step 1 of 4] : counting k-mers
[Thread 0x7ffff57ff6c0 (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::BasicOStreamWrapper<std::ostream>, rapidjson::UTF8<char>, rapidjson::UTF8<char>, rapidjson::CrtAllocator, 2u>::StartObject (this=0x7fffffff8168) at /usr/include/rapidjson/prettywriter.h:113
113             new (Base::level_stack_.template Push<typename Base::Level>()) typename Base::Level(false);
(gdb) bt 20
#0  rapidjson::PrettyWriter<rapidjson::BasicOStreamWrapper<std::ostream>, rapidjson::UTF8<char>, rapidjson::UTF8<char>, rapidjson::CrtAllocator, 2u>::StartObject (this=0x7fffffff8168)
    at /usr/include/rapidjson/prettywriter.h:113
#1  cereal::JSONOutputArchive::writeName (this=0x7fffffff8030) at /usr/include/cereal/archives/json.hpp:347
#2  0x0000555555b04428 in cereal::prologue<bool, (cereal::traits::detail::sfinae)0> (ar=...) at ./external/pufferfish/include/cereal/archives/json.hpp:891
#3  cereal::OutputArchive<cereal::JSONOutputArchive, 0u>::process<bool&> (head=@0x7fffffff7d55: false, this=0x7fffffff8030) at ./external/pufferfish/include/cereal/cereal.hpp:416
#4  cereal::OutputArchive<cereal::JSONOutputArchive, 0u>::operator()<bool&> (this=<optimized out>) at ./external/pufferfish/include/cereal/cereal.hpp:311
#5  cereal::save<bool&> (t=..., ar=...) at ./external/pufferfish/include/cereal/archives/json.hpp:944
#6  cereal::OutputArchive<cereal::JSONOutputArchive, 0u>::processImpl<cereal::NameValuePair<bool&>, (cereal::traits::detail::sfinae)0> (t=..., this=<optimized out>)
    at ./external/pufferfish/include/cereal/cereal.hpp:505
#7  cereal::OutputArchive<cereal::JSONOutputArchive, 0u>::process<cereal::NameValuePair<bool&> > (head=..., this=<optimized out>) at ./external/pufferfish/include/cereal/cereal.hpp:417
#8  cereal::OutputArchive<cereal::JSONOutputArchive, 0u>::operator()<cereal::NameValuePair<bool&> > (this=0x7fffffff8030) at ./external/pufferfish/include/cereal/cereal.hpp:311
#9  fixFasta (parser=0x7ffff6076800, decoyNames=..., keepDuplicates=false, k=31, sepStr=" \t", expect_transcriptome=true, noclip_polya=false, iomutex=..., 
    log=std::shared_ptr<spdlog::logger> (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 0x0000555555b08195 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<spdlog::logger> (use count 4, weak count 0) = {...}, hasFeatures=hasFeatures at entry=false)
    at ./external/pufferfish/src/FixFasta.cpp:686
#11 0x0000555555a8a510 in pufferfishIndex (indexOpts=...) at ./external/pufferfish/src/PufferfishIndexer.cpp:432
#12 0x000055555566399e in SalmonIndex::buildPuffIndex_ (idxOpt=..., indexDir=..., this=0x7ffff603e280) at ./include/SalmonIndex.hpp:111
#13 SalmonIndex::build (idxOpt=..., indexDir=..., this=0x7ffff603e280) at ./include/SalmonIndex.hpp:76
#14 salmonIndex (argc=<optimized out>, argv=<optimized out>) at ./src/BuildSalmonIndex.cpp:247
#15 0x00005555555fe9a0 in std::function<int (int, char const**, std::unique_ptr<SalmonIndex, std::default_delete<SalmonIndex> >&)>::operator()(int, char const**, std::unique_ptr<SalmonIndex, std::default_delete<SalmonIndex> >&) const (__args#2=std::unique_ptr<SalmonIndex> = {...}, __args#1=<optimized out>, __args#0=<optimized out>, this=0x7ffff604e1a8)
    at /usr/include/c++/12/bits/std_function.h:591
#16 main (argc=<optimized out>, argv=0x7fffffffde98) 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 -DBZIP2_INCLUDE_DIR=/usr/include -DLIBLZMA_INCLUDE_DIR=/usr/include/ -DLIBLZMA_LIBRARY=lzma -DLIBLZMA_HAS_AUTO_DECODER=1 -DLIBLZMA_HAS_EASY_ENCODER=1 -DLIBLZMA_HAS_LZMA_PRESET=1 -DCMAKE_MODULE_PATH=/usr/share/cmake/Modules -DTBB_WILL_RECONFIGURE=FALSE -DBOOST_WILL_RECONFIGURE=FALSE -DCMAKE_BUILD_TYPE=Release -DUSE_SHARED_LIBS=TRUE
> make
> gdb --args src/salmon index -t transcripts.fasta -i sample_salmon_quasi_index
...
(gdb) run
Starting program: /home/andreas/debian-maintain/salsa/med-team/salmon_original/salmon-1.9.0/src/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".
Version Info: This is the most recent version of salmon.
[2023-02-22 16:02:10.010] [jLog] [warning] The salmon index is being built without any decoy sequences.  It is recommended that decoy sequence (either computed auxiliary decoy sequence or 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-based-mode.
[2023-02-22 16:02:10.010] [jLog] [info] building index
out : sample_salmon_quasi_index
[2023-02-22 16:02:10.011] [puff::index::jointLog] [info] Running fixFasta
[New Thread 0x7ffff57ff6c0 (LWP 2627183)]

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

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

Thread 1 "salmon" received signal SIGSEGV, Segmentation fault.
0x000055555566277f in cereal::JSONOutputArchive::writeName() ()
(gdb) bt 20
#0  0x000055555566277f in cereal::JSONOutputArchive::writeName() ()
#1  0x0000555555b1fe35 in fixFasta(fastx_parser::FastxParser<klibpp::KSeq>*, spp::sparse_hash_set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, spp::spp_hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, spp::libc_allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, bool, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool, bool, std::mutex&, std::shared_ptr<spdlog::logger>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<unsigned int, std::allocator<unsigned int> >&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned short>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned short> > >&) ()
#2  0x0000555555b23c1e in fixFastaMain(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::vector<unsigned int, std::allocator<unsigned int> >&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned short>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned short> > >&, std::shared_ptr<spdlog::logger>, bool) ()
#3  0x0000555555aa85b2 in pufferfishIndex(pufferfish::IndexOptions&) ()
#4  0x000055555566730b in salmonIndex(int, char const**, std::unique_ptr<SalmonIndex, std::default_delete<SalmonIndex> >&) ()
#5  0x0000555555602fc3 in main ()


Interestingly if I want debug symbols and run cmake with
-DCMAKE_BUILD_TYPE=Debug I get

  c++: error: -pg and -fomit-frame-pointer are incompatible

No idea how I need to run configure to get a working build with debug
symbols - however, the SIGSEGV is reproducible even with plain upstream
tarball (where no code copies are excluded).

Kind regards

     Andreas.


[1] https://salsa.debian.org/med-team/salmon/-/commit/d79e95578edfcdba30719703daf3caebd8c289ed

-- 
http://fam-tille.de



More information about the Debian-med-packaging mailing list