Subject: | XML::LibXML and threads |
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 |
Message body not shown because it is not plain text.