Bug 243845 - killing gdb debuggee leaves zombie processes
Summary: killing gdb debuggee leaves zombie processes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: gdb
Version: 4.5
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
: ---
Assignee: Jan Kratochvil
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 244677
TreeView+ depends on / blocked
 
Reported: 2007-06-12 10:52 UTC by Bryn M. Reeves
Modified: 2007-11-17 01:14 UTC (History)
1 user (show)

Fixed In Version: RHBA-2007-0811
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-15 16:12:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0811 0 normal SHIPPED_LIVE gdb bug fix update 2007-11-14 17:46:14 UTC

Description Bryn M. Reeves 2007-06-12 10:52:31 UTC
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 Program Management 2007-06-12 11:05:20 UTC
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 16:12:05 UTC
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.