Skip Menu |

This queue is for tickets about the XML-LibXML CPAN distribution.

Report information
The Basics
Id: 16218
Status: resolved
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: adam [...] jobster.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.58
Fixed in: (no value)



Subject: Parser is not thread safe
Try this in multiple threads simultaneously: my $dtd = XML::LibXML::Dtd->new("xxxxx", xxxxxx); my $parser = XML::LibXML->new(); my $doc = $parser->parse_file(xxxxx); $doc->validate($dtd); It SEGVs very quickly. Note that I am not sharing any data between threads. If you put a lock around the above block, the SEGV goes away. This is on Fedora Core 4 x86 with Perl 5.8.6. Here is the trace: #0 0x00233475 in LibXML_validity_warning () from /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/auto/XML/LibXML/LibXML.so #1 0x0025bb51 in XS_XML__LibXML__Dtd_new () from /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/auto/XML/LibXML/LibXML.so #2 0x0278298c in Perl_pp_entersub () from /usr/lib/perl5/5.8.6/i386-linux-thread-multi/CORE/libperl.so #3 0x027646e1 in Perl_runops_debug () from /usr/lib/perl5/5.8.6/i386-linux-thread-multi/CORE/libperl.so #4 0x02711b9e in Perl_get_cv () from /usr/lib/perl5/5.8.6/i386-linux-thread-multi/CORE/libperl.so #5 0x027162e5 in Perl_call_sv () from /usr/lib/perl5/5.8.6/i386-linux-thread-multi/CORE/libperl.so #6 0x0093ccba in Perl_ithread_run () from /usr/lib/perl5/5.8.6/i386-linux-thread-multi/auto/threads/threads.so #7 0x007f8b80 in start_thread () from /lib/libpthread.so.0 #8 0x00750dee in clone () from /lib/libc.so.6
On st 30.lis.2005 14:53:19, guest wrote: Show quoted text
> Try this in multiple threads simultaneously: > > my $dtd = XML::LibXML::Dtd->new("xxxxx", xxxxxx); > my $parser = XML::LibXML->new(); > my $doc = $parser->parse_file(xxxxx); > $doc->validate($dtd); > > It SEGVs very quickly. Note that I am not sharing any data between > threads. If you put a lock around the above block, the SEGV goes > away. This is on Fedora Core 4 x86 with Perl 5.8.6. >
This might be related to bug https://rt.cpan.org/Ticket/Display.html?id=16152 which has been hopefully fixed in the CVS. Can you please 1) test with current CVS version of XML-LibXML and 2) if problems persist, provide a complete (fully self-contained) test case? -- Petr
Since I got no answer and no similar reports, I'm closing it. -- Petr