Apache child process hang after long hours run

Apache child process hang after long hours run

am 06.01.2010 23:48:26 von weidezhang

We are using apache 1.3.37 and develop all server side application using
mod_perl. We found the process could hang after long hours of run. It looks
it dies on mutx_lock_wait but we dont know where the process actually hangs.
There are two typical backtrace when we saw the child process hanging.

(gdb) bt
#0 0x00fab7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x00c6ce5e in __lll_mutex_lock_wait () from /lib/tls/libc.so.6
#2 0x00bfec9b in _L_mutex_lock_3764 () from /lib/tls/libc.so.6
#3 0x00907c66 in MAX_MSG_SIZE () from /home/y/lib/liblwes.so.0
#4 0x003a3a74 in std::string::replace () from /usr/lib/libstdc++.so.6
#5 0x009046fe in lwes_emitter_destroy (emitter=0xe8f9428) at
lwes_emitter.c:180
#6 0x007f6ef7 in destroy_emitter () from
/home/y/lib/perl5/site_perl/5.8/i686-linux-64int/auto/LWES/L WES.so
#7 0x007f54c0 in XS_LWES_destroy_emitter () from
/home/y/lib/perl5/site_perl/5.8/i686-linux-64int/auto/LWES/L WES.so
#8 0x00227c34 in Perl_pp_entersub () from /home/y/libexec/libperl.so
#9 0x00221574 in Perl_runops_standard () from /home/y/libexec/libperl.so
#10 0x001db676 in S_call_body () from /home/y/libexec/libperl.so
#11 0x001db46e in Perl_call_sv () from /home/y/libexec/libperl.so
#12 0x001b9371 in perl_call_handler (sv=0x882c15c, r=0xcd3e0b4, args=0x0) at
mod_perl.c:1668
#13 0x001b9ad5 in perl_run_stacked_handlers (hook=0x282949
"PerlChildExitHandler", r=0xcd3e0b4,
handlers=0x882c168) at mod_perl.c:1381
#14 0x001bacf7 in perl_child_exit (s=0x881e05c, p=0xcd3deec) at
mod_perl.c:963
#15 0x001bad24 in perl_child_exit_cleanup (data=0xfffffffc) at
mod_perl.c:933
#16 0x08051829 in run_cleanups ()
#17 0x080500b4 in ap_clear_pool ()
#18 0x08050131 in ap_destroy_pool ()
#19 0x0805dce6 in clean_child_exit ()
#20 0x0805f9fb in just_die ()
#21
#22 0x00bf9692 in malloc_consolidate () from /lib/tls/libc.so.6
#23 0x00bfa643 in _int_malloc () from /lib/tls/libc.so.6
#24 0x00bfc401 in malloc () from /lib/tls/libc.so.6
#25 0x00214069 in Perl_safesysmalloc () from /home/y/libexec/libperl.so
#26 0x0022a15e in Perl_sv_grow () from /home/y/libexec/libperl.so


(gdb) bt
#0 0x0069a7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x005c6e5e in __lll_mutex_lock_wait () from /lib/tls/libc.so.6
#2 0x0056efa9 in _L_mutex_lock_1947 () from /lib/tls/libc.so.6
#3 0x00521579 in round_and_return () from /lib/tls/libc.so.6
#4 0x0056d000 in localtime () from /lib/tls/libc.so.6
#5 0x0056cec1 in ctime () from /lib/tls/libc.so.6
#6 0x080ba834 in ap_get_time ()
#7 0x080acb2c in log_error_core ()
#8 0x080acd64 in ap_log_error ()
#9 0x080adef5 in timeout ()
#10
#11 0x0069a7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#12 0x005ab073 in __read_nocancel () from /lib/tls/libc.so.6
#13 0x0054ff7d in _IO_file_read_internal () from /lib/tls/libc.so.6
#14 0x0054ecee in _IO_new_file_underflow () from /lib/tls/libc.so.6
#15 0x00550f9d in __underflow () from /lib/tls/libc.so.6
#16 0x00550563 in _IO_file_xsgetn_internal () from /lib/tls/libc.so.6
#17 0x00551428 in _IO_sgetn_internal () from /lib/tls/libc.so.6
#18 0x0054de2c in fread_unlocked () from /lib/tls/libc.so.6
#19 0x0056f1e4 in __tzfile_read () from /lib/tls/libc.so.6 #20 0x0056e13f in
tzset_internal () from /lib/tls/libc.so.6
#21 0x0056edaa in __tz_convert () from /lib/tls/libc.so.6
#22 0x0056cf7d in gmtime () from /lib/tls/libc.so.6
#23 0x080ba9bf in ap_gm_timestr_822 ()
#24 0x080b4e9d in ap_basic_http_header ()
#25 0x080b50b3 in ap_send_http_header ()
#26 0x08091b72 in XS_Apache_send_http_header ()
#27 0x0811e59c in Perl_pp_entersub ()
#28 0x08117edc in Perl_runops_standard ()
#29 0x080d1fde in S_call_body ()
#30 0x080d1dd6 in Perl_call_sv ()
#31 0x08085859 in perl_call_handler ()
#32 0x08085fce in perl_run_stacked_handlers ()
#33 0x080873f1 in perl_handler ()
#34 0x080a5f12 in ap_invoke_handler ()
#35 0x080b96a8 in process_request_internal ()
#36 0x080b9845 in ap_process_request ()
#37 0x080af825 in child_main ()
#38 0x080afdb6 in make_child ()
#39 0x080b0072 in perform_idle_server_maintenance () #40 0x080b0f7f in
standalone_main ()
#41 0x080b20d7 in main ()

And also, can any one tell me what's the signal emitted by Apache ? Is it
the signal used to do childExit and Respawn by Apache? How does apache does
the child exit and restart after the maxChildRequest has reached and does it
wait after the current request is done ?

Thanks for every one helping !

--
View this message in context: http://old.nabble.com/Apache-child-process-hang-after-long-h ours-run-tp27026981p27026981.html
Sent from the mod_perl - General mailing list archive at Nabble.com.