Test::More's tests of its recursive testing functions (is_deeply() and the
eq_* functions) with threads has had an annoying intermittent failure for a
while.  I've never been able to reproduce it because in the past it has only
occurred on machine types I don't have access to.  But I noticed a CPAN Tester
report a failure with the perl 5.8.6 that ships with OS X, so I gave that a try.

After about 100 runs I got it to fail completely and I can get it to throw
non-fatal malloc double free warnings every few runs.

perl5.8.6(2325,0xa000d000) malloc: ***  Deallocation of a pointer not
malloced: 0x375310; This could be a double free(), or free() called with the
middle of an allocated block; Try setting environment variable MallocHelp to
see tools to help debug

This all occurs after the script is done and the Test::Builder END block is
done.  With MallocScribble=1 set this produces a core dump.

- MallocScribble to detect writing on free blocks and missing initializers:
  0x55 is written upon free and 0xaa is written on allocation

The backtrace is here:

$ gdb perl5.8.6 core.2304
GNU gdb 6.3.50-20050815 (Apple version gdb-696) (Sat Oct 20 18:16:54 GMT 2007)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin"...
warning: --arch option not supported in this gdb.
Reading symbols for shared libraries .... done

Core was generated by `/usr/bin/perl5.8.6'.
Reading symbols for shared libraries . done
Reading symbols for shared libraries ...... done
#0  0x966338cb in Perl_op_free ()
(gdb) bt
#0  0x966338cb in Perl_op_free ()
#1  0x966352f5 in Perl_cv_undef ()
#2  0x9668100a in Perl_sv_clear ()
#3  0x96681532 in Perl_sv_free ()
#4  0x96674ef0 in Perl_av_undef ()
#5  0x96681089 in Perl_sv_clear ()
#6  0x96681532 in Perl_sv_free ()
#7  0x96649c9f in Perl_pad_undef ()
#8  0x96635223 in Perl_cv_undef ()
#9  0x9668100a in Perl_sv_clear ()
#10 0x96681532 in Perl_sv_free ()
#11 0x9667fb6c in Perl_sv_clean_all ()
#12 0x9660a9a1 in perl_destruct ()
#13 0x0000207c in ?? ()
#14 0x00001f56 in ?? ()
#15 0x00001e71 in ?? ()


Does anyone recognize this problem?  It seems to happen mostly on 5.8.5 and
5.8.6 though I have some reports from 5.8.8.


-- 
If at first you don't succeed--you fail.
        -- "Portal" demo

Reply via email to