From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26409 invoked by alias); 29 Jun 2009 10:35:34 -0000 Received: (qmail 26401 invoked by uid 22791); 29 Jun 2009 10:35:34 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 29 Jun 2009 10:35:29 +0000 Received: (qmail 990 invoked from network); 29 Jun 2009 10:35:27 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 29 Jun 2009 10:35:27 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch] Fix internal-error on dead LWPs with no associated thread Date: Mon, 29 Jun 2009 10:35:00 -0000 User-Agent: KMail/1.9.10 Cc: Jan Kratochvil References: <20090629100922.GA26882@host0.dyn.jankratochvil.net> In-Reply-To: <20090629100922.GA26882@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906291136.28812.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00803.txt.bz2 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