Bug 312361 - "[exe]" ("exe") as a process name for missing argv[0]
"[exe]" ("exe") as a process name for missing argv[0]
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-29 10:38 EDT by Jan Kratochvil
Modified: 2007-11-30 17:12 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-11 11:12:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Testcase. (790 bytes, text/plain)
2007-09-29 10:38 EDT, Jan Kratochvil
no flags Details

  None (edit)
Description Jan Kratochvil 2007-09-29 10:38:28 EDT
Description of problem:
For processes with missing argv[0] ps(1) displays
 5984 pts/0    TN     0:00 [exe]
12515 pts/0    TNl    0:00 [exe]
(the constant string "[exe]" although it could display at least the basename of
readlink ("/proc/self/exe").

Version-Release number of selected component (if applicable):
kernel-2.6.23-0.195.rc7.git3.fc8.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. Run an attached testcase simulating program with missing argv[0].

Actual results:
exe
FAIL

Expected results:
missing-argv
PASS

Additional info:
ps(1) just produces the output of `/proc/PID/exe' where for missing argv[0]
kernel displays:
Name: exe
Unaware why "exe".
It could be also workarounded by ps(1) (but it would need to check for the empty
`/proc/PID/cmdline' or so).
Comment 1 Jan Kratochvil 2007-09-29 10:38:28 EDT
Created attachment 211341 [details]
Testcase.
Comment 2 Dave Jones 2007-10-11 02:07:32 EDT
I'm not sure what's going on here. Maybe the glibc guys have some ideas.
Jakub? Uli?
Comment 3 Jan Kratochvil 2007-10-11 11:12:41 EDT
Notabug, sorry.
It is "exe" as it execs "/proc/self/exe" - the basename.
Unsure where I have seen it initially but kernel behaves right for this
testcase, executing "/tmp/foobar" with argv[0]==NULL makes the process `comm'
"foobar".

Note You need to log in before you can comment on or make changes to this bug.