Bug 27311 - gdb can't handle more than 32 pthreads
Summary: gdb can't handle more than 32 pthreads
Status: CLOSED DUPLICATE of bug 39070
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gdb
Version: 7.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Trond Eivind Glomsrxd
QA Contact: Aaron Brown
Depends On:
TreeView+ depends on / blocked
Reported: 2001-02-13 00:47 UTC by Len Widra
Modified: 2007-03-27 03:40 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2001-08-10 14:08:48 UTC

Attachments (Terms of Use)

Description Len Widra 2001-02-13 00:47:46 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.2.16-22 i686)

GDB craps out with more than 32 pthreads.  See the "Steps to Reproduce".

Reproducible: Always
Steps to Reproduce:
Compile this program and just try to run it under gdb:

/* compile with cc -o pthread_test pthread_test.c -lpthread */

#include <pthread.h>

void *pthread_test(void *);

        int i;
        pthread_t tid;


void *
pthread_test(void *arg)

Actual Results:  GDB says:
"Cannot find thread 33: invalid thread handle"

Expected Results:  The darn thing should have allowed all 100 threads to be
created, and
it should have allowed me to debug them.

This has been broken for a while (you can reproduce it on earlier
I keep hoping that it'll get fixed in one of these releases or patches; but
just festering.  I'm hoping that was for lack of an official bug report.

Comment 1 Trond Eivind Glomsrxd 2001-02-13 23:43:10 UTC
GDB has plenty of problems with pthreads....

Comment 2 Len Widra 2001-02-14 07:12:12 UTC
> GDB has plenty of problems with pthreads....

OK, I can believe that.  But I don't know
what your point is.  Could you clarify?

Comment 3 Don Howard 2001-02-15 02:09:13 UTC
Kevin Buettner has proposed a patch for this.  It is non-trivial and has not yet
been merged into the main source tree.  You can find his patch at:


Comment 4 Don Howard 2001-02-16 18:43:11 UTC
This issue will be fixed when the patch mentioned above is merged into gdb.  You
can apply it localy, if you need it now.

Comment 5 Len Widra 2001-02-16 21:25:05 UTC
I applied the patch to a more recent copy of gdb, and it seems to do the trick,
(though as was mentioned there are lots of other bugs with gdb+pthreads).
Thanks very much.

Comment 6 Trond Eivind Glomsrxd 2001-08-10 14:11:09 UTC
This was closed as deferred for RHL 7.1 - the changes has been added to GDB CVS
since then, however.

*** This bug has been marked as a duplicate of 39070 ***

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