Bug 236809

Summary: ps -m displays incorrect PPID for threads, error appears in U5
Product: Red Hat Enterprise Linux 3 Reporter: Matthew Coffey <mcoffey>
Component: kernelAssignee: Red Hat Kernel Manager <kernel-mgr>
Status: CLOSED WONTFIX QA Contact: Martin Jenner <mjenner>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: dhoward
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-19 18:37:26 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:
Attachments:
Description Flags
sysreport from server in the above description none

Description Matthew Coffey 2007-04-17 19:05:52 UTC
Description of problem:
ps -m displays an incorrect PPID for threads. Instead of displaying the actual
parent PID, it displays the PID shell that spawned the parent. This makes
grouping by PPID impossible.

Version-Release number of selected component (if applicable): RHEL3U5 through
RHEL3U8 hotfix 2.4.21-47.6. If you do a ps -efm on RHEL3U4, you get the correct
PPIDs returned. If you add the RHEL3U5 kernel and boot off it, ps -efm now
returns the wrong PPID. This same behavior continues in RHEL3U8 and the
2.4.21-47.6 hot fix kernel.


How reproducible: Always


Steps to Reproduce:
1. Example from a RHEL3U4 Server:
# uname -a
Linux ucprap02 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST 2004 i686 i686 i386
GNU/Linux
# ps -efm |grep hpasm
root      1442     1  0 Apr16 ?        00:00:00 hpasmd
root      1601  1442  0 Apr16 ?        00:00:00 hpasmd
root      1602  1442  0 Apr16 ?        00:00:30 hpasmd
root      1603  1442  0 Apr16 ?        00:00:01 hpasmd
root      1604  1442  0 Apr16 ?        00:05:31 hpasmd
root      1605  1442  0 Apr16 ?        00:00:00 hpasmd
root      1606  1442  0 Apr16 ?        00:00:00 hpasmd
root      1607  1442  0 Apr16 ?        00:00:00 hpasmd
root      1608  1442  0 Apr16 ?        00:00:00 hpasmd
root      1609  1442  0 Apr16 ?        00:00:00 hpasmd
root      1610  1442  0 Apr16 ?        00:00:00 hpasmd
root      1611  1442  0 Apr16 ?        00:00:00 hpasmd

Reboot to RHEL3U5 kernel
# uname -a
Linux ucprap02 2.4.21-32.0.1.ELsmp #1 SMP Tue May 17 17:52:23 EDT 2005 i686 i686
i386 GNU/Linux
# ps -efm | grep hpasm
root      1419     1  0 09:59 ?        00:00:00 hpasmd
root      1562     1  0 09:59 ?        00:00:00 hpasmd
root      1563     1  0 09:59 ?        00:00:05 hpasmd
root      1564     1  0 09:59 ?        00:00:00 hpasmd
root      1565     1  0 09:59 ?        00:01:24 hpasmd
root      1566     1  0 09:59 ?        00:00:00 hpasmd
root      1567     1  0 09:59 ?        00:00:00 hpasmd
root      1568     1  0 09:59 ?        00:00:00 hpasmd
root      1569     1  0 09:59 ?        00:00:00 hpasmd
root      1570     1  0 09:59 ?        00:00:00 hpasmd
root      1571     1  0 09:59 ?        00:00:00 hpasmd
root      1572     1  0 09:59 ?        00:00:00 hpasmd

Here's the output from a RHEL3U8 system:

2.
3.
  
Actual results:
See above

Expected results:
# cat /proc/1562/stat
1562 (hpasmd) S 1 1419 1419 0 -1 4194368 1 0 0 0 0 0 0 0 15 0 0 0 3808 117624832
253 4294967295 134512640 134824256 3221206384 27113968 9609259 0 2147221247 6 0
3222491772 0 0 -1 0 0 0 0 0 0 0

The correct value appears to be in the proc stat file, but ps no longer
retrieves it.

Additional info:

Comment 1 Matthew Coffey 2007-04-17 19:05:52 UTC
Created attachment 152844 [details]
sysreport from server in the above description

Comment 2 Matthew Coffey 2007-04-17 19:10:25 UTC
A clarification from looking at the stat files on RHEL3U4 versus RHEL3U8,
/proc/pid/stat is broken when the proc is in the background, but are fine when
the process is in the foreground.

Sample threaded Java process leader -
gfprod     25501   812624    313476    Apr15      00:32:58   fgw_11229

random sub thread -
hostname:/proc/25699 $ cat stat
25699 (java) S 1 23064 23064 0 ...

That 1 should only occur in /proc/25501/stat, the rest of the threads should
have 25501.

Comment 3 RHEL Program Management 2007-10-19 18:37:26 UTC
This bug is filed against RHEL 3, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products. Since
this bug does not meet that criteria, it is now being closed.
 
For more information of the RHEL errata support policy, please visit:
http://www.redhat.com/security/updates/errata/
 
If you feel this bug is indeed mission critical, please contact your
support representative. You may be asked to provide detailed
information on how this bug is affecting you.