Skip Menu |
 

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

Report information
The Basics
Id: 81508
Status: open
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: pmarguinaud [...] hotmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.0012
Fixed in: (no value)



Subject: XML::LibXML and threads
Download (untitled) / with headers
text/plain 1.6k
Hello, I have a problem parsing XML files in different threads using the load_xml method. The program ends with a "Segmentation fault" and a backtrace similar to : #0 0x0000000000000000 in ?? () #1 0x00002aaaab9d632b in __xmlParserInputBufferCreateFilename (URI=0x1341e60 "src/local/surfex/OFFLIN/error_write_surf_bin.F90.xml", enc=XML_CHAR_ENCODING_NONE) at xmlIO.c:2633 #2 0x00002aaaab9ad20b in xmlNewInputFromFile__internal_alias (ctxt=0x2aaaac9c99d0, filename=0x1341e60 "src/local/surfex/OFFLIN/error_write_surf_bin.F90.xml") at parserInternals.c:1511 #3 0x00002aaaab9b0d04 in xmlCreateURLParserCtxt__internal_alias (filename=0x1341e60 "src/local/surfex/OFFLIN/error_write_surf_bin.F90.xml", options=0) at parser.c:13964 #4 0x00002aaaab858bd2 in XS_XML__LibXML__parse_file () from /cnrm/gp/mrpm/mrpm609/install/yukisc2/perl-5.16.2/lib/site_perl/5.16.2/x86_64-linux-thread-multi/auto/XML/LibXML/LibXML.so #5 0x000000000049b33f in Perl_pp_entersub () #6 0x0000000000499afe in Perl_runops_standard () #7 0x0000000000431e70 in Perl_call_sv () #8 0x00002aaaabde2c05 in S_ithread_run () from /cnrm/gp/mrpm/mrpm609/install/yukisc2/perl-5.16.2/lib/5.16.2/x86_64-linux-thread-multi/auto/threads/threads.so #9 0x00002aaaab179193 in start_thread () from /lib64/libpthread.so.0 #10 0x00002aaaab34df0d in clone () from /lib64/libc.so.6 I use perl 5.16.2, libxml2 2.9.0, and XML::LibXML 2.0012,, everything configured with threads. I suspect that the xmlInputCallbackTable (which is a static variable of xmlIO.c) is being initialized/de-initialized each time a load_file starts or ends (I noticed that in LibXML.pm/parse_file, _init_callbacks is called). Cheers, Philippe
Subject: libxml.tgz
Download libxml.tgz
application/octet-stream 56.1k

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 659b
On Wed Nov 28 06:52:41 2012, PHILOU wrote: Show quoted text
> I suspect that the xmlInputCallbackTable (which is a static variable > of > xmlIO.c) is being initialized/de-initialized each time a load_file > starts or ends (I noticed that in LibXML.pm/parse_file, > _init_callbacks > is called).
Yes, it's the input callbacks. I reported this issue in 2009: https://mail.gnome.org/archives/xml/2009-March/msg00050.html https://mail.gnome.org/archives/xml/2009-April/msg00001.html XML::LibXML resets the input callbacks all the time because other users of libxml2 might have changed them (for example in an Apache web server process). Unfortunately, this is still unresolved.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.