Skip to content

SEGFAULT in xerces libraries when removing default instance of SvmTheoreticalSpectrumGenerator [352] #352

Closed

Description

@timosachsenberg

Submitted by aiche on 2011-09-21 13:48:56

If you remove the default instance of SvmTheoreticalSpectrumGenerator in SvmTheoreticalSpectrumGenerator.C some tests fail with segfaults caused by xerces methods like

xercesc_3_0::XMLString::operator new
xercesc_3_0::XMLString::transcode

until we know how to fix this we will leave the default instance in the class.

Activity

  1. timosachsenberg commented on Oct 13, 2017

    @timosachsenberg
    ContributorAuthor

    I think we should take a look at this issue. Seems to me that this might trigger a global parsing of residueDB

  2. added
    major
    on Oct 13, 2017
  3. timosachsenberg commented on Oct 13, 2017

    @timosachsenberg
    ContributorAuthor

    @hroest any idea? I removed the default instance I get several segfaults:
    The following tests FAILED:
    80 - OnDiscMSExperiment_test (SEGFAULT)
    138 - Bzip2InputStream_test (SEGFAULT)
    140 - CompressedInputSource_test (SEGFAULT)
    153 - GzipInputStream_test (SEGFAULT)
    156 - IndexedMzMLDecoder_test (SEGFAULT)
    157 - IndexedMzMLFile_test (SEGFAULT)
    158 - IndexedMzMLFileLoader_test (SEGFAULT)
    171 - MzIdentMLFile_test (SEGFAULT)
    175 - MzMLSpectrumDecoder_test (SEGFAULT)
    213 - XQuestResultXMLFile_test (SEGFAULT)
    2011 - Tutorial_FileIO_mzML (SEGFAULT)

    I guess it might not be related to SvmTheoreticalSpectrumGenerator but more generally to XML parsing

  4. timosachsenberg commented on Oct 13, 2017

    @timosachsenberg
    ContributorAuthor

    for reference a stracktracke:

    Program received signal SIGSEGV, Segmentation fault.
    0x00007ffff7066060 in xercesc_3_1::XMLString::transcode (toTranscode=0x7ffff73bbbe5 "myxml (in memory)", manager=0x0) at xercesc/util/XMLString.cpp:615
    615         return gTranscoder->transcode(toTranscode, manager);
    Missing separate debuginfos, use: debuginfo-install glib2-2.46.2-4.el7.x86_64 glibc-2.17-157.el7_3.4.x86_64 libgcc-4.8.5-11.el7.x86_64 libgomp-4.8.5-11.el7.x86_64 libstdc++-4.8.5-11.el7.x86_64
    (gdb) bt
    #0  0x00007ffff7066060 in xercesc_3_1::XMLString::transcode (toTranscode=0x7ffff73bbbe5 "myxml (in memory)", manager=0x0) at xercesc/util/XMLString.cpp:615
    #1  0x00007ffff70c78cd in xercesc_3_1::InputSource::InputSource (this=0x7fffffffd420, systemId=<optimized out>, manager=<optimized out>) at xercesc/sax/InputSource.cpp:115
    #2  0x00007ffff7097a51 in xercesc_3_1::MemBufInputSource::MemBufInputSource (this=0x7fffffffd420,
        srcDocBytes=0x6563f8 "<indexedmzML>\n<indexList count=\"2\">\n\t<index name=\"spectrum\">\n\t\t<offset idRef=\"controllerType=0 controllerNumber=1 scan=1\">24146</offset>\n\t\t<offset idRef=\"controllerType=0 controllerNumber=1 scan=2\">34"..., byteCount=402, bufId=<optimized out>, adoptBuffer=<optimized out>, manager=<optimized out>) at xercesc/framework/MemBufInputSource.cpp:56
    #3  0x00007ffff65614a0 in OpenMS::IndexedMzMLDecoder::domParseIndexedEnd_ (this=0x7fffffffdabf,
        in="<indexedmzML>\n<indexList count=\"2\">\n\t<index name=\"spectrum\">\n\t\t<offset idRef=\"controllerType=0 controllerNumber=1 scan=1\">24146</offset>\n\t\t<offset idRef=\"controllerType=0 controllerNumber=1 scan=2\">34"..., spectra_offsets=std::vector of length 0, capacity 0, chromatograms_offsets=std::vector of length 0, capacity 0)
        at /nfs/wsi/abi/old-data/sachsenb/OpenMS_IDE/src/openms/source/FORMAT/HANDLERS/IndexedMzMLDecoder.cpp:238
    #4  0x00007ffff6560f6a in OpenMS::IndexedMzMLDecoder::parseOffsets (this=0x7fffffffdabf, filename=..., indexoffset=..., spectra_offsets=std::vector of length 0, capacity 0,
        chromatograms_offsets=std::vector of length 0, capacity 0) at /nfs/wsi/abi/old-data/sachsenb/OpenMS_IDE/src/openms/source/FORMAT/HANDLERS/IndexedMzMLDecoder.cpp:146
    #5  0x0000000000403c40 in main (argc=1, argv=0x7fffffffdce8) at /nfs/wsi/abi/old-data/sachsenb/OpenMS_IDE/src/tests/class_tests/openms/source/IndexedMzMLDecoder_test.cpp:73
    
    

    hmm manager=0x0) at xercesc/util/XMLString.cpp:615

  5. hroest commented on Oct 16, 2017

    @hroest
    Contributor

    It seems like we are missing a

    xercesc::XMLPlatformUtils::Initialize();
    

    somewhere if we remove the class. The question of course is where we put the initializer, either we make sure every class remembers to call it in its constructor or we just add it once to the library somewhere to make sure it is always initialized

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OpenMS - librarydefectmajorminor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions