Skip Menu |

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

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

People
Owner: cpan [...] bargsten.org
Requestors: HMBRAND [...] cpan.org
Cc:
AdminCc:

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



Subject: [PATCH] Build/test FAIL on Linux 3.11 kernel
Linux 3.11.6-4-desktop [openSUSE 13.1 (Bottle)] t/process.t .. Ran into unknown state (hex char: 29) at t/process.t line 19. Ran into unknown state (hex char: 29) at t/process.t line 19. Ran into unknown state (hex char: 29) at t/process.t line 19. Ran into unknown state (hex char: 29) at t/process.t line 19. --- Proc-ProcessTable-0.48/os/Linux.c 2013-04-07 12:56:30.000000000 +0200 +++ Proc-ProcessTable-0.48-3gKaNU/os/Linux.c 2013-12-03 14:18:42.217199814 +0100 @@ -33,6 +33,7 @@ static unsigned system_hertz; static bool init_failed = false; +extern char *canonicalize_file_name(const char *path); /* get_string() * @@ -331,6 +332,7 @@ static bool get_proc_stat(char *pid, cha * NOTE: we don't bother checking bounds since strchr didn't return NULL * thus the NULL terminator will be at least paren+1, which is ok */ stat_cont = paren + 1; + if (*stat_cont == ')') stat_cont++; /* scape the remaining values */ result = sscanf(stat_cont, " %c %d %d %d %d %d %u %lu %lu %lu %lu %llu" diff -purd Proc-ProcessTable-0.48/os/Linux.h Proc-ProcessTable-0.48-3gKaNU/os/Linux.h --- Proc-ProcessTable-0.48/os/Linux.h 2013-04-07 12:56:30.000000000 +0200 +++ Proc-ProcessTable-0.48-3gKaNU/os/Linux.h 2013-12-03 14:12:25.718710547 +0100 @@ -32,7 +32,7 @@ struct procstat unsigned long wchan; /* these are derived from above time values */ unsigned long long time, ctime; - /* from above state_c but fixed up elese where */ + /* from above state_c but fixed up elsewhere */ const char *state; /* values scraped from /proc/{$pid}/status */ int euid, suid, fuid;
This patch just postpones the bug (imagine processes with two ")" in their name). I ran into this earlier, the bug might be already fixed in the source code on github. Could you download the source, build it and run the tests? The git-repo you can clone via: git clone https://github.com/jwbargsten/perl-proc-processtable.git If it solves your problem, I'll hurry up and publish version 0.49 on CPAN with the bugfix resolved ASAP.
Subject: Re: [rt.cpan.org #91150] [PATCH] Ran into unknown state (hex char: 29) on Linux 3.11 kernel
Date: Wed, 4 Dec 2013 21:23:18 +0100
To: bug-Proc-ProcessTable [...] rt.cpan.org
From: "H.Merijn Brand" <h.m.brand [...] xs4all.nl>
On Wed, 4 Dec 2013 13:02:55 -0500, "jwbargsten via RT" <bug-Proc-ProcessTable@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=91150 > > > This patch just postpones the bug (imagine processes with two ")" in their name). I ran into this earlier, the bug might be already fixed in the source code on github. Could you download the source, build it and run the tests? The git-repo you can clone via: > > git clone https://github.com/jwbargsten/perl-proc-processtable.git > > If it solves your problem, I'll hurry up and publish version 0.49 on CPAN with the bugfix resolved ASAP.
cc -c -fno-strict-aliasing -pipe -fstack-protector -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -DVERSION=\"0.48\" -DXS_VERSION=\"0.48\" -fPIC "-I/pro/lib/perl5/5.18.0/i686-linux-64int-ld/CORE" OS.c OS.c: In function ‘eval_link’: OS.c:387:10: warning: assignment makes pointer from integer without a cast [enabled by default] link = canonicalize_file_name(link_file); ^ OS.c: In function ‘OS_get_table’: OS.c:708:9: warning: passing argument 2 of ‘bless_into_proc’ from incompatible pointer type [enabled by default] ); ^ In file included from OS.c:21:0: os/Linux.h:4:6: note: expected ‘char **’ but argument is of type ‘const char * const*’ void bless_into_proc(char* , char**, ...); ^ t/process.t ............................. ok All tests successful. Files=5, Tests=10, 3 wallclock secs ( 0.02 usr 0.00 sys + 0.19 cusr 0.06 csys = 0.27 CPU) Result: PASS -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using perl5.00307 .. 5.19 porting perl5 on HP-UX, AIX, and openSUSE http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
updated github repo & uploaded version 0.49 to cpan.