This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: gdb/946: threads (from pthreads) stay in defunct state
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 18 Jan 2003 20:38:00 -0000
- Subject: Re: gdb/946: threads (from pthreads) stay in defunct state
- Reply-to: Daniel Jacobowitz <drow at mvista dot com>
The following reply was made to PR gdb/946; it has been noted by GNATS.
From: Daniel Jacobowitz <drow@mvista.com>
To: nicolas@activebuddy.com
Cc: gdb-gnats@sources.redhat.com
Subject: Re: gdb/946: threads (from pthreads) stay in defunct state
Date: Sat, 18 Jan 2003 13:24:46 -0500
On Fri, Jan 17, 2003 at 08:21:53PM -0000, nicolas@activebuddy.com wrote:
>
> >Number: 946
> >Category: gdb
> >Synopsis: threads (from pthreads) stay in defunct state
> >Confidential: no
> >Severity: serious
> >Priority: medium
> >Responsible: unassigned
> >State: open
> >Class: sw-bug
> >Submitter-Id: net
> >Arrival-Date: Fri Jan 17 12:28:01 PST 2003
> >Closed-Date:
> >Last-Modified:
> >Originator: nicolas@activebuddy.com
> >Release: GNU gdb Red Hat Linux (5.2-2)
> >Organization:
> >Environment:
> RH gcc-2.96-85
> >Description:
> Running this test app will keep former threads as "defunct" when run from gdb, whereas running the app by itself will terminate the threads properly.
>
> This is a very bad problem when debugging a program that creates/destroys threads on the fly as it will fail when reaching 1024 thread create/destroy cycles.
FYI, this is a Linux kernel bug, not a GDB bug. I believe it's still
present in the current development kernels.
In kernel/exit.c:exit_notify (assuming 2.4 kernel), look for:
t = current->pptr;
and replace with:
t = current->opptr;
and see if that helps.
Theoretically, GDB _might_ be able to work around this bug on affected
kernels.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer