[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#91806: marked as done ($SIG{__DIE__} = \&Carp::confess; and Apache mod_perl SEGV in libperl.so.5.6.0)



Your message dated Sun, 9 Nov 2003 11:12:58 +0100 (CET)
with message-id <Pine.LNX.4.58.0311091111380.11417@trider-g7.ext.fabbione.net>
and subject line (no subject)
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 26 Mar 2001 19:27:29 +0000
>From karlheg@microsharp.com Mon Mar 26 13:27:29 2001
Return-path: <karlheg@microsharp.com>
Received: from (mail.microsharp.com) [206.190.130.135] (root)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 14hceG-0007O3-00; Mon, 26 Mar 2001 13:27:28 -0600
Received: from karlheg.intra ([206.190.130.133])
	by mail.microsharp.com (8.9.3/8.9.3) with ESMTP id KAA07980
	for <submit@bugs.debian.org>; Mon, 26 Mar 2001 10:59:02 -0800
Received: from karlheg by karlheg.intra with local (Exim 3.22 #1 (Debian))
	id 14hcdm-0008OS-00
	for <submit@bugs.debian.org>; Mon, 26 Mar 2001 11:26:36 -0800
To: submit@bugs.debian.org
Subject: $SIG{__DIE__} = \&Carp::confess; and Apache mod_perl SEGV in libperl.so.5.6.0
X-Face: /Q}=yl}1_v7nP)xXo5XjG8+tl@=uVu7o5u6)f]zN?+<hB!K.m9:[|*p34jVN`O;:XZXVSy>/\R>qDt(t8w!-i{(y0"`jFw^uk8inzO9wXabd'CdjUWfC\GHi:6nO*YC89#-qD>Q4r%9!V"<RYJ=7D#$";q=zML5'!=wvXk^$`6FT=5CMofQX)WUKt0p:OKl.mFOXx/D
From: karlheg@microsharp.com (Karl M. Hegbloom)
Date: 26 Mar 2001 11:26:33 -0800
Message-ID: <87u24gbabk.fsf@microsharp.com>
Lines: 106
User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.2 (Thelxepeia (GTK Inside))
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Delivered-To: submit@bugs.debian.org

Package: libapache-mod-perl
Version: 1.25-3
Severity: normal

 I could not get Apache to start; there was a segv occuring.  `gdb
 apache' caught this backtrace:

 (From running "gdb apache")

Program received signal SIGSEGV, Segmentation fault.
0x402d3713 in Perl_newSVsv () from /usr/lib/libperl.so.5.6
(gdb) where
#0  0x402d3713 in Perl_newSVsv () from /usr/lib/libperl.so.5.6
#1  0x402eac89 in Perl_pp_caller () from /usr/lib/libperl.so.5.6
#2  0x402c5731 in Perl_runops_standard () from /usr/lib/libperl.so.5.6
#3  0x4028060c in perl_call_sv () from /usr/lib/libperl.so.5.6
#4  0x40280138 in perl_call_sv () from /usr/lib/libperl.so.5.6
#5  0x402b9eea in Perl_vdie () from /usr/lib/libperl.so.5.6
#6  0x402ba039 in Perl_die () from /usr/lib/libperl.so.5.6
#7  0x402ea31c in Perl_die_where () from /usr/lib/libperl.so.5.6
#8  0x402b9f98 in Perl_vdie () from /usr/lib/libperl.so.5.6
#9  0x402ba039 in Perl_die () from /usr/lib/libperl.so.5.6
#10 0x402f19ac in Perl_pp_die () from /usr/lib/libperl.so.5.6
#11 0x402c5731 in Perl_runops_standard () from /usr/lib/libperl.so.5.6
#12 0x402ed2f9 in Perl_pp_exit () from /usr/lib/libperl.so.5.6
#13 0x402ed385 in Perl_pp_exit () from /usr/lib/libperl.so.5.6
#14 0x402eee4c in Perl_pp_require () from /usr/lib/libperl.so.5.6
#15 0x402c5731 in Perl_runops_standard () from /usr/lib/libperl.so.5.6
#16 0x4028060c in perl_call_sv () from /usr/lib/libperl.so.5.6
#17 0x40280138 in perl_call_sv () from /usr/lib/libperl.so.5.6
#18 0x402ba2b5 in Perl_vcroak () from /usr/lib/libperl.so.5.6
#19 0x402ba439 in Perl_croak () from /usr/lib/libperl.so.5.6
#20 0x402cbfa2 in Perl_pp_method_named () from /usr/lib/libperl.so.5.6
#21 0x402cbe25 in Perl_pp_method_named () from /usr/lib/libperl.so.5.6
#22 0x402c5731 in Perl_runops_standard () from /usr/lib/libperl.so.5.6
---Type <return> to continue, or q <return> to quit--- 
#23 0x4028060c in perl_call_sv () from /usr/lib/libperl.so.5.6
#24 0x402807ae in perl_eval_sv () from /usr/lib/libperl.so.5.6
#25 0x40241f83 in perl_do_file () from /usr/lib/apache/1.3/mod_perl.so
#26 0x40241fcf in perl_load_startup_script ()
   from /usr/lib/apache/1.3/mod_perl.so
#27 0x4023d948 in perl_cmd_require () from /usr/lib/apache/1.3/mod_perl.so
#28 0x8054a79 in ap_clear_module_list ()
#29 0x8054dfa in ap_handle_command ()
#30 0x8054e41 in ap_srm_command_loop ()
#31 0x8057c45 in ap_exists_config_define ()
#32 0x80545ed in ap_clear_module_list ()
#33 0x8054dfa in ap_handle_command ()
#34 0x8054e41 in ap_srm_command_loop ()
#35 0x8055372 in ap_process_resource_config ()
#36 0x8055a6c in ap_read_config ()
#37 0x805d818 in main ()
#38 0x400ce13b in __libc_start_main () from /lib/libc.so.6

 I discovered that a combination of two factors is what triggers this
 segv.  In the handler, I had done:

$SIG{__WARN__} = \&Carp::cluck;
$SIG{__DIE__}  = \&Carp::confess;

 ... and then in a block at toplevel of the handler, inside a set of
 braces that confine a "package" declaration (for libhtml-mason-perl
 "HTML::Mason::Commands"), I had made a mistake; trying to call a
 method on an "undefined object"; one I'd not "new"ed yet.  That
 triggered the "die", which leads to the segv.

 I grepped via Google for "libperl segv mod_perl", and found, in a
 mail archive, the idea of declaring a SEGV signal handler...

$SIG{SEGV} = \&Carp::cluck;

 ... and added that to the handler.  Here's what it printed then:

# /etc/init.d/apache start
Starting web server: apache.
Deep recursion on subroutine "Carp::longmess_heavy" at /usr/share/perl/5.6.0/Carp.pm line 98.
Deep recursion on subroutine "Carp::cluck" at /usr/share/perl/5.6.0/Carp/Heavy.pm line 39.

 That led me to experimentally commenting off each of the $SIG lines
 in turn.  The apache daemon started after I commented off the __DIE__
 line... and I then found the error:

# /etc/init.d/apache start
Starting web server: apache.
[Mon Mar 26 11:20:40 2001] [error] Can't call method "remote" on an undefined value at /usr/local/src/www/_Handlers.mod_perl line 85.
Compilation failed in require at (eval 7) line 1.

Syntax error on line 1251 of /etc/apache/httpd.conf:
Can't call method "remote" on an undefined value at /usr/local/src/www/_Handlers.mod_perl line 85.
Compilation failed in require at (eval 7) line 1.

/usr/sbin/apachectl start: httpd could not be started

 After fixing my mistake, the server starts fine, even with the
 __DIE__ signal handler in place, though I suspect that if something
 died, it would segv then in the same manner.

 The mod_perl_traps page tells of using Carp::confess as a __DIE__
 handler, so it is supposed to work.  I hope this leads someone who
 can do it to a bugfix...  I certainly cannot fix it yet.  They are
 giants.

-- 
mailto: (Karl M. Hegbloom) karlheg@microsharp.com
http://www.microsharp.com
phone://USA/WA/360-260-2066

---------------------------------------
Received: (at 91806-done) by bugs.debian.org; 9 Nov 2003 10:13:01 +0000
>From fabbione@fabbione.net Sun Nov 09 04:13:00 2003
Return-path: <fabbione@fabbione.net>
Received: from port5.ds1-sby.adsl.cybercity.dk (trider-g7.fabbione.net) [212.242.169.198] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1AImZ2-00043Z-00; Sun, 09 Nov 2003 04:13:00 -0600
Received: from trider-g7.ext.fabbione.net (port5.ds1-sby.adsl.cybercity.dk [212.242.169.198])
	by trider-g7.fabbione.net (Postfix) with ESMTP id 225D216
	for <91806-done@bugs.debian.org>; Sun,  9 Nov 2003 11:12:59 +0100 (CET)
Date: Sun, 9 Nov 2003 11:12:58 +0100 (CET)
From: Fabio Massimo Di Nitto <fabbione@fabbione.net>
Sender: fabbione@trider-g7.ext.fabbione.net
To: 91806-done@bugs.debian.org
Message-ID: <Pine.LNX.4.58.0311091111380.11417@trider-g7.ext.fabbione.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Delivered-To: 91806-done@bugs.debian.org
X-Spam-Status: No, hits=0.0 required=4.0
	tests=none
	version=2.53-bugs.debian.org_2003_11_7
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_11_7 (1.174.2.15-2003-03-30-exp)


We are not able to reproduce this bug anymore with the recent versions of
apache and mod_perl so we believe that it has been fixed upstream.

Fabio

-- 
Our mission: make IPv6 the default IP protocol
"We are on a mission from God" - Elwood Blues

http://www.itojun.org/paper/itojun-nanog-200210-ipv6isp/mgp00004.html



Reply to: