xerces-c-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anoob Backer" <anoob.bac...@gmail.com>
Subject solaris core dump: SAX parser using MemBufInputSource (xerces-c-2.6.0)
Date Wed, 23 Jul 2008 11:08:17 GMT
Hi All,

We are using a multi-threaded client application which uses xerces-c
2.6.0.During our stress testing with 100 threads trying parse the
response from
the server we are getting core dump whose stack traces are given below. this
is happening in solaris and on linux the same stress test client program
runs fine.

Hi Alberto,
seems it is related to
http://osdir.com/ml/text.xml.xerces-c.user/2007-08/msg00023.html


parsing code snippet would look like:
    ...
    SAX2XMLReader parser = XMLReaderFactory::createXMLReader();

    parser->setFeature(XMLUni::fgSAX2CoreValidation, false);
    parser->setFeature(XMLUni::fgSAX2CoreNameSpaces, true);

    parser->setErrorHandler((ErrorHandler *)this);
    parser->setContentHandler((ContentHandler *) this);

    MemBufInputSource *inputsource = new MemBufInputSource((const
XMLByte*)xmlstring.c_str(), xmlstring.length(), "sample xmlstring", false);

    if(!inputsource)
    {
        retval = false;
    }
    else
    {
        try
        {
            parser->parse(*inputsource);
            iserror = (parser->getErrorCount() > 0);
        }
        catch (const XMLException &e)
        {
            iserror = true;
        }
        catch (...)
        {
            iserror = true;
        }
    }

    if(parser) {
        delete parser;
        parser = NULL;
    }
    if(inputsource) {
        delete m_inputsource;
        inputsource = NULL;
    }
    ...

collected core dump: (removed the application specific func calls)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  [1] t_delete(0xfaa1c0, 0x0, 0x1010208, 0xfd6d4c60, 0xfd768284, 0x102f138),
at 0xfd6d4c78
  [2] _malloc_unlocked(0x800, 0x0, 0xfaa1c0, 0xfd76cbc0, 0x102f138,
0xfd3e4000), at 0xfd6d42ec
  [3] malloc(0x800, 0x1, 0x94184, 0xfd6d4150, 0xfd768284, 0xfd7709b0), at
0xfd6d4144
  [4] operator new(0x800, 0x80, 0xfe0cea50, 0x13798, 0xfda3a780, 0x1b98), at
0xfda27010
  [5] xercesc_2_6::MemoryManagerImpl::allocate(0x33bc28, 0x800, 0xfe135f38,
0x3ff, 0xfe132f94, 0xfdf7214c), at 0xfdf72160
  [6] xercesc_2_6::SchemaValidator::SchemaValidator(0x1078870, 0x0,
0x33bc28, 0x0, 0xfdf7214c, 0x1b98), at 0xfdfa1024
  [7] xercesc_2_6::IGXMLScanner::commonInit(0xd88db8, 0x800, 0x2c00,
0x1a64df8, 0xfe0fdb6c, 0x1078870), at 0xfdf5eb74
  [8] xercesc_2_6::IGXMLScanner::IGXMLScanner(0xd88db8, 0x0, 0xcdf160,
0x33bc28, 0x0, 0x92eb05), at 0xfdf5dc04
  [9] xercesc_2_6::XMLScannerResolver::getDefaultScanner(0x0, 0xcdf160,
0x33bc28, 0x20, 0x33bc28, 0xfe132f94), at 0xfdfee2b8
  [10] xercesc_2_6::SAX2XMLReaderImpl::initialize(0x135d580, 0x33bc28,
0xfe1379c0, 0x0, 0xfe13498c, 0xfe1349cc), at 0xfdf8af78
  [11] xercesc_2_6::SAX2XMLReaderImpl::SAX2XMLReaderImpl(0x135d580,
0x33bc28, 0x0, 0x1cf6c, 0x132cc, 0xfd59bcc4), at 0xfdf8ad24
=>[12] xercesc_2_6::XMLReaderFactory::createXMLReader(manager = 0x33bc28,
gramPool = (nil)), line 102 in "XMLReaderFactory.hpp"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  [1] xercesc_2_6::XMemory::operator delete(0x31634553, 0x3fff8, 0xff000000,
0xd, 0xa, 0xa), at 0xfdffe230
  [2]
xercesc_2_6::RefHash2KeysTableOf<xercesc_2_6::ValueStore>::removeAll(0x1954068,
0x0, 0xff000000, 0xfd76fad4, 0xa, 0xa), at 0xfdee81f8
  [3]
xercesc_2_6::RefHash2KeysTableOf<xercesc_2_6::ValueStore>::~RefHash2KeysTableOf(0x1954068,
0x1084, 0x932f4, 0xfd739c8c, 0xf1243800, 0x1000), at 0xfdee8dd8
  [4] xercesc_2_6::ValueStoreCache::cleanUp(0x33a0928, 0x3414d28, 0x3414d30,
0xfd76fad4, 0x2, 0x2), at 0xfdfcdee8
  [5] xercesc_2_6::IdentityConstraintHandler::cleanUp(0x2677568, 0x1084,
0x932f4, 0xfdfa1254, 0xf1243800, 0x1000), at 0xfdf6d8c0
  [6] __SLIP.DELETER__G(0x2677568, 0x1, 0xfe132f94, 0xfdf7223c, 0x0,
0xfe0fdd2c), at 0xfdf6d944
  [7] xercesc_2_6::IGXMLScanner::cleanUp(0x444b350, 0xfdfa5f30, 0xfe0ea28c,
0xfdf4aa04, 0xfe0ddef8, 0xfde972b4), at 0xfdf5ef64
  [8] xercesc_2_6::IGXMLScanner::~IGXMLScanner(0x444b350, 0x1084, 0x932f4,
0xfd739c8c, 0xf1243800, 0x1000), at 0xfdf5df20
  [9] __SLIP.DELETER__P(0x444b350, 0x1, 0x33b328, 0xfe132f94, 0xfdf7223c,
0x33b328), at 0xfdf64b6c
  [10] xercesc_2_6::SAX2XMLReaderImpl::cleanUp(0x2f7d458, 0x0, 0x0,
0xfe13498c, 0xfdf8ea60, 0x2f7d460), at 0xfdf8b10c
  [11] xercesc_2_6::SAX2XMLReaderImpl::~SAX2XMLReaderImpl(0x2f7d458, 0x0,
0xfdf5dfb0, 0x514, 0x33b328, 0xc6d598), at 0xfdf8aec4
  [12] __SLIP.DELETER__P(0x2f7d458, 0x1, 0x514, 0x302898, 0x0, 0x33b328), at
0xfdf8ef28

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  [1]
xercesc_2_6::NameIdPool<xercesc_2_6::XMLNotationDecl>::removeAll(0x407fab0,
0x8d7b30, 0xfdf7223c, 0xfd739c8c, 0xf123e800, 0x1000), at 0xfdeda258
  [2]
xercesc_2_6::NameIdPool<xercesc_2_6::XMLNotationDecl>::~NameIdPool(0x407fab0,
0x16fe6a0, 0xff000000, 0x18da54, 0x1, 0x1), at 0xfdeda200
  [3] xercesc_2_6::DTDGrammar::~DTDGrammar(0x1bef978, 0x0, 0xff000000,
0xfd76fad4, 0x1, 0x1), at 0xfdf41088
  [4] __SLIP.DELETER__M(0x1bef978, 0x1, 0xff000000, 0xff000000, 0x4, 0x4),
at 0xfdf41c64
  [5]
xercesc_2_6::RefHashTableOf<xercesc_2_6::Grammar>::removeAll(0x25425c0, 0x0,
0xff000000, 0xfd76fad4, 0x4, 0x4), at 0xfdea259c
  [6]
xercesc_2_6::RefHashTableOf<xercesc_2_6::Grammar>::~RefHashTableOf(0x25425c0,
0x1084, 0x932f4, 0xfd739c8c, 0xf123e800, 0x1000), at 0xfdea24d8
  [7] xercesc_2_6::GrammarResolver::~GrammarResolver(0xddeb20, 0x2aec800,
0xfe0dfb68, 0xfe132f94, 0x0, 0x2aec808), at 0xfdf5a2a8
  [8] xercesc_2_6::SAX2XMLReaderImpl::cleanUp(0xddeb20, 0x0, 0x0,
0xfe13498c, 0xfdf8ea60, 0x2da3d18), at 0xfdf8b184
  [9] xercesc_2_6::SAX2XMLReaderImpl::~SAX2XMLReaderImpl(0x2da3d10, 0x0,
0xfdf5dfb0, 0xfdf7214c, 0x2d4b40, 0x2800), at 0xfdf8aec4
  [10] __SLIP.DELETER__P(0x2da3d10, 0x1, 0x27, 0x29df80, 0x0, 0x0), at
0xfdf8ef28
  [11] func(ref = 0x207aef8, start = false, name = CLASS, val = CLASS, attrq
= CLASS, valq = CLASS)
  [12] ParseUtil::endElement(0x13f38e8, 0x2372210, 0x33f49e0, 0x2b7ed8,
0x13f391c, 0xc49e48), at 0x1abc80
  [13] xercesc_2_6::SAX2XMLReaderImpl::endElement(0x14cf588, 0x1b0e768, 0x1,
0x2c9440, 0x3a81238, 0x1ac70c), at 0xfdf8c710
  [14] xercesc_2_6::IGXMLScanner::scanEndTag(0x189a110, 0xe90faba7, 0x0,
0xfe0cea50, 0xfdf64978, 0x3), at 0xfdf5ff38
  [15] xercesc_2_6::IGXMLScanner::scanContent(0x189a110, 0x0, 0x0,
0xfe0fdb24, 0xfdf69d60, 0x1), at 0xfdf5f7b4
  [16] xercesc_2_6::IGXMLScanner::scanDocument(0x189a110, 0x0, 0xfdf5dfb0,
0xfdf7214c, 0x2d4b40, 0x2800), at 0xfdf5e028
  [17] xercesc_2_6::SAX2XMLReaderImpl::parse(0x14cf588, 0x458a68, 0x4cc,
0x29df80, 0x0, 0x2d4b40), at 0xfdf8b714
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
any help would be appreciable
thanks
bekz
-- 
http://code.grep.in

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message