Bug 3015

Summary: gdb + threaded programs = lots of zombie threads, even with PTHREAD_CREATE_DETACHED
Product: [Retired] Red Hat Linux Reporter: benco
Component: gdbAssignee: Jay Turner <jturner>
Severity: high Docs Contact:
Priority: medium    
Version: 6.0CC: rwilson, srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
URL: http://pendor.mckusick.com/~benco/threadtest.c
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-07-30 21:33:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description benco 1999-05-24 20:15:20 UTC
The program in the attached URL generates four threads
which all immediately exit. When run standalone from the
shell, there are two PIDs devoted to my program, as there
should be (one for the main thread, and one for the thread
manager--the other four exit cleanly). When run from gdb,
however, the same two threads show up, along with four
processes in the zombie state, even though the threads are
all created with the PTHREAD_CREATE_DETACHED flag in their

This makes debugging impossible for large programs that
create many short-lived threads, as the process table fills
up quickly.

Comment 1 Jim Kingdon 1999-07-30 21:33:59 UTC
The given URL http://pendor.mckusick.com/~benco/threadtest.c does not
seem to (any longer) be valid.  Could you please email threadtest.c?