Bug 312361 - "[exe]" ("exe") as a process name for missing argv[0]
Summary: "[exe]" ("exe") as a process name for missing argv[0]
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-29 14:38 UTC by Jan Kratochvil
Modified: 2007-11-30 22:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-10-11 15:12:41 UTC
Type: ---
Embargoed:


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

Description Jan Kratochvil 2007-09-29 14:38:28 UTC
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 14:38:28 UTC
Created attachment 211341 [details]
Testcase.

Comment 2 Dave Jones 2007-10-11 06:07:32 UTC
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 15:12:41 UTC
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.