RT causes core dumps for apache+modperl1

Hello RT likes,

WARNING: This is rather long. Please bear with me.

I seem to have a strange problem which I believe only hawk-eyed gurus can bail
me out of. I’ve used a script to compile apache+mod_ssl+modperl1. This script
can be seen at https://beastie.wananchi.com/~wash/Apache/build-script.txt

I am wondering if it’s a problem within that script because when I use it, the
moment I run apachectl configtest I get syntax OK, and a core dump.

This is happening on 2 FreeBSD boxes (one is 4.7-STABLE, the other 5.0-RELEASE).
Perl versions are as follows: 4.7-STABLE has Perl-5.6.1 while 5.0-RELEASE has
5.8. Both have Apache-1.3.27 and modperl1. This happens only with static
compilation of modperl into apache.

When I comment out the RT VirtualHost or run RT using FCGI, I don’t get this core
dump. When I install apache-mod_ssl/modperl each from the ports, meaning I have
modperl as DSO the setup works okay. I would love to have modperl statically compiled
into apache though.

I am wondering if anyone can reproduce the crash using the script on a test
box (wishful thinking…)

Here are some more details:

Apache-1.3.27 statically compiled with modperl (see script above)

Full analysis of the core files using gdb on both systems can be found at the URL:

https://beastie.wananchi.com/~wash/Apache/

OPTION 1 (Static): This core dumps

beastie# httpd -l
Compiled-in modules:
http_core.c
mod_so.c
mod_perl.c
suexec: enabled; valid wrapper /usr/local/sbin/suexec

OPTION 2 (DSO): This does NOT core dump!

wash@ns2 (‘tty’) ~ 1 → httpd -l
Compiled-in modules:
http_core.c
mod_so.c
suexec: enabled; valid wrapper /usr/local/sbin/suexec

The VirtualHost entry that causes this on the 5.0 system is below. The only
variation to this on the 4.7 system is that on the 4.7 system it’s rt-2-0-15.
When I run rt3 using fastcgi on the 5.0 system there is no problem at all.

<VirtualHost *:443>
ServerName rt3.wananchi.com
DocumentRoot /opt/rt3/share/html
AddDefaultCharset UTF-8

this line applies to Apache2+mod_perl2 only

PerlModule Apache2 Apache::compat

PerlModule Apache::DBI
PerlRequire /opt/rt3/bin/webmux.pl

<Location />  
    SetHandler perl-script
    PerlHandler RT::Mason
</Location>

Thanking you for your time.

-Wash

Odhiambo Washington wash@wananchi.com “The box said ‘Requires
Wananchi Online Ltd. www.wananchi.com Windows 95, NT, or better,’
Tel: +254 2 313985-9 +254 2 313922 so I installed FreeBSD.”
GSM: +254 72 743223 +254 733 744121 This sig is McQ! :slight_smile:

Those who make peaceful revolution impossible will make violent
revolution inevitable.
– John F. Kennedy

its said in the installation instructions that compiling modperl as a DSO
will almost always cause apache to crash. did you do that? if not - what
also happend to me is that if I didn’t load the module to connect apache
to the SQL backend, that is:

PerlModule Apache::DBI

sometimes the make deps doesn’t install that (as suggested in the manual)
and you shold download the apache stuff manually with cpan (again, as
suggested in the manual) - and then it works…

or at least, that’s how it was for me :)On Fri, 21 Feb 2003, Odhiambo Washington wrote:

Hello RT likes,

WARNING: This is rather long. Please bear with me.

I seem to have a strange problem which I believe only hawk-eyed gurus can bail
me out of. I’ve used a script to compile apache+mod_ssl+modperl1. This script
can be seen at https://beastie.wananchi.com/~wash/Apache/build-script.txt

I am wondering if it’s a problem within that script because when I use it, the
moment I run apachectl configtest I get syntax OK, and a core dump.

This is happening on 2 FreeBSD boxes (one is 4.7-STABLE, the other 5.0-RELEASE).
Perl versions are as follows: 4.7-STABLE has Perl-5.6.1 while 5.0-RELEASE has
5.8. Both have Apache-1.3.27 and modperl1. This happens only with static
compilation of modperl into apache.

When I comment out the RT VirtualHost or run RT using FCGI, I don’t get this core
dump. When I install apache-mod_ssl/modperl each from the ports, meaning I have
modperl as DSO the setup works okay. I would love to have modperl statically compiled
into apache though.

I am wondering if anyone can reproduce the crash using the script on a test
box (wishful thinking…)

Here are some more details:

Apache-1.3.27 statically compiled with modperl (see script above)

Full analysis of the core files using gdb on both systems can be found at the URL:

https://beastie.wananchi.com/~wash/Apache/

OPTION 1 (Static): This core dumps

beastie# httpd -l
Compiled-in modules:
http_core.c
mod_so.c
mod_perl.c
suexec: enabled; valid wrapper /usr/local/sbin/suexec

OPTION 2 (DSO): This does NOT core dump!

wash@ns2 (‘tty’) ~ 1 → httpd -l
Compiled-in modules:
http_core.c
mod_so.c
suexec: enabled; valid wrapper /usr/local/sbin/suexec

The VirtualHost entry that causes this on the 5.0 system is below. The only
variation to this on the 4.7 system is that on the 4.7 system it’s rt-2-0-15.
When I run rt3 using fastcgi on the 5.0 system there is no problem at all.

<VirtualHost *:443>
ServerName rt3.wananchi.com
DocumentRoot /opt/rt3/share/html
AddDefaultCharset UTF-8

this line applies to Apache2+mod_perl2 only

PerlModule Apache2 Apache::compat

PerlModule Apache::DBI
PerlRequire /opt/rt3/bin/webmux.pl

<Location />  
    SetHandler perl-script
    PerlHandler RT::Mason
</Location>

Thanking you for your time.

-Wash

Best regards,
Shimi

“Outlook is a massive flaming horrid blatant security violation, which
also happens to be a mail reader.”

“Sure UNIX is user friendly; it’s just picky about who its friends are.”

its said in the installation instructions that compiling modperl as a DSO
will almost always cause apache to crash. did you do that? if not - what
also happend to me is that if I didn’t load the module to connect apache
to the SQL backend, that is:

PerlModule Apache::DBI

sometimes the make deps doesn’t install that (as suggested in the manual)
and you shold download the apache stuff manually with cpan (again, as
suggested in the manual) - and then it works…

or at least, that’s how it was for me :slight_smile:

Helli Shimi,

I compiled modperl statically into apache. See the output below:

beastie# httpd -l
Compiled-in modules:
http_core.c
mod_so.c
mod_perl.c
suexec: enabled; valid wrapper /usr/local/sbin/suexec

About Apache::DBI, I also have it installed:

beastie# perl -MCPAN -e ‘install Apache::DBI’
CPAN: Storable loaded ok
Going to read /usr/home/admin/.cpan/Metadata
Database was generated on Thu, 20 Feb 2003 21:26:18 GMT
Apache::DBI is up to date.
beastie#

Any more suggestions??

    cheers
   - wash 

Odhiambo Washington, wash@wananchi.com . WANANCHI ONLINE LTD (Nairobi, KE) |
http://ns2.wananchi.com/~wash/ . 1ere Etage, Loita Hse, Loita St., |
GSM: (+254) 722 743 223 . # 10286, 00100 NAIROBI |
“Oh My God! They killed init! You Bastards!”
–from a /. post

i see. and… can you run it and paste the output of:

tail /var/log/httpd/error.log

on your server (or the relevant file, if the error log of your server sits
somewhere else)… ?On Fri, 21 Feb 2003, Odhiambo Washington wrote:

its said in the installation instructions that compiling modperl as a DSO
will almost always cause apache to crash. did you do that? if not - what
also happend to me is that if I didn’t load the module to connect apache
to the SQL backend, that is:

PerlModule Apache::DBI

sometimes the make deps doesn’t install that (as suggested in the manual)
and you shold download the apache stuff manually with cpan (again, as
suggested in the manual) - and then it works…

or at least, that’s how it was for me :slight_smile:

Helli Shimi,

I compiled modperl statically into apache. See the output below:

beastie# httpd -l
Compiled-in modules:
http_core.c
mod_so.c
mod_perl.c
suexec: enabled; valid wrapper /usr/local/sbin/suexec

About Apache::DBI, I also have it installed:

beastie# perl -MCPAN -e ‘install Apache::DBI’
CPAN: Storable loaded ok
Going to read /usr/home/admin/.cpan/Metadata
Database was generated on Thu, 20 Feb 2003 21:26:18 GMT
Apache::DBI is up to date.
beastie#

Any more suggestions??

    cheers
   - wash 

±---------------------------------±----------------------------------------+
Odhiambo Washington, wash@wananchi.com . WANANCHI ONLINE LTD (Nairobi, KE) |
http://ns2.wananchi.com/~wash/ . 1ere Etage, Loita Hse, Loita St., |
GSM: (+254) 722 743 223 . # 10286, 00100 NAIROBI |
±--------------------------------±-----------------------------------------+
“Oh My God! They killed init! You Bastards!”
–from a /. post

Best regards,
Shimi

“Outlook is a massive flaming horrid blatant security violation, which
also happens to be a mail reader.”

“Sure UNIX is user friendly; it’s just picky about who its friends are.”

i see. and… can you run it and paste the output of:

tail /var/log/httpd/error.log

on your server (or the relevant file, if the error log of your server sits
somewhere else)… ?

Hello Shimi,

Could you please be a little bit more specific? What would you like me to run?
Well, assuming that you’d like me to run apache anyway (because it starts), here
is the log output when I start apache:

beastie# less /var/log/httpd-main-error.log
[Fri Feb 21 11:56:00 2003] [notice] caught SIGTERM, shutting down
[Fri Feb 21 11:56:09 2003] [notice] FastCGI: process manager initialized (pid 5459)
[Fri Feb 21 11:56:09 2003] [warn] FastCGI: server “/opt/rt3/bin/mason_handler.fcgi” started (pid 5460)
[Fri Feb 21 11:56:10 2003] [notice] Apache/1.3.27 (Unix) mod_fastcgi/2.2.12 PHP/4.3.1 mod_ssl/2.8.12 OpenSSL/0.9.7 mod_perl/1.27
configured
– resuming normal operations
[Fri Feb 21 11:56:10 2003] [notice] suEXEC mechanism enabled (wrapper: /usr/local/sbin/suexec)
[Fri Feb 21 11:56:10 2003] [notice] Accept mutex: flock (Default: flock)
/var/log/httpd-main-error.log (END)

Is there any other data that you would like me to produce?

    cheers
   - wash 

Odhiambo Washington, wash@wananchi.com . WANANCHI ONLINE LTD (Nairobi, KE) |
http://ns2.wananchi.com/~wash/ . 1ere Etage, Loita Hse, Loita St., |
GSM: (+254) 722 743 223 . # 10286, 00100 NAIROBI |
“Oh My God! They killed init! You Bastards!”
–from a /. post

wait wait wait, fastcgi and mod_perl on the same time?

i understood that your apache crashes - what is the error message in the
error log after the server crashes ?On Fri, 21 Feb 2003, Odhiambo Washington wrote:

i see. and… can you run it and paste the output of:

tail /var/log/httpd/error.log

on your server (or the relevant file, if the error log of your server sits
somewhere else)… ?

Hello Shimi,

Could you please be a little bit more specific? What would you like me to run?
Well, assuming that you’d like me to run apache anyway (because it starts), here
is the log output when I start apache:

beastie# less /var/log/httpd-main-error.log
[Fri Feb 21 11:56:00 2003] [notice] caught SIGTERM, shutting down
[Fri Feb 21 11:56:09 2003] [notice] FastCGI: process manager initialized (pid 5459)
[Fri Feb 21 11:56:09 2003] [warn] FastCGI: server “/opt/rt3/bin/mason_handler.fcgi” started (pid 5460)
[Fri Feb 21 11:56:10 2003] [notice] Apache/1.3.27 (Unix) mod_fastcgi/2.2.12 PHP/4.3.1 mod_ssl/2.8.12 OpenSSL/0.9.7 mod_perl/1.27
configured
– resuming normal operations
[Fri Feb 21 11:56:10 2003] [notice] suEXEC mechanism enabled (wrapper: /usr/local/sbin/suexec)
[Fri Feb 21 11:56:10 2003] [notice] Accept mutex: flock (Default: flock)
/var/log/httpd-main-error.log (END)

Is there any other data that you would like me to produce?

    cheers
   - wash 

±---------------------------------±----------------------------------------+
Odhiambo Washington, wash@wananchi.com . WANANCHI ONLINE LTD (Nairobi, KE) |
http://ns2.wananchi.com/~wash/ . 1ere Etage, Loita Hse, Loita St., |
GSM: (+254) 722 743 223 . # 10286, 00100 NAIROBI |
±--------------------------------±-----------------------------------------+
“Oh My God! They killed init! You Bastards!”
–from a /. post


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

Best regards,
Shimi

“Outlook is a massive flaming horrid blatant security violation, which
also happens to be a mail reader.”

“Sure UNIX is user friendly; it’s just picky about who its friends are.”

wait wait wait, fastcgi and mod_perl on the same time?

Not at the same time.

I get a core dump when

  1. I use the modperl config for RT
  2. I run apachectl configtest

I do not get a core dump when

  1. I use fcgi config for RT
  2. I run configtest.

i understood that your apache crashes - what is the error message in the
error log after the server crashes ?

I think you’ve misunderstood me. Apache doesn’t crash per se. I can launch it
even with RT using modperl config. It core dimps with this config when I run
apachectl confgtest.
At that moment there is nothing written to any log file.

    cheers
   - wash 

Odhiambo Washington, wash@wananchi.com . WANANCHI ONLINE LTD (Nairobi, KE) |
http://ns2.wananchi.com/~wash/ . 1ere Etage, Loita Hse, Loita St., |
GSM: (+254) 722 743 223 . # 10286, 00100 NAIROBI |
“Oh My God! They killed init! You Bastards!”
–from a /. post

“s” == shimi shimi@shimi.net writes:

s> its said in the installation instructions that compiling modperl as a DSO
s> will almost always cause apache to crash. did you do that? if not - what

This is just false. Dynamic mod_perl works just fine. The only side
effect on FreeBSD is a big memory leak on restart (so stop/start instead).
I have not tracked that down yet, as it is a minor issue as far as I’m
concerned.

I’ve also used dynamic mod_perl + dynamic PHP on Linux for over a year in a
production environment without noticing any problem.
I switched to static when I recently upgraded perl only because the
documentation somewhat frightened me.

Blaise

-----Message d’origine-----De : Vivek Khera [mailto:khera@kcilink.com]
Envoye : vendredi 21 fevrier 2003 16:41
A : rt-users@lists.fsck.com
Objet : Re: [rt-users] RT causes core dumps for apache+modperl1

“s” == shimi shimi@shimi.net writes:

s> its said in the installation instructions that compiling modperl as a DSO

s> will almost always cause apache to crash. did you do that? if not - what

This is just false. Dynamic mod_perl works just fine. The only side
effect on FreeBSD is a big memory leak on restart (so stop/start instead).
I have not tracked that down yet, as it is a minor issue as far as I’m
concerned.
rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

well, tell that to Jesse…

Quote, tarball maindir/README, Lines 36,37:

    If you compile mod_perl as a DSO, you're on your own. It's known
    to have massive stability problems.On Fri, 21 Feb 2003, Vivek Khera wrote:

“s” == shimi shimi@shimi.net writes:

s> its said in the installation instructions that compiling modperl as a DSO
s> will almost always cause apache to crash. did you do that? if not - what

This is just false. Dynamic mod_perl works just fine. The only side
effect on FreeBSD is a big memory leak on restart (so stop/start instead).
I have not tracked that down yet, as it is a minor issue as far as I’m
concerned.


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

Best regards,
Shimi

“Outlook is a massive flaming horrid blatant security violation, which
also happens to be a mail reader.”

“Sure UNIX is user friendly; it’s just picky about who its friends are.”

i have to admit that it works for me too, but sometimes i get internal
server errors, however apache has yet to crash. i just believed that it
doesn’t crash because i handle no more than 10 tickets a day, so i figured
out this warning at the docs was about much more busier systems…

but if it works for everyone, i guess jesse should remove it from the main
readme file… i installed it with mod_perl only after finding out that i
need to recompile apache for fastcgi - and if i would recompile apache, i
would use the mod_perl as static anyways…

so… jesse? :)On Fri, 21 Feb 2003, THAUVIN Blaise (Dir. Informatique) wrote:

I’ve also used dynamic mod_perl + dynamic PHP on Linux for over a year in a
production environment without noticing any problem.
I switched to static when I recently upgraded perl only because the
documentation somewhat frightened me.

Blaise

-----Message d’origine-----
De : Vivek Khera [mailto:khera@kcilink.com]
Envoye : vendredi 21 fevrier 2003 16:41
A : rt-users@lists.fsck.com
Objet : Re: [rt-users] RT causes core dumps for apache+modperl1

“s” == shimi shimi@shimi.net writes:

s> its said in the installation instructions that compiling modperl as a DSO

s> will almost always cause apache to crash. did you do that? if not - what

This is just false. Dynamic mod_perl works just fine. The only side
effect on FreeBSD is a big memory leak on restart (so stop/start instead).
I have not tracked that down yet, as it is a minor issue as far as I’m
concerned.


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

Best regards,
Shimi

“Outlook is a massive flaming horrid blatant security violation, which
also happens to be a mail reader.”

“Sure UNIX is user friendly; it’s just picky about who its friends are.”

i have to admit that it works for me too, but sometimes i get internal
server errors, however apache has yet to crash.

Those internal server errors are mod_perl failing. While there are
platforms that you can build mod_perl on as a DSO without it failing,
it’s still generally broken enough that the warning is going to stay.

I’m also going to be adding a warning about apache2/mod_perl2 still not
being ready for prime time. Too many people are running into too many
weird issues.

-j

Request Tracker... So much more than a help desk — Best Practical Solutions – Trouble Ticketing. Free.