Bug 508701
Summary: | "ps -e" does not show nscd (but "ps ax" does) | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Matteo Corti <matteo> |
Component: | glibc | Assignee: | Andreas Schwab <schwab> |
Status: | CLOSED DUPLICATE | QA Contact: | qe-baseos-tools-bugs |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 5.3 | CC: | albert, drepper, fweimer, jbastian, matteo |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2010-02-02 17:03:32 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Matteo Corti
2009-06-29 14:38:04 UTC
After further investigation I found out that the entry in /proc for ntsc is strange: RH5 $ cat /proc/PID/stat 28793 (exe) S 1 28793 28793 0 -1 4202816 2918 0 0 0 22 253 0 0 15 0 7 0 37808079 115728384 798 4294967295 7360512 7463540 3214996912 3214995252 4903938 0 0 3674112 16391 4294967295 0 0 17 1 0 0 0 tcomm is exe instead of nscd /proc/PID/exe is a link to /usr/sbin/nscd ps reads 'exe' and lists exe with the 'comm' argument This does not happen on Fedora: F11 $ cat /proc/PID/stat 14175 (nscd) S 1 14175 14175 0 -1 4194624 37521 0 5 0 467 1853 0 0 20 0 12 0 1878751 153812992 310 4294967295 1843200 1977488 3219997600 3219991756 6214692 0 0 3674112 16390 4294967295 0 0 17 0 0 0 0 0 0 Here tcomm corresponds to 'nscd' Now: ist this a bug of ps that when exe is encountered should follow /proc/PID/exe or is it a kernel problem and 'exe' in tcomm field is wrong? It's possible that nscd called prctl to change the name to exe. Use strace to find out. If not, this appears to be a kernel bug. Ok figured out, it is an nscd problem. nscd does: execv ("/proc/self/exe", argv); which changes the name to exe This does not occur on Fedora as there nscd tries to read the symlink and use the real name: /* Try to exec the real nscd program so the process name (as reported in /proc/PID/status) will be 'nscd', but fall back to /proc/self/exe if readlink fails */ ssize_t n = readlink ("/proc/self/exe", pathbuf, sizeof (pathbuf) - 1); if (n == -1) execv ("/proc/self/exe", argv); else { pathbuf[n] = '\0'; execv (pathbuf, argv); } Thanks Thanks for the update. Moving to glibc component as nscd is part of glibc |