Skip Menu |

This queue is for tickets about the Proc-ProcessTable CPAN distribution.

Report information
The Basics
Id: 22898
Status: resolved
Priority: 0/
Queue: Proc-ProcessTable

People
Owner: Nobody in particular
Requestors: a.klink [...] cynops.de
Cc:
AdminCc:

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



Subject: $pt->table segfaults sometimes (0.41)
Date: Wed, 8 Nov 2006 10:28:26 +0100
To: bug-Proc-ProcessTable [...] rt.cpan.org
From: Alexander Klink <a.klink [...] cynops.de>
Hi, on a Mac OS X (Intel) machine, I have the following weird problem: calling the table method on a Proc::ProcessTable object creates a segmentation fault some of the time, sometimes it works just fine. This is illustrated in the attached test script. If I run it on the Mac machine, I (sometimes) get the following: trinidad:~ klink$ (for ((i=0; i<100; i=i+1)); do perl pt_bug.pl ; sleep 1; done)|wc -l 85 running it on a Linux machine (which uses perl 5.8.8 as well), I get the expected "100", so apparently it does not crash there ... Here is the uname: Darwin trinidad.local 8.8.1 Darwin Kernel Version 8.8.1: Mon Sep 25 19:42:00 PDT 2006; root:xnu-792.13.8.obj~1/RELEASE_I386 i386 i386 And perl -V: Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=darwin, osvers=8.7.1, archname=darwin-2level uname='darwin trinidad.dach-wg.de 8.7.1 darwin kernel version 8.7.1: wed jun 7 16:19:56 pdt 2006; root:xnu-792.9.72.obj~2release_i386 i386 i386 ' config_args='-des -Dprefix=/opt/local -Dccflags=-I'/opt/local/include' -Dldflags=-L/opt/local/lib -Dvendorprefix=/opt/local -Dcc=/usr/bin/gcc-4.0' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='/usr/bin/gcc-4.0', ccflags ='-I/opt/local/include -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/opt/local/include', optimize='-O3', cppflags='-no-cpp-precomp -I/opt/local/include -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/opt/local/include' ccversion='', gccversion='4.0.1 (Apple Computer, Inc. build 5341)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 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/opt/local/lib' libpth=/opt/local/lib /usr/lib libs=-ldbm -ldl -lm -lc perllibs=-ldl -lm -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='-L/opt/local/lib -bundle -undefined dynamic_lookup' Characteristics of this binary (from libperl): Compile-time options: PERL_MALLOC_WRAP USE_LARGE_FILES USE_PERLIO Built under darwin Compiled at Jul 30 2006 14:50:02 %ENV: PERL5LIB="/Users/klink/usr/local/lib/perl5/site_perl/5.8.8" @INC: /Users/klink/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level /Users/klink/usr/local/lib/perl5/site_perl/5.8.8 /opt/local/lib/perl5/5.8.8/darwin-2level /opt/local/lib/perl5/5.8.8 /opt/local/lib/perl5/site_perl/5.8.8/darwin-2level /opt/local/lib/perl5/site_perl/5.8.8 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level /opt/local/lib/perl5/vendor_perl/5.8.8 /opt/local/lib/perl5/vendor_perl . Let me know if there is any more information that might help in resolving this issue. TIA, Alex -- Dipl.-Math. Alexander Klink | IT-Security Engineer | a.klink@cynops.de mobile: +49 (0)178 2121703 | Cynops GmbH | http://www.cynops.de

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #22898] AutoReply: $pt->table segfaults sometimes (0.41)
Date: Thu, 23 Nov 2006 10:39:30 +0100
To: Bugs in Proc-ProcessTable via RT <bug-Proc-ProcessTable [...] rt.cpan.org>
From: Alexander Klink <a.klink [...] cynops.de>
Hi, On Wed, Nov 08, 2006 at 04:29:14AM -0500, Bugs in Proc-ProcessTable via RT wrote: Show quoted text
> Let me know if there is any more information that might help in > resolving this issue.
I just found that I have a crashreport log which might help in resolving the issue: ********** Host Name: trinidad Date/Time: 2006-11-23 10:32:54.383 +0100 OS Version: 10.4.8 (Build 8L2127) Report Version: 4 Command: perl Path: /usr/bin/perl Parent: bash [579] Version: ??? (???) PID: 29294 Thread: 0 Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_INVALID_ADDRESS (0x0001) at 0x003e3010 Thread 0 Crashed: 0 ProcessTable.bundle 0x001366bc OS_get_table + 2339 1 ProcessTable.bundle 0x00137ad1 XS_Proc__ProcessTable_table + 196 2 perl 0x00072eea Perl_pp_entersub + 677 3 perl 0x0006ac59 Perl_runops_standard + 31 4 perl 0x00005386 perl_run + 782 5 perl 0x00002108 main + 214 6 perl 0x00001fda _start + 228 (crt.c:272) 7 perl 0x00001ef5 start + 41 Thread 0 crashed with X86 Thread State (32-bit): eax: 0x003e3028 ebx: 0x00135daa ecx: 0x003c1000 edx: 0x003e3010 edi: 0x003e2f68 esi: 0x003e2e50 ebp: 0xbffff6a8 esp: 0xbffff4d0 ss: 0x0000001f efl: 0x00010246 eip: 0x001366bc cs: 0x00000017 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 Binary Images Description: 0x1000 - 0xf3fff perl /usr/bin/perl 0x111000 - 0x124fff POSIX.bundle /opt/local/lib/perl5/5.8.8/darwin-2level/auto/POSIX/POSIX.bundle 0x12a000 - 0x12afff Cwd.bundle /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Cwd/Cwd.bundle 0x12e000 - 0x131fff Util.bundle /opt/local/lib/perl5/5.8.8/darwin-2level/auto/List/Util/Util.bundle 0x135000 - 0x137fff ProcessTable.bundle /Users/klink/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/Proc/ProcessTable/ProcessTable.bundle 0x13b000 - 0x13cfff Call.bundle /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Filter/Util/Call/Call.bundle 0x140000 - 0x143fff vxs.bundle /Users/klink/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/version/vxs/vxs.bundle 0x147000 - 0x14afff Socket.bundle /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Socket/Socket.bundle 0x152000 - 0x156fff Encode.bundle /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Encode/Encode.bundle 0x15b000 - 0x15dfff gettext_xs.bundle /Users/klink/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/Locale/gettext_xs/gettext_xs.bundle 0x161000 - 0x168fff libintl.3.dylib /opt/local/lib/libintl.3.dylib 0x180000 - 0x185fff Dumper.bundle /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Data/Dumper/Dumper.bundle 0x189000 - 0x193fff Expat.bundle /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level/auto/XML/Parser/Expat/Expat.bundle 0x198000 - 0x1b2fff libexpat.1.dylib /opt/local/lib/libexpat.1.dylib 0x1f0000 - 0x1f1fff Iconv.bundle /Users/klink/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/Text/Iconv/Iconv.bundle 0x1f5000 - 0x1f7fff IO.bundle /opt/local/lib/perl5/5.8.8/darwin-2level/auto/IO/IO.bundle 0x1fb000 - 0x1fcfff Base64.bundle /opt/local/lib/perl5/5.8.8/darwin-2level/auto/MIME/Base64/Base64.bundle 0x305000 - 0x307fff Fcntl.bundle /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Fcntl/Fcntl.bundle 0x30b000 - 0x318fff Storable.bundle /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Storable/Storable.bundle 0x325000 - 0x33afff DBI.bundle /Users/klink/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/DBI/DBI.bundle 0x33f000 - 0x342fff HiRes.bundle /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Time/HiRes/HiRes.bundle 0x346000 - 0x346fff Hostname.bundle /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Sys/Hostname/Hostname.bundle 0x34b000 - 0x351fff Validate.bundle /Users/klink/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/Params/Validate/Validate.bundle 0x355000 - 0x357fff CSV_XS.bundle /Users/klink/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/Text/CSV_XS/CSV_XS.bundle 0x361000 - 0x363fff DateTime.bundle /Users/klink/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/DateTime/DateTime.bundle 0x367000 - 0x369fff Opcode.bundle /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Opcode/Opcode.bundle 0x38f000 - 0x391fff MD5.bundle /opt/local/lib/perl5/5.8.8/darwin-2level/auto/Digest/MD5/MD5.bundle 0x395000 - 0x397fff SHA1.bundle /Users/klink/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/Digest/SHA1/SHA1.bundle 0x1205000 - 0x12dafff libiconv.2.dylib /opt/local/lib/libiconv.2.dylib 0x8fe00000 - 0x8fe49fff dyld 46.9 /usr/lib/dyld 0x90000000 - 0x9016ffff libSystem.B.dylib /usr/lib/libSystem.B.dylib 0x901bf000 - 0x901c1fff libmathCommon.A.dylib /usr/lib/system/libmathCommon.A.dylib 0x90807000 - 0x908cffff com.apple.CoreFoundation 6.4.6 (368.27) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x9090f000 - 0x90a02fff libicucore.A.dylib /usr/lib/libicucore.A.dylib 0x90a52000 - 0x90ad1fff libobjc.A.dylib /usr/lib/libobjc.A.dylib 0x90afa000 - 0x90b5efff libstdc++.6.dylib /usr/lib/libstdc++.6.dylib 0x90bcd000 - 0x90bd4fff libgcc_s.1.dylib /usr/lib/libgcc_s.1.dylib 0x90c61000 - 0x90c73fff libauto.dylib /usr/lib/libauto.dylib
Subject: Re: [rt.cpan.org #22898] AutoReply: $pt->table segfaults sometimes (0.41)
Date: Thu, 30 Nov 2006 17:34:12 +0100 (CET)
To: bug-Proc-ProcessTable [...] rt.cpan.org
From: "Alexander Klink" <a.klink [...] cynops.de>
Hi, some more information: sudo dmesg says (20970: perl)tfp: failed on <pid> for all the PIDs that process table is looking at. Sometimes, it also hangs the machine on PIDs that Mac OS X's Activity Monitor reports an "not responding" (whatever that means). Quoting from http://www.macintouch.com/readerreports/macpro/topic4396.html about tfp: | This message is coming from a kernel routine named "task_for_pid" which | translates Unix process IDs (pid) into Mach task ports. It's a low level | system call, but more importantly it has recently become a "privileged" | operation on OSX Intel. Therefore some software which used to work will now | get an error when calling this function. Maybe that helps? Greetings, Alex
From: jloverso [...] mathworks.com
I think the patch I have in this other bug report solves your problem: http://rt.cpan.org/Public/Bug/Display.html?id=24331
On Fri Jan 18 16:30:59 2008, jlv wrote: Show quoted text
> I think the patch I have in this other bug report solves your problem: > http://rt.cpan.org/Public/Bug/Display.html?id=24331
Looks like it, thanks for the heads up! I tried to merge this bug into 24331, but apparently, I am not allowed to do that - maybe you can? Best regards, Alex