Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 195740 - <=sys-process/psmisc-22.7: pstree eats the space before the last argument it can display
Summary: <=sys-process/psmisc-22.7: pstree eats the space before the last argument it ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High trivial (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-13 19:38 UTC by Francis Galiegue
Modified: 2009-12-19 12:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francis Galiegue 2007-10-13 19:38:33 UTC
I regularly use pstree with pstree -uplan to see what processes run on my system. I've noticed a strange bug. For instance, I've just run it on one of my machines (psmisc-22.5-r2) and I see:

----
  |-distccd,3704,distcc --pid-file /var/run/distccd/distccd.pid -N 0 --user distcc --port 3632 --log-level warning --allow 10.142.81.0/24-
----
[Notice the final dash]

If I do, for the above command, a perl -ple 's,\00, ,g' /proc/3704/cmdline, I have:

----
/usr/bin/distccd --pid-file /var/run/distccd/distccd.pid -N 0 --user distcc --port 3632 --log-level warning --allow 10.142.81.0/24 --listen 10.142.81.118
----

Similarly, on another Gentoo machine on which I run Courier IMAP, also x86 (and psmisc-22.3 this time), I have: 

----
  |-couriertcpd,2820 -address=0 -stderrlogger=/usr/lib/courier-imap/courierlogger -stderrloggername=imapd-maxprocs=100
----

[Notice: -stderrloggername=imapd-maxprocs=100]

whereas perl -ple 's,\00, ,g' /proc/2820/cmdline outputs:

----
/usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/lib/courier-imap/courierlogger -stderrloggername=imapd -maxprocs=100 -maxperip=100 -pid=/var/run/imapd.pid -nodnslookup -noidentlookup 143 /usr/sbin/imaplogin /usr/lib/courier-imap/courier-imapd.indirect .maildir
----


Reproducible: Always

Steps to Reproduce:
Simply run the pstree -uplan on an x86 machine, using psmisc-22.x, 3 <= x <= 5-r2, on a machine with very long command lines on it - MySQL is one program having very long command lines, Courier IMAP is another, you name yours

Actual Results:  
What I described

Expected Results:  
The space before the last displayable argument
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2009-12-11 13:09:25 UTC
Can you try psmisc-22.8? Because I'm seeing something possibly related in ChangeLog.
Comment 2 Francis Galiegue 2009-12-11 14:28:34 UTC
(In reply to comment #1)
> Can you try psmisc-22.8? Because I'm seeing something possibly related in
> ChangeLog.
> 

Do you mean from the source directly? I don't see psmisc 22.8 in portage (I emerged --sync 20 minutes ago).
Comment 3 Francis Galiegue 2009-12-19 12:00:14 UTC
psmisc 22.8 is now in portage and I confirm that it doesn't have this problem anymore.