Bug 107705

Summary: top hides child processes of non-execed children
Product: [Fedora] Fedora Reporter: Jan Christiaan van Winkel <jc>
Component: procpsAssignee: Daniel Walsh <dwalsh>
Status: CLOSED RAWHIDE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
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: 2004-03-29 12:48:09 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 Jan Christiaan van Winkel 2003-10-22 10:21:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
this is almost the same bug as number 107701, except in RH9, not only top is
wrong, but also ps.  In fedora core test3, only top is affected.

if a program fork()s but the child does not exec, top will not show it, and add
all CPU time to the parent.  Killing the parent will then show the child in top.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
Compile rabbit.c:
                                                                                
#include <stdio.h>
#include <unistd.h>
                                                                                
int main() {
                                                                                
  fork();
  fork();
                                                                                
  printf("Rabbit PID=%d\n", getpid());
                                                                                
  while (1) {}
                                                                                
}
                                                                                
[jc@minioreo TEST]$ make rabbit
cc     rabbit.c   -o rabbit
[jc@minioreo TEST]$ ./rabbit &
[1] 12126
Rabbit PID=12128
Rabbit PID=12127
[jc@minioreo TEST]$ Rabbit PID=12129
Rabbit PID=12126



Actual Results:  Running top will now only show the parent (with PID 12126). 
Killing this, will show two other rabbits, but not the third...

Expected Results:  All children should show up in top.  Or at least there should
be an option to un-hide un-execed children...

Additional info:

Comment 1 Daniel Walsh 2004-02-11 13:51:26 UTC
*** Bug 107701 has been marked as a duplicate of this bug. ***

Comment 2 Daniel Walsh 2004-03-25 15:44:37 UTC
Is this fixed by procps-3.1.15?

Comment 3 Daniel Walsh 2004-03-29 12:48:09 UTC
Not a problem in 3.2.0