You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Doug MacEachern <do...@covalent.net> on 2002/07/01 00:30:18 UTC

Re: Another SEGV perl 5.8.0-RC2 apache 1.3.26 mod_perl 1.27

On Sun, 30 Jun 2002, Andreas J. Koenig wrote:
 
> 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

hmm, looks like double free of SvPVX.  if you could in gdb:
(gdb) up 3
(gdb) print *sv
(gdb) print *(XPV*)sv->sv_any

might give a hint.



Re: Another SEGV perl 5.8.0-RC2 apache 1.3.26 mod_perl 1.27

Posted by "Andreas J. Koenig" <an...@anima.de>.
5.8.0-RC3 still produces the SEGV with apache 1.3.26, mod_perl 1.27,
Apache::Request 1.0 and MaxRequestPerChild > 0.

My recipe to reproduce the SEGV currently is: Set MaxRequestPerChild
to 1 and request a static image.

Unless the problem is fixed before 5.8.0 comes out (i.e.~Thursday), I
fear we must document the fact:

--- perl-5.7.3@17527/pod/perldelta.pod~	Sun Jul 14 02:18:36 2002
+++ perl-5.7.3@17527/pod/perldelta.pod	Sun Jul 14 15:34:54 2002
@@ -3133,6 +3133,10 @@
 
 Use mod_perl 1.27 or higher.
 
+=head2 mod_perl 1.27 sometimes produces a segmentation fault
+
+Setting MaxRequestsPerChild to 0 seems to work around the problem.
+
 =head2 lib/ftmp-security tests warn 'system possibly insecure'
 
 Don't panic.  Read the 'make test' section of INSTALL instead.



Jim, in any case it would be great if you could release a new
Apache::Request with the two fixes that Doug has posted to the
list[1], so that people need not fall into the two already fixed
traps.--Thanks!


-- 
andreas

[1] http://mathforum.org/epigone/modperl/zhoolamgheld and
http://mathforum.org/epigone/modperl/glongsnaysimp

Re: Another SEGV perl 5.8.0-RC2 apache 1.3.26 mod_perl 1.27

Posted by "Andreas J. Koenig" <an...@anima.de>.
>>>>> On Sun, 30 Jun 2002 15:30:18 -0700 (PDT), Doug MacEachern <do...@covalent.net> said:

 >> #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

  > hmm, looks like double free of SvPVX.  if you could in gdb:
  > (gdb) up 3
  > (gdb) print *sv
  > (gdb) print *(XPV*)sv->sv_any

(gdb) up 3
#3  0x8197fa2 in Perl_sv_clear (my_perl=0x82fcaa8, sv=0x86ed170) at sv.c:5049
5049                Safefree(SvPVX(sv));
(gdb) print *sv
$1 = {sv_any = 0x8638d10, sv_refcnt = 0, sv_flags = 4194307}
(gdb) print *(XPV*)sv->sv_any
$2 = {xpv_pv = 0x82fd188 "", xpv_cur = 0, xpv_len = 140741932}




-- 
andreas