>>>>> On Sat, 29 Jun 2002 16:48:57 -0700 (PDT), Doug MacEachern <[EMAIL PROTECTED]> 
>said:

  > On Mon, 24 Jun 2002, Andreas J. Koenig wrote:
 >> This stack trace is all I have. I cannot reproduce this SEGV at will,
 >> so it will be difficult to obtain additional information. All I can do
 >> is let the webserver run in -X mode and wait. I have no hints (yet)
 >> what kind of request triggers it.
  > ...
 >> #6  0x820baa2 in PerlIO_cleanup (my_perl=0x82fc9c8) at perlio.c:2124
 >> #7  0x810d298 in perl_destruct (my_perl=0x82fc9c8) at perl.c:490
 >> #8  0x8099039 in perl_shutdown (s=0x82f140c, p=0x88f9c24) at mod_perl.c:294
 >> #9  0x809b373 in perl_child_exit (s=0x82f140c, p=0x88f9c24) at mod_perl.c:958
 >> #10 0x809afce in perl_child_exit_cleanup (data=0x88f9db4) at mod_perl.c:926

  > looks like a leaked PerlIO* from Request.xs, as this is happening when the 
  > child is killed by apache (e.g. MaxRequestsPerChild reached).
  > patch below may cure, seems like a better approach in any case.
  > it is ugly here because the FILE was opened by an apache api function 
  > which will close it when the request pool is cleared, so we must dup.

Thanks Doug, another great step forward! I can confirm that setting
MaxRequestPerChild to 0 is an excellent way to avert the SEGV. But
unfortunately your patch doesn't cure completely. This is the latest
stack trace I got after I applied your patch. It was triggered by a
static file request that did not call a mod_perl handler.
MaxRequestPerChild was set to 3.

Program received signal SIGSEGV, Segmentation fault.
0x400d8076 in chunk_free (ar_ptr=0x4016ca40, p=0x82fd0a0) at malloc.c:3097
3097    malloc.c: No such file or directory.
(gdb) bt
#0  0x400d8076 in chunk_free (ar_ptr=0x4016ca40, p=0x82fd0a0) at malloc.c:3097
#1  0x400d7f5a in __libc_free (mem=0x82fd0a8) at malloc.c:3023
#2  0x8169142 in Perl_safesysfree (where=0x82fd0a8) at util.c:151
#3  0x8197ea2 in Perl_sv_clear (my_perl=0x82fc9c8, sv=0x86ed0bc) at sv.c:5049
#4  0x819831d in Perl_sv_free (my_perl=0x82fc9c8, sv=0x86ed0bc) at sv.c:5192
#5  0x818d4d8 in do_clean_all (my_perl=0x82fc9c8, sv=0x86ed0bc) at sv.c:400
#6  0x818d147 in S_visit (my_perl=0x82fc9c8, f=0x818d47c <do_clean_all>)
    at sv.c:292
#7  0x818d4fe in Perl_sv_clean_all (my_perl=0x82fc9c8) at sv.c:418
#8  0x810ddd5 in perl_destruct (my_perl=0x82fc9c8) at perl.c:771
#9  0x8099039 in perl_shutdown (s=0x82f140c, p=0x8903d6c) at mod_perl.c:294
#10 0x809b373 in perl_child_exit (s=0x82f140c, p=0x8903d6c) at mod_perl.c:958
#11 0x809afce in perl_child_exit_cleanup (data=0x8903efc) at mod_perl.c:926
#12 0x80ddc8e in run_cleanups ()
#13 0x80dc4bd in ap_clear_pool ()
#14 0x80dc531 in ap_destroy_pool ()
#15 0x80e945b in clean_child_exit ()
#16 0x80ec707 in child_main ()
#17 0x80eccb0 in make_child ()
#18 0x80ece09 in startup_children ()
#19 0x80ed466 in standalone_main ()
#20 0x80edc33 in main ()
#21 0x4009698b in __libc_start_main (main=0x80ed8dc <main>, argc=4, 
    argv=0xbffffcc4, init=0x807a6f8 <_init>, fini=0x828da5c <_fini>, 
    rtld_fini=0x4000ae60 <_dl_fini>, stack_end=0xbffffcbc)
    at ../sysdeps/generic/libc-start.c:92



-- 
andreas

Reply via email to