perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pradeep kumar <pradeep.sm...@gmail.com>
Subject Graceful restart of Apache multiple times
Date Wed, 01 Dec 2004 11:26:56 GMT
Hi,

  If Apache is gracefully rastarted multiplae times it dumps core. To
reproduce this problem there is a script that can be run which sends a
kill -HUP to httpd every 20 secs. The scpirt is

#!/usr/bin/sh

COUNT=1
while true
do
kill -HUP `cat "path_to_httpd.pid/httpd.pid"`
date "+DATE: %m/%d/%y %H:%M:%S count: $COUNT  return: $?"
COUNT=`expr $COUNT + 1`
sleep 20
done

If this is run as 
>nohup ./testhup.sh > testfile &

produces the output as 

DATE: 11/25/04 17:09:38 count: 0  return: 0
DATE: 11/25/04 17:09:53 count: 1  return: 0
DATE: 11/25/04 17:10:08 count: 2  return: 0

Eventually it stops at dumps core.



The error_log produces this

[Fri Nov 26 04:55:43 2004] [notice] SIGHUP received.  Attempting to restart
[Fri Nov 26 04:56:08 2004] [notice] Apache/2.0.52   (Unix)
mod_perl/1.99_16 Perl/v5.8.0 DAV/2 configured -- resuming normal
operati
ons
[Fri Nov 26 04:56:23 2004] [notice] SIGHUP received.  Attempting to restart
[Fri Nov 26 04:56:48 2004] [notice] Apache/2.0.52   (Unix)
mod_perl/1.99_16 Perl/v5.8.0 DAV/2 configured -- resuming normal
operati
ons
[Fri Nov 26 04:57:03 2004] [notice] SIGHUP received.  Attempting to restart
[Fri Nov 26 04:57:28 2004] [notice] seg fault or similar nasty error detected in
the parent process


The core is:

#0  0xc020c428 in kill+0x10 () from /usr/lib/libc.2
(gdb) bt
#0  0xc020c428 in kill+0x10 () from /usr/lib/libc.2
#1  0x544ac in sig_coredump+0xd4 ()
#2  <signal handler called>
#3  0xc28ec8dc in PerlIO_default_layers+0x19c ()
   from /opt/hpws/apache/modules/mod_perl.so
#4  0xc28ed52c in PerlIO_resolve_layers+0x3c ()
   from /opt/hpws/apache/modules/mod_perl.so
#5  0xc28ed888 in PerlIO_openn+0x178 ()
   from /opt/hpws/apache/modules/mod_perl.so
#6  0xc28f37e4 in PerlIO_fdopen+0x5c ()
   from /opt/hpws/apache/modules/mod_perl.so
#7  0xc28eca78 in PerlIO_stdstreams+0x38 ()
   from /opt/hpws/apache/modules/mod_perl.so
#8  0xc28f36c8 in Perl_PerlIO_stderr+0x28 ()
   from /opt/hpws/apache/modules/mod_perl.so
#9  0xc288ed2c in perl_alloc+0x64 () from /opt/hpws/apache/modules/mod_perl.so
#10 0xc286ab24 in modperl_startup+0xa4 ()
   from /opt/hpws/apache/modules/mod_perl.so
#11 0xc286ab04 in modperl_startup+0x84 ()
   from /opt/hpws/apache/modules/mod_perl.so
#12 0xc286b008 in modperl_init+0x30 ()
   from /opt/hpws/apache/modules/mod_perl.so
#13 0xc286b478 in modperl_hook_init+0xa0 ()
---Type <return> to continue, or q <return> to quit--- 
   from /opt/hpws/apache/modules/mod_perl.so
#14 0x440ac in ap_run_open_logs+0x94 ()
#15 0x4bfd0 in main+0xa58 ()

After perl_alloc its dumping core. Cud anyone give me more details
regarding this.



Apache version : 2.0.52
mod_perl          :2
perl                  : 5.8.0


Thanks in advance,
Pradeep

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Mime
View raw message