Bug 228470 - LibXML failing under mod_perl (missing initialization code in .xs)
Summary: LibXML failing under mod_perl (missing initialization code in .xs)
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-XML-LibXML   
(Show other bugs)
Version: 6
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Stepan Kasal
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2007-02-13 09:37 UTC by Michal Schwarz
Modified: 2008-03-07 11:32 UTC (History)
4 users (show)

Fixed In Version: perl-XML-LibXML-1.62001-2.fc8.3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-03-07 11:32:21 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Michal Schwarz 2007-02-13 09:37:54 UTC
Description of problem:

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. run following program under mod_perl or SpeedyCGI or any similar persistent
perl interpreter (not /usr/bin/perl, as it is not persistent):

use XML::Simple;
XMLin('/path/to/any/valid/xml/file.xml') && print "OK"

Actual results:

first run prints "OK", second run dies with message:
Couldn't create file parser context for file "/path/to/any/valid/xml/file.xml":
No such file or directory at
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/XML/LibXML.pm line 427.

Expected results:


Additional info:

This bug is already documented in Debian's bug-tracking system, please look
there: http://bugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=240334
Basicaly, there is missing one initialization block in LibXML library for perl,
which causes it to work correctly when running under non-persistent Perl
interpreter, but fails under persistent Perl (eg. mod_perl, etc.).

I assigned it a "high" level priority, because this bug effectively disables all
functionality of mod_perl modules which are using LibXML, and it is impossible
to get around this bug :(((.

Comment 1 Michal Schwarz 2007-02-13 09:44:53 UTC
I forgot EXACT steps to repdocute this bug:

$ cat - >a.pl
use XML::Simple;
XMLin('file.xml') && print "OK";

$ cat - >file.xml
<?xml version="1.0" encoding="UTF-8"?>

$ perl a.pl
$ perl a.pl

$ /usr/bin/speedy a.pl
$ /usr/bin/speedy a.pl
Couldn't create file parser context for file "file.xml": No such file or 
directory at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-
multi/XML/LibXML.pm line 427.
 at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/XML/LibXML/SAX.pm 
line 63

Comment 2 Jan Pazdziora 2008-02-27 14:28:30 UTC
On Fedora 8 with

# rpm -q perl-XML-LibXML

the problem does no longer be present, under mod_perl.

I've created the file /var/www/perl/index.html with content


print "Content-Type: text/plain\n\n";

use XML::Simple;


print "OK ($$).\n";

I've created the above mentioned file.xml in /tmp, uncommented

Alias /perl /var/www/perl
<Directory /var/www/perl>
    SetHandler perl-script
    PerlResponseHandler ModPerl::Registry
    PerlOptions +ParseHeaders
    Options +ExecCGI

in /etc/httpd/conf.d/perl.conf, restarted httpd, and then run

# GET http://localhost/perl/index.pl

until I hit the same pid again. It went alright the second time as well.

I suggest to mark this bugzilla as resolved with CURRENTRELEASE.

Note You need to log in before you can comment on or make changes to this bug.