Skip Menu |
 

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

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

People
Owner: cpan [...] bargsten.org
Requestors: sabbene [...] nvidia.com
Cc:
AdminCc:

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



CC: William Clark <wclark [...] nvidia.com>
Subject: Proc::ProcessTable - Has an issue with user processes named []
Date: Thu, 20 Aug 2015 23:04:14 +0000
To: "bug-Proc-ProcessTable [...] rt.cpan.org" <bug-Proc-ProcessTable [...] rt.cpan.org>
From: Stephen Abbene <sabbene [...] nvidia.com>
Download (untitled) / with headers
text/plain 9.5k
Hello, I have noticed that there is an issue with Proc::ProcessTable. When there is a user process called [] (This is a separate issue we are working on), Proc::ProcessTable spits out an error, and is unable to provide much information about the process. This is the error: Ran into unknown state (hex char: 0) at /home/sabbene/proc::processtable/bin/proc-processtable-0.51 line 14. I am seeing this issue in all versions of Proc::ProcessTable available on cpan (0.47 - 0.51) using perl 5.12.1 on CentOS 5 with a kernel.org<http://kernel.org> kernel version 3.0.52. Below I have included Information about one of the systems I am seeing the issue on, my method for creating my test environment, test scripts, and the output from the scripts. I would appreciate any advice or direction you can offer about this issue. Let me know if you need anything else from me. ## System Info [sabbene@l-sim-237-029 proc::processtable]$ uname -a Linux l-sim-237-029 3.0.52 #2 SMP Thu Dec 6 02:40:34 PST 2012 x86_64 x86_64 x86_64 GNU/Linux [sabbene@l-sim-237-029 proc::processtable]$ rpm -qi glibc Name : glibc Relocations: (not relocatable) Version : 2.5 Vendor: CentOS Release : 65 Build Date: Fri 12 Aug 2011 10:49:31 AM PDT Install Date: Thu 20 Oct 2011 01:07:49 AM PDT Build Host: builder10.centos.org Group : System Environment/Libraries Source RPM: glibc-2.5-65.src.rpm Size : 12971036 License: LGPL Signature : DSA/SHA1, Fri 12 Aug 2011 02:24:55 PM PDT, Key ID a8a447dce8562897 Summary : The GNU libc libraries. Description : The glibc package contains standard libraries which are used by multiple programs on the system. In order to save disk space and memory, as well as to make upgrading easier, common system code is kept in one place and shared between programs. This particular package contains the most important sets of shared libraries: the standard C library and the standard math library. Without these two libraries, a Linux system will not function. ## Create dir structure and install different versions of Proc::ProcessTable [sabbene@l-sim-237-029 ~]$ cd /home/sabbene/proc::processtable [sabbene@l-sim-237-029 proc::processtable]$ mkdir 0.47; ./cpanm -f --self-contained -L 0.47/ JWB/Proc-ProcessTable-0.47.tar.gz [sabbene@l-sim-237-029 proc::processtable]$ mkdir 0.48; ./cpanm -f --self-contained -L 0.48/ JWB/Proc-ProcessTable-0.48.tar.gz [sabbene@l-sim-237-029 proc::processtable]$ mkdir 0.49; ./cpanm -f --self-contained -L 0.49/ JWB/Proc-ProcessTable-0.49.tar.gz [sabbene@l-sim-237-029 proc::processtable]$ mkdir 0.50; ./cpanm -f --self-contained -L 0.50/ JWB/Proc-ProcessTable-0.50.tar.gz [sabbene@l-sim-237-029 proc::processtable]$ mkdir 0.51; ./cpanm -f --self-contained -L 0.51/ Proc::ProcessTable ## Test scripts’ source: [sabbene@l-sim-237-029 proc::processtable]$ for x in `find bin/* -type f`; do echo "###$x"; cat $x; echo; done ###bin/proc-processtable-0.47 #!/home/utils/perl-5.12.1-MIS/bin/perl use FindBin; use lib "$FindBin::/home/sabbene/proc::processtable/0.47/lib/perl5/"; use Proc::ProcessTable; my $obj = Proc::ProcessTable->new; my $count = 0; print "Perl Version: $]\n"; print "Proc::ProcessTable Version: ".$Proc::ProcessTable::VERSION."\n"; for my $proc (@{$obj->table}) { unless ($proc->{pid} =~ /\d+/) { $count++; print "Non-Digit pid found: ".$proc->{pid}." ".$proc->{cmndline}."\n\n"; foreach $field ($obj->fields){ print $field, ": ", $proc->{$field}, "\n"; } } } print "\n\n"; ###bin/proc-processtable-0.48 #!/home/utils/perl-5.12.1-MIS/bin/perl use FindBin; use lib "$FindBin::/home/sabbene/proc::processtable/0.48/lib/perl5/"; use Proc::ProcessTable; my $obj = Proc::ProcessTable->new; my $count = 0; print "Perl Version: $]\n"; print "Proc::ProcessTable Version: ".$Proc::ProcessTable::VERSION."\n"; for my $proc (@{$obj->table}) { unless ($proc->{pid} =~ /\d+/) { $count++; print "Non-Digit pid found: ".$proc->{pid}." ".$proc->{cmndline}."\n\n"; foreach $field ($obj->fields){ print $field, ": ", $proc->{$field}, "\n"; } } } print "\n\n"; ###bin/proc-processtable-0.49 #!/home/utils/perl-5.12.1-MIS/bin/perl use FindBin; use lib "$FindBin::/home/sabbene/proc::processtable/0.49/lib/perl5/"; use Proc::ProcessTable; my $obj = Proc::ProcessTable->new; my $count = 0; print "Perl Version: $]\n"; print "Proc::ProcessTable Version: ".$Proc::ProcessTable::VERSION."\n"; for my $proc (@{$obj->table}) { unless ($proc->{pid} =~ /\d+/) { $count++; print "Non-Digit pid found: ".$proc->{pid}." ".$proc->{cmndline}."\n\n"; foreach $field ($obj->fields){ print $field, ": ", $proc->{$field}, "\n"; } } } print "\n\n"; ###bin/proc-processtable-0.50 #!/home/utils/perl-5.12.1-MIS/bin/perl use FindBin; use lib "$FindBin::/home/sabbene/proc::processtable/0.50/lib/perl5/"; use Proc::ProcessTable; my $obj = Proc::ProcessTable->new; my $count = 0; print "Perl Version: $]\n"; print "Proc::ProcessTable Version: ".$Proc::ProcessTable::VERSION."\n"; for my $proc (@{$obj->table}) { unless ($proc->{pid} =~ /\d+/) { $count++; print "Non-Digit pid found: ".$proc->{pid}." ".$proc->{cmndline}."\n\n"; foreach $field ($obj->fields){ print $field, ": ", $proc->{$field}, "\n"; } } } print "\n\n"; ###bin/proc-processtable-0.51 #!/home/utils/perl-5.12.1-MIS/bin/perl use FindBin; use lib "$FindBin::/home/sabbene/proc::processtable/0.51/lib/perl5/"; use Proc::ProcessTable; my $obj = Proc::ProcessTable->new; my $count = 0; print "Perl Version: $]\n"; print "Proc::ProcessTable Version: ".$Proc::ProcessTable::VERSION."\n"; for my $proc (@{$obj->table}) { unless ($proc->{pid} =~ /\d+/) { $count++; print "Non-Digit pid found: ".$proc->{pid}." ".$proc->{cmndline}."\n\n"; foreach $field ($obj->fields){ print $field, ": ", $proc->{$field}, "\n"; } } } ###bin/test #!/bin/bash ##script to kick off Proc::ProcessTable tests count=`ps aux | grep -c "\[\]"` if [[ $count -gt 0 ]] then echo -en "Found [] process: " echo `ps aux | grep "\[\]"` echo -en "\nStarting Proc::ProcessTable tests\n\n" for exe in `find /home/sabbene/proc\:\:processtable/bin/ -type f -name proc-* | sort` do $exe 2>&1 done fi ## Output from tests [sabbene@l-sim-237-029 proc::processtable]$ bin/test 2>\&1 Found [] process: 3498 13954 11.1 1.4 2046448 1908012 ? SN 14:08 10:11 [] Starting Proc::ProcessTable tests Ran into unknown state (hex char: 0) at /home/sabbene/proc::processtable/bin/proc-processtable-0.47 line 14. Perl Version: 5.012001 Proc::ProcessTable Version: 0.47 Non-Digit pid found: uid: 3498 gid: 30 pid: fname: ppid: pgrp: sess: ttynum: flags: minflt: cminflt: majflt: cmajflt: utime: stime: cutime: cstime: priority: start: size: rss: wchan: time: 0 ctime: 0 state: euid: 3498 suid: 3498 fuid: 3498 egid: 30 sgid: 30 fgid: 30 pctcpu: 0.00 pctmem: 0.00 cmndline: exec: cwd: Ran into unknown state (hex char: 0) at /home/sabbene/proc::processtable/bin/proc-processtable-0.48 line 14. Perl Version: 5.012001 Proc::ProcessTable Version: 0.48 Non-Digit pid found: uid: 3498 gid: 30 pid: fname: ppid: pgrp: sess: ttynum: flags: minflt: cminflt: majflt: cmajflt: utime: stime: cutime: cstime: priority: start: size: rss: wchan: time: 0 ctime: 0 state: euid: 3498 suid: 3498 fuid: 3498 egid: 30 sgid: 30 fgid: 30 pctcpu: 0.00 pctmem: 0.00 cmndline: exec: cwd: Ran into unknown state (hex char: 0) at /home/sabbene/proc::processtable/bin/proc-processtable-0.49 line 14. Perl Version: 5.012001 Proc::ProcessTable Version: 0.49 Non-Digit pid found: uid: 3498 gid: 30 pid: fname: ppid: pgrp: sess: ttynum: flags: minflt: cminflt: majflt: cmajflt: utime: stime: cutime: cstime: priority: start: size: rss: wchan: time: 0 ctime: 0 state: euid: 3498 suid: 3498 fuid: 3498 egid: 30 sgid: 30 fgid: 30 pctcpu: 0.00 pctmem: 0.00 cmndline: exec: cwd: Ran into unknown state (hex char: 0) at /home/sabbene/proc::processtable/bin/proc-processtable-0.50 line 14. Perl Version: 5.012001 Proc::ProcessTable Version: 0.50 Non-Digit pid found: uid: 3498 gid: 30 pid: fname: ppid: pgrp: sess: ttynum: flags: minflt: cminflt: majflt: cmajflt: utime: stime: cutime: cstime: priority: start: size: rss: wchan: time: 0 ctime: 0 state: euid: 3498 suid: 3498 fuid: 3498 egid: 30 sgid: 30 fgid: 30 pctcpu: 0.00 pctmem: 0.00 cmndline: exec: cwd: Ran into unknown state (hex char: 0) at /home/sabbene/proc::processtable/bin/proc-processtable-0.51 line 14. Perl Version: 5.012001 Proc::ProcessTable Version: 0.51 Non-Digit pid found: uid: 3498 gid: 30 pid: fname: ppid: pgrp: sess: ttynum: flags: minflt: cminflt: majflt: cmajflt: utime: stime: cutime: cstime: priority: start: size: rss: wchan: time: 0 ctime: 0 state: euid: 3498 suid: 3498 fuid: 3498 egid: 30 sgid: 30 fgid: 30 pctcpu: 0.00 pctmem: 0.00 cmndline: exec: cwd: Thank you, Stephen Abbene ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -----------------------------------------------------------------------------------
Download (untitled) / with headers
text/html 26.5k

Message body is not shown because it is too large.

Download (untitled) / with headers
text/plain 898b
Hi Stephen, Am Do 20. Aug 2015, 19:04:38, sabbene@nvidia.com schrieb: Show quoted text
> Hello, > > I have noticed that there is an issue with Proc::ProcessTable. When > there is a user process called [] (This is a separate issue we are > working on), Proc::ProcessTable spits out an error, and is unable to > provide much information about the process. This is the error: > Ran into unknown state (hex char: 0) at
I think these are two unrelated issues. I created processes with the name "[]", and Proc::ProcessTable works without any problem. Obviously there is something else going on. Can you provide me with the output of /proc/<pid of process question>/stat ? In the case of the tests you ran, the ps aux command shows: Show quoted text
> Found [] process: 3498 13954 11.1 1.4 2046448 1908012 ? SN 14:08 10:11 []
So you would look in /proc/13954/stat. A simple "cat /proc/<pid>/stat" would be sufficient. Best, Joachim
Subject: Re: [rt.cpan.org #106571] Proc::ProcessTable - Has an issue with user processes named []
Date: Mon, 24 Aug 2015 16:17:53 +0000
To: jwbargsten via RT <bug-Proc-ProcessTable [...] rt.cpan.org>
From: Stephen Abbene <sabbene [...] nvidia.com>
I found quite a few of the processes causing the error this morning, so I have included the output of several of their /proc/$PID/stat files [sabbene@l-sim-11-080 ~]$ sudo cat /proc/35071/stat 35071 () R 35069 35069 35046 0 -1 8192 10148590 84429341 0 15 49774 21417 224603 70417 25 5 1 0 522672527 7252451328 1736003 34359738368 4194304 5573764 140737488328240 140737488318840 215732741968 0 0 128 31235 0 0 0 17 7 0 0 0 0 0 [sabbene@l-sim-27-055 ~]$ sudo cat /proc/27714/stat 27714 () S 6298 6296 6275 0 -1 8192 16831688 927429075 28 1223 107906 71895 3475659 776816 25 5 1 0 2651305419 7316295680 1751519 17179869184 4194304 5573764 140737488327280 140737488326216 215732561168 0 0 128 31235 0 0 0 17 16 0 0 0 0 0 [sabbene@l-sim-27-071 ~]$ sudo cat /proc/23887/stat 23887 () S 23885 23885 23874 0 -1 8192 9563466 540927048 0 250 37844 18049 1517612 361548 25 5 1 0 3504651804 3643580416 854915 17179869184 4194304 5573764 140737488337904 140737488336840 215732561168 0 0 128 31235 0 0 0 17 9 0 0 0 0 0 [sabbene@l-sim-156-073 ~]$ sudo cat /proc/25127/stat 25127 () S 25125 25125 25104 0 -1 8192 15428885 881695937 28 1372 44004 28900 3261331 767766 25 5 1 0 4931066533 2115678208 481886 34359738368 4194304 5573764 140737488328400 140737488327336 215732561168 0 0 128 31235 0 0 0 17 24 0 0 0 0 0 [sabbene@l-sim-157-160 ~]$ sudo cat /proc/11510/stat 11510 () S 11508 11508 11481 0 -1 8192 12638210 505469762 0 671 58382 39604 1275921 365078 25 5 1 0 4750791953 7251640320 1735803 34359738368 4194304 5573764 140737488328192 140737488327128 215732561168 0 0 128 31235 0 0 0 17 14 0 0 0 0 0 On 8/23/15, 2:00 AM, "jwbargsten via RT" <bug-Proc-ProcessTable@rt.cpan.org> wrote: Show quoted text
><URL: https://rt.cpan.org/Ticket/Display.html?id=106571 > > >Hi Stephen, >Am Do 20. Aug 2015, 19:04:38, sabbene@nvidia.com schrieb:
>> Hello, >> >> I have noticed that there is an issue with Proc::ProcessTable. When >> there is a user process called [] (This is a separate issue we are >> working on), Proc::ProcessTable spits out an error, and is unable to >> provide much information about the process. This is the error: >> Ran into unknown state (hex char: 0) at
> >I think these are two unrelated issues. I created processes with the name >"[]", and Proc::ProcessTable works without any problem. Obviously there >is something else going on. Can you provide me with the output of >/proc/<pid of process question>/stat ? > >In the case of the tests you ran, the ps aux command shows: >
>> Found [] process: 3498 13954 11.1 1.4 2046448 1908012 ? SN 14:08 10:11 >>[]
> >So you would look in /proc/13954/stat. A simple "cat /proc/<pid>/stat" >would be sufficient. > >Best, >Joachim
----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -----------------------------------------------------------------------------------
Download (untitled) / with headers
text/plain 218b
Found the bug. Proc::ProcessTable could not parse empty process names. Fixed it and released version 0.53 commit: https://github.com/jwbargsten/perl-proc-processtable/commit/cca93a8d644d2ac0dbe1fc4bcca48a440b847fcd
Subject: Re: [rt.cpan.org #106571] Proc::ProcessTable - Has an issue with user processes named []
Date: Mon, 24 Aug 2015 23:49:20 +0000
To: jwbargsten via RT <bug-Proc-ProcessTable [...] rt.cpan.org>
From: Stephen Abbene <sabbene [...] nvidia.com>
Download (untitled) / with headers
text/plain 1.5k
Awesome thank you so much. It looks like it works now. [sabbene@l-sim-156-056 bin]$ ./proc-processtable-0.53 Perl Version: 5.012001 Proc::ProcessTable Version: 0.53 [sabbene@l-sim-156-056 bin]$ ./proc-processtable-0.51 Perl Version: 5.012001 Proc::ProcessTable Version: 0.51 Ran into unknown state (hex char: 0) at ./proc-processtable-0.51 line 14. Non-Digit pid found: uid: 3498 gid: 30 pid: fname: ppid: pgrp: sess: ttynum: flags: minflt: cminflt: majflt: cmajflt: utime: stime: cutime: cstime: priority: start: size: rss: wchan: time: 0 ctime: 0 state: euid: 3498 suid: 3498 fuid: 3498 egid: 30 sgid: 30 fgid: 30 pctcpu: 0.00 pctmem: 0.00 cmndline: exec: cwd: On 8/24/15, 12:40 PM, "jwbargsten via RT" <bug-Proc-ProcessTable@rt.cpan.org> wrote: Show quoted text
><URL: https://rt.cpan.org/Ticket/Display.html?id=106571 > > >Found the bug. Proc::ProcessTable could not parse empty process names. >Fixed it and released version 0.53 > >commit: > >https://github.com/jwbargsten/perl-proc-processtable/commit/cca93a8d644d2a >c0dbe1fc4bcca48a440b847fcd > >
----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -----------------------------------------------------------------------------------


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.