develooper Front page | perl.perl5.porters | Postings from June 2008

Re: [perl #55658] Re: panic: free from wrong pool with latest perl-5.10.0-RC2 release, FC-6, gcc-4.1.2(RedHat)

Thread Previous | Thread Next
From:
Jason Vas Dias
Date:
June 13, 2008 17:15
Subject:
Re: [perl #55658] Re: panic: free from wrong pool with latest perl-5.10.0-RC2 release, FC-6, gcc-4.1.2(RedHat)
Message ID:
200806131438.32244.jvdias@research.att.com
Here is a gdb backtrace :

$ gdb /usr/bin/perl
GNU gdb 6.8.50.20080602-cvs
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-pc-linux-gnu --target="...
(gdb) run -I. -e 'use t;' >/dev/null
Starting program: /usr/bin/perl -I. -e 'use t;'
[Thread debugging using libthread_db enabled]
*** glibc detected *** /usr/bin/perl: free(): invalid pointer: 0x000000000063be18 ***
======= Backtrace: =========
/lib/libc.so.6[0x7f18a5f3268e]
/lib/libc.so.6[0x7f18a5f33a22]
/lib/libc.so.6(cfree+0xb4)[0x7f18a5f340d8]
/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_safesysfree+0xe)[0x7f18a6f7a4f3]
/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_sv_clear+0x6d1)[0x7f18a6fa88ce]
/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_sv_free2+0x5b)[0x7f18a6fa894c]
/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_sv_free+0xc6)[0x7f18a6fa8a45]
/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_pp_iter+0x4c0)[0x7f18a6f9a98e]
/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_runops_standard+0x21)[0x7f18a6f96059]
/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_call_sv+0x36b)[0x7f18a6f9101e]
/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_call_list+0x1f1)[0x7f18a6f913e6]
/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so[0x7f18a6f4e438]
/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_newATTRSUB+0xbe6)[0x7f18a6f59475]
/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_utilize+0x32a)[0x7f18a6f58167]
/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_yyparse+0xef6)[0x7f18a6f4c04f]
/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so[0x7f18a6f93b6d]
/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(perl_parse+0x3c6)[0x7f18a6f9406f]
/usr/bin/perl(main+0xb0)[0x400c98]
/lib/libc.so.6(__libc_start_main+0x17b)[0x7f18a5ee1443]
/usr/bin/perl[0x400b59]
======= Memory map: ========
00400000-00401000 r-xp 00000000 08:06 981195                             /usr/bin/perl
00601000-00602000 rw-p 00001000 08:06 981195                             /usr/bin/perl
00602000-00644000 rw-p 00602000 00:00 0                                  [heap]
7f18a0000000-7f18a0021000 rw-p 7f18a0000000 00:00 0
7f18a0021000-7f18a4000000 ---p 7f18a0021000 00:00 0
7f18a5cb6000-7f18a5cc3000 r-xp 00000000 08:06 182882                     /usr/lib64/gcc/x86_64-pc-linux-gnu/4.2.4/libgcc_s.so.1
7f18a5cc3000-7f18a5ec2000 ---p 0000d000 08:06 182882                     /usr/lib64/gcc/x86_64-pc-linux-gnu/4.2.4/libgcc_s.so.1
7f18a5ec2000-7f18a5ec3000 rw-p 0000c000 08:06 182882                     /usr/lib64/gcc/x86_64-pc-linux-gnu/4.2.4/libgcc_s.so.1
7f18a5ec3000-7f18a6001000 r-xp 00000000 08:06 51171                      /lib64/libc.so-2.8.so
7f18a6001000-7f18a6200000 ---p 0013e000 08:06 51171                      /lib64/libc.so-2.8.so
7f18a6200000-7f18a6204000 r--p 0013d000 08:06 51171                      /lib64/libc.so-2.8.so
7f18a6204000-7f18a6205000 rw-p 00141000 08:06 51171                      /lib64/libc.so-2.8.so
7f18a6205000-7f18a620a000 rw-p 7f18a6205000 00:00 0
7f18a620a000-7f18a6220000 r-xp 00000000 08:06 51155                      /lib64/libpthread.so-2.8.so
7f18a6220000-7f18a641f000 ---p 00016000 08:06 51155                      /lib64/libpthread.so-2.8.so
7f18a641f000-7f18a6420000 r--p 00015000 08:06 51155                      /lib64/libpthread.so-2.8.so
7f18a6420000-7f18a6421000 rw-p 00016000 08:06 51155                      /lib64/libpthread.so-2.8.so
7f18a6421000-7f18a6425000 rw-p 7f18a6421000 00:00 0
7f18a6425000-7f18a6427000 r-xp 00000000 08:06 51170                      /lib64/libutil.so-2.8.so
7f18a6427000-7f18a6626000 ---p 00002000 08:06 51170                      /lib64/libutil.so-2.8.so
7f18a6626000-7f18a6627000 r--p 00001000 08:06 51170                      /lib64/libutil.so-2.8.so
7f18a6627000-7f18a6628000 rw-p 00002000 08:06 51170                      /lib64/libutil.so-2.8.so
7f18a6628000-7f18a6630000 r-xp 00000000 08:06 50101                      /lib64/libcrypt-2.8.90.so.1
7f18a6630000-7f18a682f000 ---p 00008000 08:06 50101                      /lib64/libcrypt-2.8.90.so.1
7f18a682f000-7f18a6830000 r--p 00007000 08:06 50101                      /lib64/libcrypt-2.8.90.so.1
7f18a6830000-7f18a6831000 rw-p 00008000 08:06 50101
Program received signal SIGABRT, Aborted.
0x00007f18a5ef3fac in raise () from /lib/libc.so.6
(gdb) where
#0  0x00007f18a5ef3fac in raise () from /lib/libc.so.6
#1  0x00007f18a5ef528c in abort () from /lib/libc.so.6
#2  0x00007f18a5f2d94c in __libc_message () from /lib/libc.so.6
#3  0x00007f18a5f3268e in malloc_printerr () from /lib/libc.so.6
#4  0x00007f18a5f33a22 in _int_free () from /lib/libc.so.6
#5  0x00007f18a5f340d8 in free () from /lib/libc.so.6
#6  0x00007f18a6f7a4f3 in Perl_safesysfree (where=0x1c25) at util.c:250
#7  0x00007f18a6fa88ce in Perl_sv_clear (my_perl=0x602010, sv=0x62c610) at sv.c:5278
#8  0x00007f18a6fa894c in Perl_sv_free2 (my_perl=0x602010, sv=0x1c25) at sv.c:5366
#9  0x00007f18a6fa8a45 in Perl_sv_free (my_perl=0x602010, sv=0x1c25) at sv.c:5345
#10 0x00007f18a6f9a98e in Perl_pp_iter (my_perl=0x602010) at pp_hot.c:2007
#11 0x00007f18a6f96059 in Perl_runops_standard (my_perl=0x602010) at run.c:38
#12 0x00007f18a6f9101e in Perl_call_sv (my_perl=0x602010, sv=0x62bd40, flags=6) at perl.c:2646
#13 0x00007f18a6f913e6 in Perl_call_list (my_perl=0x1c25, oldscope=2, paramList=0x62be30) at perl.c:5133
#14 0x00007f18a6f4e438 in S_process_special_blocks (my_perl=0x602010, fullname=<value optimized out>, gv=0x62be00, cv=0x62bd40) at op.c:5631
#15 0x00007f18a6f59475 in Perl_newATTRSUB (my_perl=0x602010, floor=27, o=<value optimized out>, proto=<value optimized out>, attrs=0x0, block=0x62e880)
    at op.c:5604
#16 0x00007f18a6f58167 in Perl_utilize (my_perl=0x602010, aver=1, floor=27, version=0x0, idop=0x62e420, arg=0x0) at op.c:3757
#17 0x00007f18a6f4c04f in Perl_yyparse (my_perl=0x602010) at perly.y:654
#18 0x00007f18a6f93b6d in S_parse_body (my_perl=0x602010, env=0x0, xsinit=0x400cce <xs_init>) at perl.c:2230
#19 0x00007f18a6f9406f in perl_parse (my_perl=0x602010, xsinit=0x400cce <xs_init>, argc=4, argv=0x7fffaf463118, env=0x0) at perl.c:1650
#20 0x0000000000400c98 in main (argc=4, argv=0x7fffaf463118, env=0x7fffaf463140) at perlmain.c:111
(gdb)
       
> Re: [perl #55658] Re: panic: free from wrong pool with latest
> perl-5.10.0-RC2 release, FC-6, gcc-4.1.2(RedHat) From:
> Jason Vas Dias <jvdias@research.att.com>  (at&t labs research inc.)
>   To:
> perlbug-followup@perl.org
>   Date:
> Today 14:28:44
>    
> Many thanks Nick!
> I've now rsync'd and built perl-5.10.x on i386 glibc-2.5 gcc-4.1.2
> Linux-2.6.22 + perl-5.10.x for x86_64 glibc-2.8+ gcc-4.2.4 Linux 2.6.26
> with these results :
>
> When lines 54-58 of the attached 't.pm' perl.module are like:
>  --- t.pm line 54:
>             {
>                 foreach $arg ($varg, $pfx.'_'.$sfx,$pfx.'-'.$sfx)
>                 {
>                     foreach $varg ( "\L$arg\E", "\U$arg\E" )
>                     {
>  ---
>
> Under the perl-5.10.x of June 1st, I get this crash on x86_64, and the
> 'free from wrong pool' error under the perl-5.10.x of June 11th on i386:
>
> $ perl -I. -e 'use t;'
> <debug>
> alias: t : t
> </debug>
> <debug>
> alias: T : t
> </debug>
> <debug>
> env? :APP_T
> </debug>
> <debug>
> env: appt : t
> </debug>
> <debug>
> env: APPT : t
> </debug>
> <debug>
> varg: app_t
> </debug>
> <debug>
> alias: app_t : t
> </debug>
> <debug>
> varg: APP_T
> </debug>
> <debug>
> alias: APP_T : t
> </debug>
> <debug>
> varg: app_t
> </debug>
> <debug>
> varg: APP_T
> </debug>
> *** glibc detected *** perl: free(): invalid pointer: 0x000000000063dc08
> *** ======= Backtrace: =========
> /lib/libc.so.6[0x7ff4ded1468e]
> /lib/libc.so.6[0x7ff4ded15a22]
> /lib/libc.so.6(cfree+0xb4)[0x7ff4ded160d8]
> /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_safesy
>sfree+0xe)[0x7ff4dfd5c4f3]
> /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_sv_cle
>ar+0x6d1)[0x7ff4dfd8a8ce]
> /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_sv_fre
>e2+0x5b)[0x7ff4dfd8a94c]
> /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_sv_fre
>e+0xc6)[0x7ff4dfd8aa45]
> /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_pp_ite
>r+0x4c0)[0x7ff4dfd7c98e]
> /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_runops
>_standard+0x21)[0x7ff4dfd78059]
> /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_call_s
>v+0x36b)[0x7ff4dfd7301e]
> /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_call_l
>ist+0x1f1)[0x7ff4dfd733e6]
> /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so[0x7ff4dfd30
>438]
> /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_newATT
>RSUB+0xbe6)[0x7ff4dfd3b475]
> /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_utiliz
>e+0x32a)[0x7ff4dfd3a167]
> /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(Perl_yypars
>e+0xef6)[0x7ff4dfd2e04f]
> /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so[0x7ff4dfd75
>b6d]
> /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so(perl_parse+
>0x3c6)[0x7ff4dfd7606f] perl(main+0xb0)[0x400c98]
> /lib/libc.so.6(__libc_start_main+0x17b)[0x7ff4decc3443]
> perl[0x400b59]
> ======= Memory map: ========
> 00400000-00401000 r-xp 00000000 08:06 981195                            
> /usr/bin/perl 00601000-00602000 rw-p 00001000 08:06 981195                
>             /usr/bin/perl 00602000-00644000 rw-p 00602000 00:00 0          
>                        [heap] 7ff4d8000000-7ff4d8021000 rw-p 7ff4d8000000
> 00:00 0
> 7ff4d8021000-7ff4dc000000 ---p 7ff4d8021000 00:00 0
> 7ff4dea98000-7ff4deaa5000 r-xp 00000000 08:06 182882                    
> /usr/lib64/gcc/x86_64-pc-linux-gnu/4.2.4/libgcc_s.so.1
> 7ff4deaa5000-7ff4deca4000 ---p 0000d000 08:06 182882                    
> /usr/lib64/gcc/x86_64-pc-linux-gnu/4.2.4/libgcc_s.so.1
> 7ff4deca4000-7ff4deca5000 rw-p 0000c000 08:06 182882                    
> /usr/lib64/gcc/x86_64-pc-linux-gnu/4.2.4/libgcc_s.so.1
> 7ff4deca5000-7ff4dede3000 r-xp 00000000 08:06 51171                    
>  /lib64/libc.so-2.8.so 7ff4dede3000-7ff4defe2000 ---p 0013e000 08:06 51171
>                      /lib64/libc.so-2.8.so 7ff4defe2000-7ff4defe6000 r--p
> 0013d000 08:06 51171                      /lib64/libc.so-2.8.so
> 7ff4defe6000-7ff4defe7000 rw-p 00141000 08:06 51171                    
>  /lib64/libc.so-2.8.so 7ff4defe7000-7ff4defec000 rw-p 7ff4defe7000 00:00 0
> 7ff4defec000-7ff4df002000 r-xp 00000000 08:06 51155                    
>  /lib64/libpthread.so-2.8.so 7ff4df002000-7ff4df201000 ---p 00016000 08:06
> 51155                      /lib64/libpthread.so-2.8.so
> 7ff4df201000-7ff4df202000 r--p 00015000 08:06 51155                    
>  /lib64/libpthread.so-2.8.so 7ff4df202000-7ff4df203000 rw-p 00016000 08:06
> 51155                      /lib64/libpthread.so-2.8.so
> 7ff4df203000-7ff4df207000 rw-p 7ff4df203000 00:00 0
> 7ff4df207000-7ff4df209000 r-xp 00000000 08:06 51170                    
>  /lib64/libutil.so-2.8.so 7ff4df209000-7ff4df408000 ---p 00002000 08:06
> 51170                      /lib64/libutil.so-2.8.so
> 7ff4df408000-7ff4df409000 r--p 00001000 08:06 51170                    
>  /lib64/libutil.so-2.8.so 7ff4df409000-7ff4df40a000 rw-p 00002000 08:06
> 51170                      /lib64/libutil.so-2.8.so
> 7ff4df40a000-7ff4df412000 r-xp 00000000 08:06 50101                    
>  /lib64/libcrypt-2.8.90.so.1 7ff4df412000-7ff4df611000 ---p 00008000 08:06
> 50101                      /lib64/libcrypt-2.8.90.so.1
> 7ff4df611000-7ff4df612000 r--p 00007000 08:06 50101                    
>  /lib64/libcrypt-2.8.90.so.1 7ff4df612000-7ff4df613000 rw-p 00008000 08:06
> 50101                      /lib64/libcrypt-2.8.90.so.1
> 7ff4df613000-7ff4df641000 rw-p 7ff4df613000 00:00 0
> 7ff4df641000-7ff4df6bf000 r-xp 00000000 08:06 51151                    
>  /lib64/libm.so-2.8.so 7ff4df6bf000-7ff4df8be000 ---p 0007e000 08:06 51151
>                      /lib64/libm.so-2.8.so 7ff4df8be000-7ff4df8bf000 r--p
> 0007d000 08:06 51151                      /lib64/libm.so-2.8.so
> 7ff4df8bf000-7ff4df8c0000 rw-p 0007e000 08:06 51151                    
>  /lib64/libm.so-2.8.so 7ff4df8c0000-7ff4df8c2000 r-xp 00000000 08:06 51152
>                      /lib64/libdl.so-2.8.so 7ff4df8c2000-7ff4dfac1000 ---p
> 00002000 08:06 51152                      /lib64/libdl.so-2.8.so
> 7ff4dfac1000-7ff4dfac2000 r--p 00001000 08:06 51152                    
>  /lib64/libdl.so-2.8.so 7ff4dfac2000-7ff4dfac3000 rw-p 00002000 08:06 51152
>                      /lib64/libdl.so-2.8.so 7ff4dfac3000-7ff4dfad7000 r-xp
> 00000000 08:06 51166                      /lib64/libnsl.so-2.8.so
> 7ff4dfad7000-7ff4dfcd6000 ---p 00014000 08:06 51166                    
>  /lib64/libnsl.so-2.8.so 7ff4dfcd6000-7ff4dfcd7000 r--p 00013000 08:06
> 51166                      /lib64/libnsl.so-2.8.so
> 7ff4dfcd7000-7ff4dfcd8000 rw-p 00014000 08:06 51166                    
>  /lib64/libnsl.so-2.8.so 7ff4dfcd8000-7ff4dfcda000 rw-p 7ff4dfcd8000 00:00
> 0
> 7ff4dfcda000-7ff4dfe22000 r-xp 00000000 08:06 408994                    
> /usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so
> 7ff4dfe22000-7ff4e0021000 ---p 00148000 08:06 408994                    
> /usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so
> 7ff4e0021000-7ff4e002a000 rw-p 00147000 08:06 408994                    
> /usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi/CORE/libperl.so
> 7ff4e002a000-7ff4e0046000 r-xp 00000000 08:06 770735                    
> /lib64/ld-2.8.90.so 7ff4e0217000-7ff4e021c000 rw-p 7ff4e0217000 00:00 0
> 7ff4e0243000-7ff4e0245000 rw-p 7ff4e0243000 00:00 0
> 7ff4e0245000-7ff4e0246000 r--p 0001b000 08:06 770735                    
> /lib64/ld-2.8.90.so 7ff4e0246000-7ff4e0247000 rw-p 0001c000 08:06 770735  
>                   /lib64/ld-2.8.90.so 7fffe8231000-7fffe8246000 rw-p
> 7ffffffea000 00:00 0                      [stack] 7fffe83fe000-7fffe83ff000
> r-xp 7fffe83fe000 00:00 0                      [vdso]
> ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                
>  [vsyscall] Abort
>
> Changing lines 54-58 of t.pm to:
>
> --- t.pm line 54:
>             {
>                 foreach $arg ($varg, $pfx.'_'.$sfx,$pfx.'-'.$sfx)
>                 {
>                    my $varg;
>                    foreach $varg ( "\L$arg\E", "\U$arg\E" )
> ---
>
> avoids the crash. I did actually want to get the value of $varg in the
> first foreach!
>
> Yes, this is easy to work around, but I don't think the latest maintenance
> release of perl-5.10 should be crashing in this way.
>
> Perl 5.8.x suffers a core-dump in this situation on Linux (Gentoo 2008-Q2,
> RHEL-5.1, Fedora 6-9) - we don't see the 'free from wrong pool' message -
> you need to build 5.10.x for that.
>
> Perl 5.8.4 for solaris has no problems at all with either version.
>
> Perl 5.8.0 on HP-UX also has no problems with either version .
>
> Sometimes taking one step forward results in taking two steps back!
>
> Regards,
> Jason Vas Dias <jvdias@research.att.com>
>
> On Thursday 12 June 2008 08:31:16 Nicholas Clark via RT wrote:
> > On Thu, Jun 12, 2008 at 01:25:44AM -0700, Jason Vas Dias wrote:
> > > The PERL release I downloaded was that for 'PERL Source' on CPAN :
> > >
> > > http://search.cpan.org/~rgarcia/perl-5.10.0/
> > >
> > > Is this the wrong release to build for the latest perl-5.10.0 tested
> > > maintenance patches ?
> >
> > That's the 5.10.0 release distribution.
> >
> > > If not, please send a link to SVN / CVS RSYNC where I can download.
> > > What happened to 'perl-maint' rsync target ?
> >
> > The rsync URL for the 5.10.x branch (that will become 5.10.1) is
> >
> > rsync://ftp.linux.activestate.com/perl-5.10.x/
> >
> > Nicholas Clark
>
> t.pm

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About