Subject: | Ran into unknown state (hex char: 29) |
Date: | Wed, 06 Oct 2010 23:40:02 +0200 |
To: | bug-Proc-ProcessTable [...] rt.cpan.org |
From: | Bernd Kallies <kallies [...] zib.de> |
On our current systems running Linux 2.6.32.19 Proc::ProcessTable-0.45
warns about "Ran into unknown state (hex char: 29)" for a number of
processes. The corresponding process properties are undefined, including
the pid.
It turns out that this is due to the comm field in /proc/[pid]/stat,
which may contain additional braces. In our case the comm field reads
like e.g. "(ib_fmr(mlx4_0))". This breaks the parser code in
Linux.c:get_proc_stat().
The problem should be fixed by changing the call to strchr at line 320
into strrchr, which works around the assumption that file names of
executables don't contain braces.
I hope it is OK that I don't attach a patch for this, since the source
code change consists of one single character, only.
--
Dr. Bernd Kallies
Konrad-Zuse-Zentrum für Informationstechnik Berlin
Takustr. 7
14195 Berlin
Tel: +49-30-84185-270
Fax: +49-30-84185-311
e-mail: kallies@zib.de