Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the devel-nytprof CPAN distribution.

Report information
The Basics
Id: 40439
Status: resolved
Priority: 0/
Queue: devel-nytprof

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

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



Subject: Reliable segfault on Intel and PPC platforms with perl 5.8.6 and perl 5.8.8.
Download (untitled) / with headers
text/plain 6.2k
The following will reliably cause NYTProf to segfault, when run against the latest Catalyst development release (http://search.cpan.org/CPAN/authors/id/M/MR/MRAMBERG/Catalyst-Runtime-5.8000_03.tar.gz): perl -d:NYTProf -MCatalyst::Test -e'1' perl -V output attached below for both perls I have tried: Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=linux, osvers=2.6.24.4, archname=i486-linux-gnu-thread-multi uname='linux ninsei 2.6.24.4 #1 smp preempt fri apr 18 15:36:09 pdt 2008 i686 gnulinux ' config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=i486-linux-gnu -Dprefix=/usr -Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.8.8 -Dsitearch=/usr/local/lib/perl/5.8.8 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm -Duseshrplib -Dlibperl=libperl.so.5.8.8 -Dd_dosuid -des' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='4.1.2 20061115 (prerelease) (Debian 4.1.1-21)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt perllibs=-ldl -lm -lpthread -lc -lcrypt libc=/lib/libc-2.3.6.so, so=so, useshrplib=true, libperl=libperl.so.5.8.8 gnulibc_version='2.3.6' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP THREADS_HAVE_PIDS USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Built under linux Compiled at Apr 25 2008 20:23:05 %ENV: PERL5LIB="/home/bobtfish/perl5/lib/perl5:/home/bobtfish/perl5/lib/perl5/i486-linux-gnu-thread-multi" PERL_MM_OPT="INSTALL_BASE=/home/bobtfish/perl5" @INC: /home/bobtfish/perl5/lib/perl5/i486-linux-gnu-thread-multi /home/bobtfish/perl5/lib/perl5 /home/bobtfish/perl5/lib/perl5/i486-linux-gnu-thread-multi /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl . Summary of my perl5 (revision 5 version 8 subversion 6) configuration: Platform: osname=darwin, osvers=8.0, archname=darwin-thread-multi-2level uname='darwin b45.apple.com 8.0 darwin kernel version 8.8.4: sun oct 29 15:30:27 pst 2006; root:xnu-792.16.4.obj~1release_ppc power macintosh powerpc ' config_args='-ds -e -Dprefix=/usr -Dccflags=-g -pipe -Dldflags=-Dman3ext=3pm -Duseithreads -Duseshrplib' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include', optimize='-Os', cppflags='-no-cpp-precomp -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include' ccversion='', gccversion='3.3 20030304 (Apple Computer, Inc. build 1819)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags ='-L/usr/local/lib' libpth=/usr/local/lib /usr/lib libs=-ldbm -ldl -lm -lc perllibs=-ldl -lm -lc libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true, libperl=libperl.dylib gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-bundle -undefined dynamic_lookup -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT Locally applied patches: 23953 - fix for File::Path::rmtree CAN-2004-0452 security issue 33990 - fix for setuid perl security issues fix for regcomp CVE-2007-5116 security vulnerability SPRINTF0 - fixes for sprintf formatting issues - CVE-2005-3962 Built under darwin Compiled at Nov 26 2007 09:10:07 %ENV: PERL5LIB="/sw/lib/perl5:/sw/lib/perl5/darwin" @INC: /sw/lib/perl5/5.8.6/darwin-thread-multi-2level /sw/lib/perl5/5.8.6 /sw/lib/perl5 /sw/lib/perl5/darwin /System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6 /Library/Perl/5.8.6/darwin-thread-multi-2level /Library/Perl/5.8.6 /Library/Perl /Network/Library/Perl/5.8.6/darwin-thread-multi-2level /Network/Library/Perl/5.8.6 /Network/Library/Perl /System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.6 /Library/Perl/5.8.1 .
Subject: Re: [rt.cpan.org #40439] Reliable segfault on Intel and PPC platforms with perl 5.8.6 and perl 5.8.8.
Date: Tue, 28 Oct 2008 15:34:36 +0000
To: Tomas Doran via RT <bug-devel-nytprof [...] rt.cpan.org>
From: Tim Bunce <Tim.Bunce [...] pobox.com>
Download (untitled) / with headers
text/plain 231b
Please try with the latest trunk version. If it still core dumps please include a stack trace[*] Thanks! Tim. [*] Would be especially helpful if the perl you used was built with debugging enabled, or at least -g in the cc flags.
Download (untitled) / with headers
text/plain 167b
I can confirm that this happens with trunk. Currently downloading perl 5.8.8 source, which I'll compile with debugging and attempt to replicate and get a stack trace.
Any progress? Stack trace? etc
Subject: Re: [rt.cpan.org #40439] Reliable segfault on Intel and PPC platforms with perl 5.8.6 and perl 5.8.8.
Date: Sun, 14 Dec 2008 00:58:47 +0000
To: bug-devel-nytprof [...] rt.cpan.org
From: Tomas Doran <bobtfish [...] bobtfish.net>
On 8 Dec 2008, at 16:48, Tim_Bunce via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=40439 > > > Any progress? Stack trace? etc
Sorry about the delay.. I built a perl with -g, and re-ran under gdb. I still get the bus error, but gdb isn't telling me anything all that helpful: tdpb:~/Cat5.80 root# gdb /usr/local/bin/perl GNU gdb 6.3.50-20050815 (Apple version gdb-477) (Sun Apr 30 20:06:22 GMT 2006) 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 "powerpc-apple-darwin"...Reading symbols for shared libraries .. done (gdb) run -Ilib -d:NYTProf -MCatalyst::Test -e"1" Starting program: /usr/local/bin/perl -Ilib -d:NYTProf - MCatalyst::Test -e"1" Reading symbols for shared libraries . done Reading symbols for shared libraries ... done Unable to determine line number in -e. Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Unable to determine line number in -e. Unable to determine line number in -e. Unable to determine line number in -e. Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000000 0x900031c8 in strlen () Are there other flags I should be building perl with, and is a -Dt trace likely to be any help (I can upload one somewhere if that would be useful). Cheers Tomas
Subject: Re: [rt.cpan.org #40439] Reliable segfault on Intel and PPC platforms with perl 5.8.6 and perl 5.8.8.
Date: Sun, 14 Dec 2008 01:16:26 +0000
To: bug-devel-nytprof [...] rt.cpan.org
From: Tomas Doran <bobtfish [...] bobtfish.net>
Download (untitled) / with headers
text/plain 1.7k
On 14 Dec 2008, at 00:58, Tomas Doran wrote: Show quoted text
> > On 8 Dec 2008, at 16:48, Tim_Bunce via RT wrote: >
>> <URL: http://rt.cpan.org/Ticket/Display.html?id=40439 > >> >> Any progress? Stack trace? etc
>
Hang on, it'd late and I'm being stupid.. Actually asking gcc for the backtrack when it crashes produces - #0 0x900031c8 in strlen () #1 0x000679a0 in Perl_sv_vcatpvfn (sv=0x1a78164, pat=0x416f2c "%s::% s", patlen=6, args=0xbfffe158, svargs=0x0, svmax=0, maybe_tainted=0x0) at sv.c:8895 #2 0x00065f34 in Perl_sv_vsetpvfn (sv=0x1a78164, pat=0x416f2c "%s::% s", patlen=6, args=0xbfffe158, svargs=0x0, svmax=0, maybe_tainted=0x0) at sv.c:8410 #3 0x00065c34 in Perl_sv_vsetpvf (sv=0x1a78164, pat=0x416f2c "%s::% s", args=0xbfffe158) at sv.c:8252 #4 0x00065bd4 in Perl_sv_setpvf (sv=0x1a78164, pat=0x416f2c "%s::% s") at sv.c:8234 #5 0x0040c1f4 in pp_entersub_profiler () at NYTProf.xs:2113 #6 0x001172d0 in Perl_runops_debug () at dump.c:1459 #7 0x00025468 in S_call_body (myop=0xbfffe41c, is_eval=0 '\0') at perl.c:2731 #8 0x00024e88 in Perl_call_sv (sv=0x18011bc, flags=6) at perl.c:2646 #9 0x0002b9dc in S_call_list_body (cv=0x18011bc) at perl.c:5200 #10 0x0002b408 in Perl_call_list (oldscope=1, paramList=0x180127c) at perl.c:5129 #11 0x000156e0 in Perl_newATTRSUB (floor=103, o=0x50fb60, proto=0x0, attrs=0x0, block=0x506c60) at op.c:4520 #12 0x0000f984 in Perl_utilize (aver=1, floor=103, version=0x0, idop=0x501ef0, arg=0x0) at op.c:3096 #13 0x00176fe8 in Perl_yyparse () at perly.y:423 #14 0x00023404 in S_parse_body (env=0x0, xsinit=0x3108 <xs_init>) at perl.c:2206 #15 0x00021c18 in perl_parse (my_perl=0x5000f0, xsinit=0x3108 <xs_init>, argc=5, argv=0xbffff3bc, env=0x0) at perl.c:1598 #16 0x000030a8 in main (argc=5, argv=0xbffff3bc, env=0xbffff3d4) at perlmain.c:97 Cheers t0m
Subject: Re: [rt.cpan.org #40439] Reliable segfault on Intel and PPC platforms with perl 5.8.6 and perl 5.8.8.
Date: Sun, 14 Dec 2008 00:58:47 +0000
To: bug-devel-nytprof [...] rt.cpan.org
From: Tomas Doran <bobtfish [...] bobtfish.net>
On 8 Dec 2008, at 16:48, Tim_Bunce via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=40439 > > > Any progress? Stack trace? etc
Sorry about the delay.. I built a perl with -g, and re-ran under gdb. I still get the bus error, but gdb isn't telling me anything all that helpful: tdpb:~/Cat5.80 root# gdb /usr/local/bin/perl GNU gdb 6.3.50-20050815 (Apple version gdb-477) (Sun Apr 30 20:06:22 GMT 2006) 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 "powerpc-apple-darwin"...Reading symbols for shared libraries .. done (gdb) run -Ilib -d:NYTProf -MCatalyst::Test -e"1" Starting program: /usr/local/bin/perl -Ilib -d:NYTProf - MCatalyst::Test -e"1" Reading symbols for shared libraries . done Reading symbols for shared libraries ... done Unable to determine line number in -e. Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Unable to determine line number in -e. Unable to determine line number in -e. Unable to determine line number in -e. Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000000 0x900031c8 in strlen () Are there other flags I should be building perl with, and is a -Dt trace likely to be any help (I can upload one somewhere if that would be useful). Cheers Tomas
Subject: Re: [rt.cpan.org #40439] Reliable segfault on Intel and PPC platforms with perl 5.8.6 and perl 5.8.8.
Date: Sun, 14 Dec 2008 01:16:26 +0000
To: bug-devel-nytprof [...] rt.cpan.org
From: Tomas Doran <bobtfish [...] bobtfish.net>
Download (untitled) / with headers
text/plain 1.7k
On 14 Dec 2008, at 00:58, Tomas Doran wrote: Show quoted text
> > On 8 Dec 2008, at 16:48, Tim_Bunce via RT wrote: >
>> <URL: http://rt.cpan.org/Ticket/Display.html?id=40439 > >> >> Any progress? Stack trace? etc
>
Hang on, it'd late and I'm being stupid.. Actually asking gcc for the backtrack when it crashes produces - #0 0x900031c8 in strlen () #1 0x000679a0 in Perl_sv_vcatpvfn (sv=0x1a78164, pat=0x416f2c "%s::% s", patlen=6, args=0xbfffe158, svargs=0x0, svmax=0, maybe_tainted=0x0) at sv.c:8895 #2 0x00065f34 in Perl_sv_vsetpvfn (sv=0x1a78164, pat=0x416f2c "%s::% s", patlen=6, args=0xbfffe158, svargs=0x0, svmax=0, maybe_tainted=0x0) at sv.c:8410 #3 0x00065c34 in Perl_sv_vsetpvf (sv=0x1a78164, pat=0x416f2c "%s::% s", args=0xbfffe158) at sv.c:8252 #4 0x00065bd4 in Perl_sv_setpvf (sv=0x1a78164, pat=0x416f2c "%s::% s") at sv.c:8234 #5 0x0040c1f4 in pp_entersub_profiler () at NYTProf.xs:2113 #6 0x001172d0 in Perl_runops_debug () at dump.c:1459 #7 0x00025468 in S_call_body (myop=0xbfffe41c, is_eval=0 '\0') at perl.c:2731 #8 0x00024e88 in Perl_call_sv (sv=0x18011bc, flags=6) at perl.c:2646 #9 0x0002b9dc in S_call_list_body (cv=0x18011bc) at perl.c:5200 #10 0x0002b408 in Perl_call_list (oldscope=1, paramList=0x180127c) at perl.c:5129 #11 0x000156e0 in Perl_newATTRSUB (floor=103, o=0x50fb60, proto=0x0, attrs=0x0, block=0x506c60) at op.c:4520 #12 0x0000f984 in Perl_utilize (aver=1, floor=103, version=0x0, idop=0x501ef0, arg=0x0) at op.c:3096 #13 0x00176fe8 in Perl_yyparse () at perly.y:423 #14 0x00023404 in S_parse_body (env=0x0, xsinit=0x3108 <xs_init>) at perl.c:2206 #15 0x00021c18 in perl_parse (my_perl=0x5000f0, xsinit=0x3108 <xs_init>, argc=5, argv=0xbffff3bc, env=0x0) at perl.c:1598 #16 0x000030a8 in main (argc=5, argv=0xbffff3bc, env=0xbffff3d4) at perlmain.c:97 Cheers t0m
Subject: Re: [rt.cpan.org #40439] Reliable segfault on Intel and PPC platforms with perl 5.8.6 and perl 5.8.8.
Date: Sun, 14 Dec 2008 04:03:57 +0000
To: Tomas Doran via RT <bug-devel-nytprof [...] rt.cpan.org>
From: Tim Bunce <Tim.Bunce [...] pobox.com>
Download (untitled) / with headers
text/plain 682b
On Sat, Dec 13, 2008 at 09:20:31PM -0500, Tomas Doran via RT wrote: Show quoted text
> Actually asking gcc for the backtrack when it crashes produces - > > #4 0x00065bd4 in Perl_sv_setpvf (sv=0x1a78164, pat=0x416f2c "%s::%s") at sv.c:8234 > #5 0x0040c1f4 in pp_entersub_profiler () at NYTProf.xs:2113
I've workedaround it in r652 but the underlying problem looks like a bug in Class::MOP: calling sv_dump() on the problematic cv core dumps. (Set trace level 2 to see that happen.) I'd guess that whatever code is creating the CV isn't doing a complete enough job. Looks like the CV's GV stash doesn't get named, for example. Could you pass this info back to the relevant people? Thanks. Tim.
Download (untitled) / with headers
text/plain 942b
On Sat Dec 13 23:04:11 2008, Tim.Bunce@pobox.com wrote: Show quoted text
> I've workedaround it in r652
That's awesome, thanks. Show quoted text
> but the underlying problem looks like a > bug in Class::MOP: calling sv_dump() on the problematic cv core dumps. > (Set trace level 2 to see that happen.) > > I'd guess that whatever code is creating the CV isn't doing a complete > enough job. Looks like the CV's GV stash doesn't get named, for > example.
Hmm, I'm un-convinced that this problem is in MOP - the xs component of MOP is optional, and I can confirm that: CLASS_MOP_NO_XS=1 /usr/local/bin/perl -d:NYTProf -Ilib -MCatalyst::Test -e'1' Still crashes in the same way. However this _could_ be something like Class::C3::XS or similar. Show quoted text
> Could you pass this info back to the relevant people? Thanks.
Yes, I'll start bothering them, thanks for your help. I'll leave this ticket open if that's ok with you, and close it once the real root cause is identified..
Believed resolved. Let me know (only) if it's not. Thanks.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.