This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: Re: [patch] Fix for 'info threads' crashes if zombie threads exist
- From: Daniel Jacobowitz <drow at false dot org>
- To: Jan Kratochvil <lace at jankratochvil dot net>
- Cc: gdb-patches at sourceware dot org, Christoph Bartoschek <bartoschek at or dot uni-bonn dot de>
- Date: Tue, 20 Jun 2006 13:11:09 -0400
- Subject: Re: RFC: Re: [patch] Fix for 'info threads' crashes if zombie threads exist
- References: <200606201542.12070.bartoschek@or.uni-bonn.de> <20060620135351.GA9853@host0.dyn.jankratochvil.net> <200606201821.41941.bartoschek@or.uni-bonn.de> <200606191719.00530.bartoschek@or.uni-bonn.de> <200606201456.57681.bartoschek@or.uni-bonn.de> <20060620130932.GA21490@nevyn.them.org> <200606201524.45099.bartoschek@or.uni-bonn.de> <20060620132737.GA21951@nevyn.them.org> <20060619165609.GA14691@host0.dyn.jankratochvil.net> <20060620170451.GA17022@host0.dyn.jankratochvil.net>
On Tue, Jun 20, 2006 at 07:04:51PM +0200, Jan Kratochvil wrote:
> Hi Christoph,
>
> On Tue, 20 Jun 2006 18:21:41 +0200, Christoph Bartoschek wrote:
> ...
> > I applied your patch to gdb 6.4 and do not see the error again.
>
> sincerely thanks for the test.
>
> Is there any objection regarding the patch import? What was the original
> TD_DEATH notification reason? Not sure if the patch is compatible with
> non-Linux platforms.
A little patience, please. It takes a while to review GDB patches,
especially non-obvious ones - and thread-db support seems to be quite
complicated.
TD_DEATH events were supported because there are all sorts of things
which can go wrong when you ask libthread_db about a thread that it
considers dead. At that point, as far as the library is concerned, the
thread is gone. A new thread can be created with the same thread ID -
even before this one exits. If you ask it to map that thread ID to an
LWP, it will refuse. After your patch, I strongly suspect there are
places where you could hit control-c and get mysterious errors from
GDB.
--
Daniel Jacobowitz
CodeSourcery