Bug 11651 - apache/mod_perl SEGV's when loading perl XS modules at startup
apache/mod_perl SEGV's when loading perl XS modules at startup
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: mod_perl (Show other bugs)
6.2
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Nalin Dahyabhai
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-05-25 01:39 EDT by sub9
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-05-25 22:50:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description sub9 2000-05-25 01:39:29 EDT
I have a complex web site which makes use of many different apache and mod
perl modules (along with mod_php, mod_fastcgi, mysql etc.). Previously I
compiled up my own apache with statically linked mod_perl because redhat
mod_perl did not ship with STACKED_HANDLERS enabled, which my mod_perl
authentication modules need.

RH6.2 mod_perl does have STACKED_HANDLERS enabled, so now I'm attempting to
use the stock RPMS.

I found that httpd does not start up - the httpd just dies - no messages.
strace /usr/sbin/httpd -X showed it SEGV'ing as it was trying to load the
XS part of a perl module that is 'use'd by a perl module which should be
loaded when apache starts (its an 'authen' handler, hence STACKED_HANDLERS
- not just an Apache::Registry/cgi script - I can't load it later)

I removed all the modules I could, and removed all the httpd.conf
configuration directives until I got it down to a completely trivial base
case:

System was a new, 'out of the box' rh6.2, with:
perl-5.00503-10
mod_perl-1.21-10
apache-1.3.12-2

Add a line at the end of /etc/httpd/conf/httpd.conf

PerlModule MD5

Thats it, Kaboom. httpd SEGV's on startup. This works (i.e. doesn't work)
with 'PerlModule IO' as well, which is the only other perl 'XS' module in a
plain RH6.2 system. (I'm not listing the hundreds of others on CPAN).

Bug number #8169 was closed with a workaround of putting the mod_perl
LoadModule/AddModule lines before other module lines in the httpd.conf. Bug
#10206 for rh6.1 doesn't seem to have progressed for a couple of months,
with the original submitter noting that #8169 workaround worked for him
too..

The workaround works for this simple test case here too, but makes no
difference for my 'real world' case of my complete web server. It is
obviously a (severe) bug (segv at startup), and the workaround is just
'luck' - I don't know what effect it may have on the stability once it's up
and running!

I suspect the problem is related to mod_perl being linked as a DSO - my
home grown apache/mod_perl's have been statically linked, and I guess I'll
have to keep maintaining them for now - its painful to keep up though...

Cris
Comment 1 Nalin Dahyabhai 2000-05-25 08:59:59 EDT
We've seen sporadic strange problems crop up with mod_perl 1.21.  Version 1.23
is in Raw Hide (ftp://ftp.redhat.com/pub/rawhide/SRPMS/SRPMS/), and it may solve
the problem.  1.24 was released within the last week, and should be in Raw Hide
soon.  Please see if running "rpm --rebuild" on the 1.23 SRPM and upgrading to
the resulting binary package solves your problem.
Comment 2 sub9 2000-05-25 22:50:59 EDT
The rawhide RPM for mod_perl-1.23 is built against perl-5.6, so I used the
source RPM and rebuilt it against perl-5.00503, as suggested.

This seems to have cured the problem - I don't get a SEGV with the base test
case anymore, and  initial testing with my full application seems OK up till
now.

Thanks
Cris
Comment 3 Nalin Dahyabhai 2000-07-17 17:25:29 EDT
The current setup in Raw Hide seems to work with the "PerlModule MD5"
statement added, so I'm going to mark this as resolved in Raw Hide.  Please
reopen this bug if you find that this problem resurfaces.

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