Hey,

There have been a couple of bugs in Bugzilla relating to thread safety of the grammars. I have not looked at them as yet. Khaled, are you out there? Have you looked at the bugs?


Gareth

James Fitzgerald wrote:

I am experimenting with the GrammarPool code and threads and am getting a crash.

I create an XMLGrammarPool object and populate it
with my schema. I lock it. I create 2 threads,
instantiate a SAX2 parser in each thread and pass each
the same pool and parse and validate a document in each
thread. It crashes with a SEGV but runs fine when run
in a single thread at a time.

(gdb) bt
#0 0xb7d053cd in xercesc_2_6::RefHash2KeysTableOfEnumerator<xercesc_2_6::SchemaAttDef>::findNext() (this=0x90cd348) at RefHash2KeysTableOf.c:549
#1 0xb7d0643b in xercesc_2_6::RefHash2KeysTableOfEnumerator<xercesc_2_6::SchemaAttDef>::Reset() (this=0x90cd348) at RefHash2KeysTableOf.c:515
#2 0xb7dd0954 in xercesc_2_6::SchemaAttDefList::Reset() (this=0x90cd320)
at SchemaAttDefList.cpp:166
#3 0xb7d02998 in xercesc_2_6::ComplexTypeInfo::getAttDefList() const (
this=0x90cd040) at ComplexTypeInfo.cpp:433
#4 0xb7d93100 in getAttDefList (isSchemaGrammar=true, currType=0x90cd040,
elemDecl=0x922bf98) at IGXMLScanner2.cpp:3207
#5 0xb7d8cff5 in xercesc_2_6::IGXMLScanner::buildAttList(xercesc_2_6::RefVectorOf<xercesc_2_6::KVStringPair> const&, unsigned, xercesc_2_6::XMLElementDecl*, xercesc_2_6::RefVectorOf<xercesc_2_6::XMLAttr>&) (this=0x80a2b10,
[EMAIL PROTECTED], attCount=0, elemDecl=0x922bf98,
[EMAIL PROTECTED]) at IGXMLScanner2.cpp:717
#6 0xb7d9ab8a in xercesc_2_6::IGXMLScanner::scanStartTagNS(bool&) (
this=0x80a2b10, [EMAIL PROTECTED]) at IGXMLScanner.cpp:2716
#7 0xb7d96aab in xercesc_2_6::IGXMLScanner::scanContent() (this=0x80a2b10)
at IGXMLScanner.cpp:886
#8 0xb7d94d4a in xercesc_2_6::IGXMLScanner::scanDocument(xercesc_2_6::InputSource const&) (this=0x80a2b10, [EMAIL PROTECTED]) at IGXMLScanner.cpp:204
#9 0xb7dc6e07 in xercesc_2_6::SAX2XMLReaderImpl::parse(xercesc_2_6::InputSource const&) (this=0x83c4c50, [EMAIL PROTECTED]) at SAX2XMLReaderImpl.cpp:647
#10 0x0804f9fb in SAXProcessor::parse() (this=0x97b9700) at SAXProcessor.cpp:60
#11 0x08050344 in client_thread(void*) (t=0x807a208) at prox.cpp:210
#12 0xb7fc42b6 in start_thread () from /lib/tls/libpthread.so.0
(gdb) l
544 //
545 // If there is a current element, move to its next element. If this
546 // hits the end of the bucket, the next block will handle the rest
547 //
548 if (fCurElem)
549 fCurElem = fCurElem->fNext;
550
(gdb) p fCurElem
warning: can't find class named `xercesc_2_6::RefHash2KeysTableOfEnumerator<xercesc_2_6::SchemaAttDef>', as given by C++ RTTI
$1 = (RefHash2KeysTableBucketElem<xercesc_2_6::SchemaAttDef> *) 0x90cda48
(gdb) p *fCurElem
warning: can't find class named `xercesc_2_6::RefHash2KeysTableOfEnumerator<xercesc_2_6::SchemaAttDef>', as given by C++ RTTI
$2 = {<XMemory> = {<No data fields>}, fData = 0x90cd968, fNext = 0x90cd300,
fKey1 = 0x90cda00, fKey2 = 6}
(gdb)
(gdb) p *fCurElem->fNext
warning: can't find class named `xercesc_2_6::RefHash2KeysTableOfEnumerator<xercesc_2_6::SchemaAttDef>', as given by C++ RTTI
$3 = {<XMemory> = {<No data fields>}, fData = 0x90cd1a8, fNext = 0x0,
fKey1 = 0x90cd240, fKey2 = 6}
(gdb)



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



-- Gareth Reakes, Managing Director Parthenon Computing +44-1865-811184 http://www.parthcomp.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to