mod_perl crashes with Perl 5.10
mod_perl crashes with Perl 5.10
am 29.03.2009 21:30:40 von Jozef Kosoru
Hello,
I tested my mod_perl application using following combinations recently:
* Apache/2.2.9 (Debian) mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0
(default Debian Lenny packages, mpm-prefork)
* Apache/2.2.11 (Unix) mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.0
(apache, apreq and mod_perl compiled from sources, mpm-prefork)
and I see a crash of Apache process on each request.
Here's the backtrace:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7ce0ad0 (LWP 11196)]
0xb7bf2095 in Perl_pp_undef () from /usr/lib/libperl.so.5.10
(gdb) bt
#0 0xb7bf2095 in Perl_pp_undef () from /usr/lib/libperl.so.5.10
#1 0xb7bc2dc1 in Perl_runops_standard () from /usr/lib/libperl.so.5.10
#2 0xb7bbcd38 in Perl_call_sv () from /usr/lib/libperl.so.5.10
#3 0xb7cb2bfc in modperl_callback (my_perl=0x9ab21a0, handler=0x9639b18, p=0x9ad4578,
r=0x9ad45b8, s=0x961bfe0, args=0x98a13c0) at modperl_callback.c:101
#4 0xb7cb32d3 in modperl_callback_run_handlers (idx=6, type=4, r=0x9ad45b8, c=0x0,
s=0x961bfe0, pconf=0x0, plog=0x0, ptemp=0x0, run_mode=MP_HOOK_RUN_FIRST)
at modperl_callback.c:262
#5 0xb7cb39ca in modperl_callback_per_dir (idx=6, r=0x9ad45b8, run_mode=MP_HOOK_RUN_FIRST)
at modperl_callback.c:369
#6 0xb7cac6ef in modperl_response_handler_run (r=0x9ad45b8, finish=1) at mod_perl.c:1000
#7 0xb7caca74 in modperl_response_handler (r=0x9ad45b8) at mod_perl.c:1044
#8 0x0807c109 in ap_run_handler (r=0x9ad45b8) at config.c:158
#9 0x0807f469 in ap_invoke_handler (r=0x9ad45b8) at config.c:372
#10 0x08098c06 in ap_process_request (r=0x9ad45b8) at http_request.c:282
#11 0x08095ca8 in ap_process_http_connection (c=0x9ace738) at http_core.c:190
#12 0x08083479 in ap_run_process_connection (c=0x9ace738) at connection.c:43
#13 0x080a9f35 in child_main (child_num_arg=) at prefork.c:650
#14 0x080aa213 in make_child (s=0x961bfe0, slot=0) at prefork.c:746
#15 0x080ab018 in ap_mpm_run (_pconf=0x96050a8, plog=0x9641198, s=0x961bfe0) at prefork.c:881
#16 0x08068df0 in main (argc=Cannot access memory at address 0x0
) at main.c:740
From the perl code perspective it looks like it crashes somewhere inside
"HTML::Template::output" method. I tried several different versions of
HTML::Template package and all of them crash in the same way. (However I
don't think that the crash is caused by this package.)
Last known working mod_perl combination where my application worked
just fine is:
Apache/2.2.8 (Ubuntu) mod_apreq2-20051231/2.6.0 mod_perl/2.0.3 Perl/v5.8.8
(any older versions also worked with no problems)
and therefore it seems like an upgrade to Perl 5.10 is a possible reason
for this crash.
I'm not able to reproduce this problem with a simple "hello world"
application but my application isn't that complicated either. Has anyone
experienced a similar issue?
I have a very limited experience with debugging of mod_perl/perl
crashes. Any advise on how to efficiently track this problem would be
greatly appreciated.
Thank you.
Jozef
--
Jozef Kosoru
Re: mod_perl crashes with Perl 5.10
am 08.04.2009 04:17:27 von gozer
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigC986064970E5032B4A8B04FE
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On 29/3/09 15:30, Jozef Kosoru wrote:
> Hello,
>=20
> I tested my mod_perl application using following combinations recently:=
>=20
> * Apache/2.2.9 (Debian) mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v=
5.10.0
> (default Debian Lenny packages, mpm-prefork)
>=20
> * Apache/2.2.11 (Unix) mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5=
10.0
> (apache, apreq and mod_perl compiled from sources, mpm-prefork)
>=20
> and I see a crash of Apache process on each request.
Just to be sure, is that a 32/64 bit platform ?
> Here's the backtrace:
>=20
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0xb7ce0ad0 (LWP 11196)]
> 0xb7bf2095 in Perl_pp_undef () from /usr/lib/libperl.so.5.10
> (gdb) bt
> #0 0xb7bf2095 in Perl_pp_undef () from /usr/lib/libperl.so.5.10
> #1 0xb7bc2dc1 in Perl_runops_standard () from /usr/lib/libperl.so.5.1=
0
> #2 0xb7bbcd38 in Perl_call_sv () from /usr/lib/libperl.so.5.10
> #3 0xb7cb2bfc in modperl_callback (my_perl=3D0x9ab21a0, handler=3D0x9=
639b18, p=3D0x9ad4578,
> r=3D0x9ad45b8, s=3D0x961bfe0, args=3D0x98a13c0) at modperl_callbac=
k.c:101
Hrm, if at all possible, while in gdb, could you dump more information fr=
om that frame ?
(gdb) info locals
Also, I'd love to see as much of the arguments as possible, expecially ha=
ndler, r and args
(gdb) print *handler
(gdb) print *r
(gdb) print *args
Thanks.
Also, one thing that always help narrow things down is if you could boil =
down your application
to a small enough test case that you could share it with us.
--=20
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
--------------enigC986064970E5032B4A8B04FE
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
iD8DBQFJ3Ak3yzKhB4jDpaURAqqCAKChtcBxcb+0ahwrCeZUXKh7Q2S10ACc DKIl
0zCjw46BpQzqy5cR4Eg7tPQ=
=Qyyz
-----END PGP SIGNATURE-----
--------------enigC986064970E5032B4A8B04FE--
Re: mod_perl crashes with Perl 5.10
am 21.04.2009 12:44:14 von Jozef Kosoru
Hi Philippe,
(Sorry for the delay with my answer - I'll be quick from now on)
Thank you for your interest to help me with this crasher.
On Tue, Apr 07, 2009 at 22:17:27 -0400, Philippe M. Chiasson wrote:
> On 29/3/09 15:30, Jozef Kosoru wrote:
> > Hello,
> >
> > I tested my mod_perl application using following combinations recently:
> >
> > * Apache/2.2.9 (Debian) mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0
> > (default Debian Lenny packages, mpm-prefork)
> >
> > * Apache/2.2.11 (Unix) mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.0
> > (apache, apreq and mod_perl compiled from sources, mpm-prefork)
> >
> > and I see a crash of Apache process on each request.
>
> Just to be sure, is that a 32/64 bit platform ?
This is 32 bit. I can check on 64 bit.
> > Here's the backtrace:
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > [Switching to Thread 0xb7ce0ad0 (LWP 11196)]
> > 0xb7bf2095 in Perl_pp_undef () from /usr/lib/libperl.so.5.10
> > (gdb) bt
> > #0 0xb7bf2095 in Perl_pp_undef () from /usr/lib/libperl.so.5.10
> > #1 0xb7bc2dc1 in Perl_runops_standard () from /usr/lib/libperl.so.5.10
> > #2 0xb7bbcd38 in Perl_call_sv () from /usr/lib/libperl.so.5.10
> > #3 0xb7cb2bfc in modperl_callback (my_perl=0x9ab21a0, handler=0x9639b18, p=0x9ad4578,
> > r=0x9ad45b8, s=0x961bfe0, args=0x98a13c0) at modperl_callback.c:101
>
> Hrm, if at all possible, while in gdb, could you dump more information from that frame ?
>
> (gdb) info locals
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7cf9ad0 (LWP 8233)]
0xb7c0b095 in Perl_pp_undef () from /usr/lib/libperl.so.5.10
(gdb) info locals
No symbol table info available.
Any clue?
> Also, I'd love to see as much of the arguments as possible, expecially handler, r and args
>
> (gdb) print *handler
> (gdb) print *r
> (gdb) print *args
Same with others:
(gdb) print *handler
No symbol "handler" in current context.
(gdb) print *r
No symbol "r" in current context
(gdb) print *args
No symbol "args" in current context
Do I have to recompile Perl with some special debug symbols?
> Thanks.
>
> Also, one thing that always help narrow things down is if you could
> boil down your application to a small enough test case that you could
> share it with us.
I was trying to do so but haven't succeded with any minimalized
test-case yet. But it's not really so much code anyway and it's all GPL.
I'll try to make an easy package of it.
Regards,
Jozef
--
Jozef Kosoru
http://zyzstar.kosoru.com