Possible bug in gdb-6.1.1 (it leaves zombie processes)

Dmitry Krivenok krivenok.dmitry at gmail.com
Wed May 25 18:09:35 UTC 2011


Hello hackers,
I think I found a bug in base gdb-6.1.1 on FreeBSD-8.2.
Below is how you can reproduce it.

I run "sleep 10" command under control of gdb-6.1.1 as follows

$ gdb --args sleep 10
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...(no debugging
symbols found)...
(gdb) r
Starting program: /bin/sleep 10
(no debugging symbols found)...(no debugging symbols found)...
Program exited normally.
(gdb) q
$

During execution of sleep I saw:
$ ps auxw | grep sleep
krived  2951  0.0  1.1 15836  5520   0  S     4:14PM   0:00.04 gdb
--args sleep 10
krived  2952  0.0  0.2  2764   840   0  SX+   4:14PM   0:00.01 /bin/sleep 10
$

As expected, once sleep exited and got
$ ps auxw | grep sleep
krived  2951  0.0  1.1 15836  5520   0  S+    4:14PM   0:00.04 gdb
--args sleep 10
$

However, I found that sleep process became a zombie:
$ ps auxw | grep 2952
krived  2952  0.0  0.0     0     0   0  Z     4:14PM   0:00.01 <defunct>
$

Then I closed gdb and zombie process went away:
$  ps auxw | grep 2952
$

I did a quick search through the Google and found that other people
also encountered this problem before:
https://bugzilla.redhat.com/show_bug.cgi?id=243845

I tried the same test with gdb-7.2 installed from ports and there was
no zombie process.

I didn't find any reports on this problem in PR database.
Can this problem be classified as a bug in base gdb-6.1.1?

Thanks!


More information about the freebsd-hackers mailing list