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> |
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.
-----------------------------------------------------------------------------------
Message body is not shown because it is too large.