Bug 808427

Summary: Runner API leaves behind a zombie process when 'execution' fails
Product: [Community] GlusterFS Reporter: krishnan parthasarathi <kparthas>
Component: coreAssignee: Csaba Henk <csaba>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: gluster-bugs, nsathyan, vbellur, vbhat
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-12 07:22:24 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
Helps to recreate the issue. none

Description krishnan parthasarathi 2012-03-30 11:13:53 UTC
Description of problem:
When the executable to be 'run' using the runner API failed to execute, it results in a zombie process (of the executable).

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


How reproducible:
Always


Steps to Reproduce:
1. In a local source repo, cd into libglusterfs/src directory.
2. Apply the patch that is _attached_ along with the bug. 
3. (Compile run's code with appropriate flags) gcc -DRUN_STANDALONE -DRUN_DO_TESTS run.c -o run
4. (Run the 'runner' test suite.) ./run
5. On ps ax | grep run, you must notice [run] <defunct> entry, which indicates
the presence of a zombie process born out of the run testsuite. 
  
Actual results:
There is a zombie process after a failed execution of a executable using runner
API.

Expected results:
There should be no zombie process left around.

Additional info:

Comment 1 krishnan parthasarathi 2012-03-30 11:31:11 UTC
Created attachment 573968 [details]
Helps to recreate the issue.

This is the patch that needs to be applied in order to recreate the issue (easily).

Comment 2 Anand Avati 2012-04-03 05:38:56 UTC
CHANGE: http://review.gluster.com/3067 (libglusterfs/run: test suite refinement) merged in master by Vijay Bellur (vijay)

Comment 3 Anand Avati 2012-04-03 05:39:34 UTC
CHANGE: http://review.gluster.com/3055 (libglusterfs/run: clean up properly also if program could not be spawned) merged in master by Vijay Bellur (vijay)

Comment 4 Csaba Henk 2012-04-03 17:08:53 UTC
So, due to commit "test suite refienement", the way to test for this issue does not requires the attached repro patch anymore.

That is (for glusterfs >= 22cc6179), "Steps to Reproduce" section of bug description changes as follows:

- Step 2 is not needed
- Step 4 modifies to calling ./run 0

Comment 5 M S Vishwanath Bhat 2012-04-12 07:22:24 UTC
I don't see a zombie process now while the test suite is running. 


ps ax | grep run
32603 pts/2    S+     0:00 ./run 0