Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>
Subject: Re: [patch] Fix internal-error on dead LWPs with no associated thread
Date: Mon, 29 Jun 2009 10:35:00 -0000	[thread overview]
Message-ID: <200906291136.28812.pedro@codesourcery.com> (raw)
In-Reply-To: <20090629100922.GA26882@host0.dyn.jankratochvil.net>

On Monday 29 June 2009 11:09:22, Jan Kratochvil wrote:

> original bugreport:
> https://bugzilla.redhat.com/show_bug.cgi?id=471819
> 
> linux-nat.c:1662: internal-error: linux_nat_resume: Assertion `lp != NULL' failed.
> 
> A reproducing testcase included.
> No regressions on {x86_64,i686}-fedora-linux-gnu.

Please try the below patchlet instead.  Do you have any other case where this
would be needed?

Does anyone know why does the new_thread_event bit need to resume the target
at all?  Removing that resume should fix the issue too.

---
 gdb/infrun.c |    2 ++
 1 file changed, 2 insertions(+)

Index: src/gdb/infrun.c
===================================================================
--- src.orig/gdb/infrun.c	2009-06-29 11:29:58.000000000 +0100
+++ src/gdb/infrun.c	2009-06-29 11:30:36.000000000 +0100
@@ -2746,6 +2746,8 @@ targets should add new threads to the th
 	 in either the OS or the native code).  Therefore we need to
 	 continue all threads in order to make progress.  */
 
+      if (!ptid_equal (ecs->ptid, inferior_ptid))
+	context_switch (ecs->ptid);
       target_resume (RESUME_ALL, 0, TARGET_SIGNAL_0);
       prepare_to_wait (ecs);
       return;

-- 
Pedro Alves


  reply	other threads:[~2009-06-29 10:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-29 10:09 Jan Kratochvil
2009-06-29 10:35 ` Pedro Alves [this message]
2009-06-29 17:51   ` Jan Kratochvil
2009-06-29 18:30     ` Pedro Alves
2009-06-29 18:59       ` Jan Kratochvil
2009-06-29 18:31     ` Jan Kratochvil
2009-06-29 18:41       ` Pedro Alves
2009-06-29 21:35         ` Jan Kratochvil
2009-06-29 21:42           ` Pedro Alves
2009-06-29 21:48             ` Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200906291136.28812.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox