Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 130611 - Process names in /proc/pid/stat are limited to 15 characters
Summary: Process names in /proc/pid/stat are limited to 15 characters
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-20 07:54 UTC by Caleb Tennis (RETIRED)
Modified: 2006-04-20 16:19 UTC (History)
1 user (show)

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 Caleb Tennis (RETIRED) gentoo-dev 2006-04-20 07:54:52 UTC
I'm guessing this isn't a Gentoo specific thing, but I'm not sure who is best suited to discuss this:

The second item in the /proc/pid/stat file contains the name of the executable, but it seems to chop off at 15 characters:

tc@tc3 ~/svn/trunk $ ps ax | grep 21883
21883 ?        Rsl   33:01 /g4/servers/measurement/measurement_server --daemon
22507 pts/2    S+     0:00 grep 21883

tc@tc3 ~/svn/trunk $ cat /proc/21883/stat
21883 (measurement_ser) R 1 21883 21883 0 -1 8396864 723 0 0 0 120384 78625 0 0 25 0 5 0 110736764 40042496 732 4294967295 134512640 134652717 3218209664 1162167666 646 0 16387 4096 65536 4294967295 0 0 17 1 0 0

This seems to break using start-stop-daemon with those processes when you try and do it by "--name", because it searches there for the name of the application.

I'm sure this may not be considered a bug, but I'd at least like to find out where to go to discuss this further, because it seems very logicaly that having more than 15 characters in an application name would be prudent.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-04-20 11:44:37 UTC
man pgrep:

<snip>
The process name used for matching is limited to the 15 characters present in the output of /proc/pid/stat. Use the -f option to match against the complete command line, /proc/pid/cmdline.
</snip>

Otherwise, see /usr/include/sys/procfs.h

This is not a bug, closing.
Comment 2 Caleb Tennis (RETIRED) gentoo-dev 2006-04-20 11:57:38 UTC
mmkay, but how does this fix start-stop-daemon?
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-04-20 12:05:13 UTC
(In reply to comment #2)
> mmkay, but how does this fix start-stop-daemon?

Well, it doesn't... :) start-stop-daemon --name uses an erroneous assumption. If you meant this as a start-stop-daemon bug, then reopen it and assign to uberlord most likely. Patching glibc is not a viable solution, IMHO.
Comment 4 Caleb Tennis (RETIRED) gentoo-dev 2006-04-20 12:14:40 UTC
will try that.  I figured the 15 character limit was set by somewhere, but I'm more concerned with being able to start and stop my long daemoned file names :)

Comment 5 Caleb Tennis (RETIRED) gentoo-dev 2006-04-20 12:14:58 UTC
trying a reassign
Comment 6 Roy Marples (RETIRED) gentoo-dev 2006-04-20 13:13:40 UTC
Caleb, which baselayout version is this against? 1.12 has a start-stop-daemon wrapper that does stop all by itself and should not encounter this limit.

Marking as WONTFIX. Re-open if this bug is present in 1.12 or you disagree.
Comment 7 Caleb Tennis (RETIRED) gentoo-dev 2006-04-20 16:19:55 UTC
It's 1.11.14-r6.  I've give 1.12 a whirl - thanks.