Skip Menu |

This queue is for tickets about the Imager-File-JPEG CPAN distribution.

Report information
The Basics
Id: 63358
Status: resolved
Priority: 0/
Queue: Imager-File-JPEG

People
Owner: Nobody in particular
Requestors: baldmantom [...] gmail.com
Cc:
AdminCc:

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



Subject: Segfault when running t/t10jpeg.t on Mac OSX 10.6.5
Transcript of my installation session: Emerald:~/.cpan/build/Imager-File-JPEG-0.78-Nsfjak tom$ perl Makefile.PL JPEG: building independently JPEG: includes found - libraries found JPEG: Passed code check Checking if your kit is complete... Looks good Writing Makefile for Imager::File::JPEG Emerald:~/.cpan/build/Imager-File-JPEG-0.78-Nsfjak tom$ make cp JPEG.pm blib/lib/Imager/File/JPEG.pm /usr/local/bin/perl /opt/local/perl/5.12.2/lib/5.12.2/ExtUtils/xsubpp -typemap /opt/local/perl/5.12.2/lib/5.12.2/ExtUtils/typemap -typemap /opt/local/perl/5.12.2/lib/site_perl/5.12.2/darwin-thread-multi-2level/Imager/typemap JPEG.xs > JPEG.xsc && mv JPEG.xsc JPEG.c Please specify prototyping behavior for JPEG.xs (see perlxs manual) cc -c -I/opt/local/perl/5.12.2/lib/site_perl/5.12.2/darwin-thread-multi-2level/Imager/include -I/usr/local/include -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include -O3 -DVERSION=\"0.78\" -DXS_VERSION=\"0.78\" "-I/opt/local/perl/5.12.2/lib/5.12.2/darwin-thread-multi-2level/CORE" JPEG.c cc -c -I/opt/local/perl/5.12.2/lib/site_perl/5.12.2/darwin-thread-multi-2level/Imager/include -I/usr/local/include -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include -O3 -DVERSION=\"0.78\" -DXS_VERSION=\"0.78\" "-I/opt/local/perl/5.12.2/lib/5.12.2/darwin-thread-multi-2level/CORE" imjpeg.c cc -c -I/opt/local/perl/5.12.2/lib/site_perl/5.12.2/darwin-thread-multi-2level/Imager/include -I/usr/local/include -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include -O3 -DVERSION=\"0.78\" -DXS_VERSION=\"0.78\" "-I/opt/local/perl/5.12.2/lib/5.12.2/darwin-thread-multi-2level/CORE" imexif.c Running Mkbootstrap for Imager::File::JPEG () chmod 644 JPEG.bs rm -f blib/arch/auto/Imager/File/JPEG/JPEG.bundle LD_RUN_PATH="/usr/local/lib" env MACOSX_DEPLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/opt/local/lib -fstack-protector JPEG.o imjpeg.o imexif.o -o blib/arch/auto/Imager/File/JPEG/JPEG.bundle \ -L/usr/local/lib -ljpeg \ chmod 755 blib/arch/auto/Imager/File/JPEG/JPEG.bundle cp JPEG.bs blib/arch/auto/Imager/File/JPEG/JPEG.bs chmod 644 blib/arch/auto/Imager/File/JPEG/JPEG.bs Manifying blib/man3/Imager::File::JPEG.3 Emerald:~/.cpan/build/Imager-File-JPEG-0.78-Nsfjak tom$ make test PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/t00load.t .. ok t/t10jpeg.t .. Failed 94/94 subtests Test Summary Report ------------------- t/t10jpeg.t (Wstat: 11 Tests: 0 Failed: 0) Non-zero wait status: 11 Parse errors: Bad plan. You planned 94 tests but ran 0. Files=2, Tests=1, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.14 cusr 0.02 csys = 0.20 CPU) Result: FAIL Failed 1/2 test programs. 0/1 subtests failed. make: *** [test_dynamic] Error 255 Emerald:~/.cpan/build/Imager-File-JPEG-0.78-Nsfjak tom$ Here's the record of the crash in my system logs: Process: perl [8842] Path: /opt/local/perl/5.12.2/bin/perl Identifier: perl Version: ??? (???) Code Type: X86-64 (Native) Parent Process: perl [8839] Date/Time: 2010-11-26 15:57:06.542 -0500 OS Version: Mac OS X 10.6.5 (10H574) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: 0x000000000000000d, 0x0000000000000000 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 libSystem.B.dylib 0x00007fff83476708 _longjmp + 44 1 ??? 0x00000001006a50c0 0 + 4301934784 2 ??? 0x0000000100942190 0 + 4304675216 3 ??? 0x0802110200000001 0 + 577042402544451585 4 ??? 0x00000001008f6318 0 + 4304364312 5 ??? 0x00000001005e0ec7 0 + 4301131463 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000000000001 rbx: 0x0000000100827678 rcx: 0x00007fff8348c69a rdx: 0x0000000000000000 rdi: 0x00007fff5fbff468 rsi: 0x0000000000000001 rbp: 0x0000000100800000 rsp: 0x000000000000000a r8: 0x00007fff5fbfe7c0 r9: 0x0000000000000000 r10: 0x00007fff83476656 r11: 0x0000000000000246 r12: 0x000000010083b6d0 r13: 0x00000001008277f8 r14: 0x00007fff5fbff4d0 r15: 0x000000000000000a rip: 0x00007fff83476708 rfl: 0x0000000000010202 cr2: 0x00000001004700c8 Binary Images: 0x100000000 - 0x100174fef +perl ??? (???) <947F2911-A823-99DD-B29F-4DC7F19AE41F> /usr/local/bin/perl 0x10019b000 - 0x10019ffff libutil.dylib ??? (???) <E96E9D87-04CC-D7BD-2998-4E039F72C1D8> /usr/lib/libutil.dylib 0x1001d6000 - 0x1001d9fff +IO.bundle ??? (???) <829C41BF-E8E5-9313-51B4-35FC8D28DEA6> /opt/local/perl/5.12.2/lib/5.12.2/darwin-thread-multi-2level/auto/IO/IO.bundle 0x1001dc000 - 0x1001ddfff +Fcntl.bundle ??? (???) <4065BC04-383F-EEF6-43B3-066C01424D37> /opt/local/perl/5.12.2/lib/5.12.2/darwin-thread-multi-2level/auto/Fcntl/Fcntl.bundle 0x1001e1000 - 0x1001e8fff +JPEG.bundle ??? (???) <DD258B50-104D-9853-F59A-9385ED1009A7> /Users/tom/.cpan/build/Imager-File-JPEG-0.78-Nsfjak/blib/arch/auto/Imager/File/JPEG/JPEG.bundle 0x100400000 - 0x10046dfef +Imager.bundle ??? (???) <8922C54A-8A31-E6F2-2AC1-B3F4C160DE9C> /opt/local/perl/5.12.2/lib/site_perl/5.12.2/darwin-thread-multi-2level/auto/Imager/Imager.bundle 0x10047a000 - 0x1004afff7 +libjpeg.8.dylib 9.2.0 (compatibility 9.0.0) <357C5928-594E-3A74-F334-F1F450B66AEA> /usr/local/lib/libjpeg.8.dylib 0x7fff5fc00000 - 0x7fff5fc3bdef dyld 132.1 (???) <B536F2F1-9DF1-3B6C-1C2C-9075EA219A06> /usr/lib/dyld 0x7fff820ea000 - 0x7fff820eeff7 libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) <95718673-FEEE-B6ED-B127-BCDBDB60D4E5> /usr/lib/system/libmathCommon.A.dylib 0x7fff8342b000 - 0x7fff835ecfff libSystem.B.dylib 125.2.1 (compatibility 1.0.0) <71E6D4C9-F945-6EC2-998C-D61AD590DAB6> /usr/lib/libSystem.B.dylib 0x7fff86bdd000 - 0x7fff86c5afef libstdc++.6.dylib 7.9.0 (compatibility 7.0.0) <35ECA411-2C08-FD7D-11B1-1B7A04921A5C> /usr/lib/libstdc++.6.dylib 0x7fffffe00000 - 0x7fffffe01fff libSystem.B.dylib ??? (???) <71E6D4C9-F945-6EC2-998C-D61AD590DAB6> /usr/lib/libSystem.B.dylib Perl version: Emerald:~/Downloads/jpeg-8b tom$ perl --version This is perl 5, version 12, subversion 2 (v5.12.2) built for darwin-thread-multi-2level I recently upgraded my Mac from OSX 10.5 to 10.6, and installed a new libjpeg after doing so. What other information can I provide?
On Fri Nov 26 15:59:44 2010, baldmantom wrote: Show quoted text
> > Emerald:~/Downloads/jpeg-8b tom$ perl --version > > This is perl 5, version 12, subversion 2 (v5.12.2) built for > darwin-thread-multi-2level > > > I recently upgraded my Mac from OSX 10.5 to 10.6, and installed a new > libjpeg after doing so. What other information can I provide?
I haven't been able to reproduce this on my Mac, two things: 1) could I please have the output of "perl -V" - this will provide more of perl's configuration, so I can match it. 2) could I please get a stack trace of the crash with symbols, as follows: # remove any build products, don't need it for a build in a clean tree make clean # build with symbols perl Makefile.PL OPTIMIZE=-g make # run the code under the debugger gdb perl r -Mblib t/t10jpeg.t # debugger will indicate a crash # product a back trace bt # quit the debuffer q Thanks Tony
From: baldmantom [...] gmail.com
Hi Tony, Thanks for your quick reply. Here's the info you requested: Emerald:~ tom$ perl -V Summary of my perl5 (revision 5 version 12 subversion 2) configuration: Platform: osname=darwin, osvers=10.3.0, archname=darwin-thread-multi-2level uname='darwin emerald.local 10.3.0 darwin kernel version 10.3.0: fri feb 26 11:58:09 pst 2010; root:xnu-1504.3.12~1release_i386 i386 ' config_args='' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include', optimize='-O3', cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include' ccversion='', gccversion='4.2.1 (Apple Inc. build 5664)', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, 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 =' -fstack-protector -L/usr/local/lib -L/opt/local/lib' libpth=/usr/local/lib /opt/local/lib /usr/lib libs=-ldbm -ldl -lm -lutil -lc perllibs=-ldl -lm -lutil -lc libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -L/opt/local/lib -fstack-protector' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF Built under darwin Compiled at Nov 5 2010 15:38:22 @INC: /opt/local/perl/5.12.2/lib/site_perl/5.12.2/darwin-thread-multi-2level /opt/local/perl/5.12.2/lib/site_perl/5.12.2 /opt/local/perl/5.12.2/lib/5.12.2/darwin-thread-multi-2level /opt/local/perl/5.12.2/lib/5.12.2 . Output when running the test via the debugger: Emerald:~/Downloads/Imager-File-JPEG-0.78 tom$ gdb perl GNU gdb 6.3.50-20050815 (Apple version gdb-1469) (Wed May 5 04:36:56 UTC 2010) 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 "x86_64-apple-darwin"...Reading symbols for shared libraries ... done (gdb) r -Mblib t/t10jpeg.t Starting program: /usr/local/bin/perl -Mblib t/t10jpeg.t 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 1..94 Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000008 0x0000000000000008 in ?? () (gdb) bt #0 0x0000000000000008 in ?? () Cannot access memory at address 0x8 #1 0x00000001006d36d0 in ?? () #2 0x000000010094d3f0 in ?? () #3 0x0802110200000001 in ?? () Previous frame inner to this frame (gdb could not unwind past this frame) (gdb) q
Subject: Re: [rt.cpan.org #63358] Segfault when running t/t10jpeg.t on Mac OSX 10.6.5
Date: Sat, 4 Dec 2010 15:05:28 +1100
To: "Thomas R. Helsel via RT" <bug-Imager-File-JPEG [...] rt.cpan.org>
From: tonyc [...] cpan.org
On Sat, Nov 27, 2010 at 09:37:03PM -0500, Thomas R. Helsel via RT wrote: Show quoted text
> Queue: Imager-File-JPEG > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=63358 > > > Hi Tony, > > Thanks for your quick reply. Here's the info you requested: > > Emerald:~ tom$ perl -V > Summary of my perl5 (revision 5 version 12 subversion 2) configuration: > > Platform: > osname=darwin, osvers=10.3.0, archname=darwin-thread-multi-2level > uname='darwin emerald.local 10.3.0 darwin kernel version 10.3.0: fri > feb 26 11:58:09 pst 2010; root:xnu-1504.3.12~1release_i386 i386 '
I built my perl under 10.6.5, while this looks like it was built under 10.5.something, I don't have a 10.5 box to use to reproduce that. With that caveat, I still haven't managed to reproduce the problem here. Show quoted text
> config_args='' > hint=recommended, useposix=true, d_sigaction=define > useithreads=define, usemultiplicity=define > useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef > use64bitint=define, use64bitall=define, uselongdouble=undef > usemymalloc=n, bincompat5005=undef
This seems kind of strange, nothing in config_args, but useithreads and use64bitall are defined. Some minor differences in the rest of it, but nothing that looks like it would be a problem. Show quoted text
> Output when running the test via the debugger: > > Emerald:~/Downloads/Imager-File-JPEG-0.78 tom$ gdb perl
... Show quoted text
> Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000008 > 0x0000000000000008 in ?? () > (gdb) bt > #0 0x0000000000000008 in ?? () > Cannot access memory at address 0x8 > #1 0x00000001006d36d0 in ?? () > #2 0x000000010094d3f0 in ?? () > #3 0x0802110200000001 in ?? () > Previous frame inner to this frame (gdb could not unwind past this frame) > (gdb) q
Unfortunately this looks like the stackframe has been corrupted. The only other thing to try that I can think of is running the test under valgrind, but the valgrind's OS X support is new, so it might not be useful. Tony
From: baldmantom [...] gmail.com
On Fri Dec 03 23:24:17 2010, TONYC wrote: Show quoted text
> On Sat, Nov 27, 2010 at 09:37:03PM -0500, Thomas R. Helsel via RT wrote:
> > Queue: Imager-File-JPEG > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=63358 > > > > > Hi Tony, > > > > Thanks for your quick reply. Here's the info you requested: > > > > Emerald:~ tom$ perl -V > > Summary of my perl5 (revision 5 version 12 subversion 2) configuration: > > > > Platform: > > osname=darwin, osvers=10.3.0, archname=darwin-thread-multi-2level > > uname='darwin emerald.local 10.3.0 darwin kernel version 10.3.0: fri > > feb 26 11:58:09 pst 2010; root:xnu-1504.3.12~1release_i386 i386 '
> > I built my perl under 10.6.5, while this looks like it was built under > 10.5.something, I don't have a 10.5 box to use to reproduce that. > > With that caveat, I still haven't managed to reproduce the problem > here. >
> > config_args='' > > hint=recommended, useposix=true, d_sigaction=define > > useithreads=define, usemultiplicity=define > > useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef > > use64bitint=define, use64bitall=define, uselongdouble=undef > > usemymalloc=n, bincompat5005=undef
> > This seems kind of strange, nothing in config_args, but useithreads > and use64bitall are defined. > > Some minor differences in the rest of it, but nothing that looks like > it would be a problem. >
> > Output when running the test via the debugger: > > > > Emerald:~/Downloads/Imager-File-JPEG-0.78 tom$ gdb perl
> ...
> > Program received signal EXC_BAD_ACCESS, Could not access memory. > > Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000008 > > 0x0000000000000008 in ?? () > > (gdb) bt > > #0 0x0000000000000008 in ?? () > > Cannot access memory at address 0x8 > > #1 0x00000001006d36d0 in ?? () > > #2 0x000000010094d3f0 in ?? () > > #3 0x0802110200000001 in ?? () > > Previous frame inner to this frame (gdb could not unwind past this
frame) Show quoted text
> > (gdb) q
> > Unfortunately this looks like the stackframe has been corrupted. > > The only other thing to try that I can think of is running the test > under valgrind, but the valgrind's OS X support is new, so it might > not be useful. > > Tony
Thanks Tony. It's sounding like it's a problem of my own creation. I'll try starting over by recompiling perl and see if I can't clear things up on my own. -Tom