Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 35545
Status: rejected
Priority: 0/
Queue: Moose

People
Owner: Nobody in particular
Requestors: eloy [...] kofeina.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: perl core dumps with Moose and threads
Date: Wed, 30 Apr 2008 14:14:22 +0200
To: bug-Moose [...] rt.cpan.org
From: Krzysztof Krzyżaniak <eloy [...] kofeina.net>
please take a look at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=476579 Moose can't be used with threads: eloy@jumon:~/subversion/pkg-perl/trunk/build-area$ perl -ale 'use threads; package P; use Moose; has "a" => isa=>"Str | Show quoted text
quote> Num"; package main; my $thr = threads->create(sub { });
$thr->join(); Show quoted text
quote> '
*** glibc detected *** perl: double free or corruption (!prev): 0x0872bb38 *** ======= Backtrace: ========= /lib/i686/cmov/libc.so.6[0xb7e588f5] /lib/i686/cmov/libc.so.6(cfree+0x90)[0xb7e5c360] perl(Perl_pregfree+0x3e)[0x809eb7e] perl(perl_destruct+0xcf1)[0x806b661] /usr/lib/perl/5.8/auto/threads/threads.so[0xb7f9158c] /usr/lib/perl/5.8/auto/threads/threads.so(Perl_ithread_join+0x219)[0xb7f91819] /usr/lib/perl/5.8/auto/threads/threads.so(XS_threads_join+0x7c)[0xb7f9197c] perl(Perl_pp_entersub+0x313)[0x80c0923] perl(Perl_runops_standard+0x1b)[0x80bf2fb] perl(perl_run+0x2db)[0x806721b] perl(main+0x112)[0x8063752] /lib/i686/cmov/libc.so.6(__libc_start_main+0xe0)[0xb7e03450] perl[0x80635d1] ======= Memory map: ======== 08048000-0814a000 r-xp 00000000 08:01 1966497 /usr/bin/perl 0814a000-0814e000 rw-p 00101000 08:01 1966497 /usr/bin/perl 0814e000-0873d000 rw-p 0814e000 00:00 0 [heap] b7100000-b7121000 rw-p b7100000 00:00 0 b7121000-b7200000 ---p b7121000 00:00 0 b7263000-b726f000 r-xp 00000000 08:01 1097906 /lib/libgcc_s.so.1 b726f000-b7270000 rw-p 0000b000 08:01 1097906 /lib/libgcc_s.so.1 b7288000-b7289000 ---p b7288000 00:00 0 b7289000-b7aaa000 rw-p b7289000 00:00 0 b7aaa000-b7ab1000 r--s 00000000 08:01 1966831 /usr/lib/gconv/gconv-modules.cache b7ab1000-b7ab6000 r-xp 00000000 08:01 5095431 /usr/lib/perl5/auto/Class/C3/XS/XS.so b7ab6000-b7ab7000 rw-p 00004000 08:01 5095431 /usr/lib/perl5/auto/Class/C3/XS/XS.so b7ab7000-b7ad8000 rw-p b7ab7000 00:00 0 b7ad8000-b7bba000 r--p 00139000 08:01 1982561 /usr/lib/locale/locale-archive b7bba000-b7dba000 r--p 00000000 08:01 1982561 /usr/lib/locale/locale-archive b7dba000-b7dbb000 rw-p b7dba000 00:00 0 b7dbb000-b7dc4000 r-xp 00000000 08:01 1098233 /lib/i686/cmov/libcrypt-2.7.so b7dc4000-b7dc6000 rw-p 00008000 08:01 1098233 /lib/i686/cmov/libcrypt-2.7.so b7dc6000-b7ded000 rw-p b7dc6000 00:00 0 b7ded000-b7f35000 r-xp 00000000 08:01 1098223 /lib/i686/cmov/libc-2.7.so b7f35000-b7f36000 r--p 00148000 08:01 1098223 /lib/i686/cmov/libc-2.7.so b7f36000-b7f38000 rw-p 00149000 08:01 1098223 /lib/i686/cmov/libc-2.7.so b7f38000-b7f3b000 rw-p b7f38000 00:00 0 b7f3b000-b7f4f000 r-xp 00000000 08:01 1098463 /lib/i686/cmov/libpthread-2.7.so b7f4f000-b7f51000 rw-p 00013000 08:01 1098463 /lib/i686/cmov/libpthread-2.7.so b7f51000-b7f54000 rw-p b7f51000 00:00 0 b7f54000-b7f77000 r-xp 00000000 08:01 1098241 /lib/i686/cmov/libm-2.7.so b7f77000-b7f79000 rw-p 00023000 08:01 1098241 /lib/i686/cmov/libm-2.7.so b7f79000-b7f7b000 r-xp 00000000 08:01 1098238 /lib/i686/cmov/libdl-2.7.so b7f7b000-b7f7d000 rw-p 00001000 08:01 1098238 /lib/i686/cmov/libdl-2.7.so b7f7e000-b7f80000 r-xp 00000000 08:01 1294354 /usr/lib/perl5/auto/Class/MOP/MOP.so b7f80000-b7f81000 rw-p 00001000 08:01 1294354 /usr/lib/perl5/auto/Class/MOP/MOP.so b7f81000-b7f83000 r-xp 00000000 08:01 6062106 /usr/lib/perl5/auto/Sub/Name/Name.so b7f83000-b7f84000 rw-p 00001000 08:01 6062106 /usr/lib/perl5/auto/Sub/Name/Name.so b7f84000-b7f8d000 r-xp 00000000 08:01 5849216 /usr/lib/perl/5.8.8/auto/List/Util/Util.so b7f8d000-b7f8e000 rw-p 00008000 08:01 5849216 /usr/lib/perl/5.8.8/auto/List/Util/Util.so b7f8e000-b7f94000 r-xp 00000000 08:01 4751662 /usr/lib/perl/5.8.8/auto/threads/threads.so b7f94000-b7f95000 rw-p 00005000 08:01 4751662 /usr/lib/perl/5.8.8/auto/threads/threads.so b7f95000-b7f97000 rw-p b7f95000 00:00 0 b7f97000-b7fb1000 r-xp 00000000 08:01 1097743 /lib/ld-2.7.so b7fb1000-b7fb3000 rw-p 00019000 08:01 1097743 /lib/ld-2.7.so bf85b000-bf870000 rw-p bffeb000 00:00 0 [stack] ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso] zsh: abort perl -ale eloy -- -------e-l-o-y----------------------------e-l-o-y-@-k-o-f-e-i-n-a-.-n-e-t------ jak to dobrze, ¿e s± oceany - bez nich by³oby jeszcze smutniej
Can you check if http://code2.0beta.co.uk/moose/svn/Moose/trunk fixes it? There is an attempt at a workaround in there, but I can't reproduce
I reproduced this bug with 5.8.8, but it doesn't occur with 5.10.0. I'm inclined to chalk this up to a bug in the Perl core.
mst suggests using MooseX::Types instead of string type constraints.
This is indeed a perl bug that got resolved in 2007 by commit 607905347eb1bbe08eb76ed3e8e9e27622ad97ed