Bug 11651 - apache/mod_perl SEGV's when loading perl XS modules at startup
Summary: apache/mod_perl SEGV's when loading perl XS modules at startup
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mod_perl
Version: 6.2
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-05-25 05:39 UTC by sub9
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2000-05-26 02:50:57 UTC
Embargoed:


Attachments (Terms of Use)

Description sub9 2000-05-25 05:39:29 UTC
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 12:59:59 UTC
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-26 02:50:59 UTC
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 21:25:29 UTC
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.