Bug 243845 - killing gdb debuggee leaves zombie processes
killing gdb debuggee leaves zombie processes
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: gdb (Show other bugs)
4.5
All Linux
medium Severity high
: ---
: ---
Assigned To: Jan Kratochvil
:
Depends On:
Blocks: 244677
  Show dependency treegraph
 
Reported: 2007-06-12 06:52 EDT by Bryn M. Reeves
Modified: 2007-11-16 20:14 EST (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2007-0811
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-15 11:12:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bryn M. Reeves 2007-06-12 06:52:31 EDT
Description of problem:
If the debuggee is killed while gdb is attached a pair of zombies remain until
the parent gdb process exits:

# ps ax | grep sleep
16425 pts/3    T      0:00 sleep 300
16430 pts/3    R+     0:00 grep sleep
# kill -9 16425
# ps ax | grep sleep
16425 pts/3    Z      0:00 [sleep] <defunct>
16432 pts/3    R+     0:00 grep sleep
# ps ax | grep gdb
16426 pts/4    S+     0:00 gdb -p 16425
16428 pts/4    Z+     0:00 [gdb] <defunct>
16434 pts/3    R+     0:00 grep gdb


Version-Release number of selected component (if applicable):
gdb-6.3.0.0-1.143.el4

How reproducible:
100%

Steps to Reproduce:
1. In one terminal start a process running, e.g.:
# sleep 300 &
[1] 16425

2. In another terminal attach the debugger:
# gdb -p 16425
GNU gdb Red Hat Linux (6.3.0.0-1.143.el4rh)
Copyright 2004 Free Software Foundation, Inc.
[...]
0x0081d7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
(gdb)

3. Kill the debuggee:
# kill -9 16425

  
Actual results:
Two zombie processes now exist:

# ps ax | grep sleep
16425 pts/3    Z      0:00 [sleep] <defunct>
16432 pts/3    R+     0:00 grep sleep
# ps ax | grep gdb
16426 pts/4    S+     0:00 gdb -p 16425
16428 pts/4    Z+     0:00 [gdb] <defunct>
16434 pts/3    R+     0:00 grep gdb


Expected results:
No defunct processes remain.

Additional info:
The defunct processes are cleaned up when the parent GDB exits (pid 16426 in the
above examples).

This does not happen with the GDB in RHEL3 or FC6/F7.
Comment 2 RHEL Product and Program Management 2007-06-12 07:05:20 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 15 errata-xmlrpc 2007-11-15 11:12:05 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0811.html

Note You need to log in before you can comment on or make changes to this bug.