From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3268 invoked by alias); 29 Feb 2008 16:58:02 -0000 Received: (qmail 3252 invoked by uid 71); 29 Feb 2008 16:58:01 -0000 Date: Fri, 29 Feb 2008 16:58:00 -0000 Message-ID: <20080229165801.3251.qmail@sourceware.org> To: nobody@sources.redhat.com Cc: gdb-prs@sources.redhat.com, From: Daniel Jacobowitz Subject: Re: threads/2383: internal-error: linux_nat_wait: Assertion `iterate_over_lwps (running_callback, NULL)' failed. Reply-To: Daniel Jacobowitz Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2008-q1/txt/msg00057.txt.bz2 The following reply was made to PR threads/2383; it has been noted by GNATS. From: Daniel Jacobowitz To: Atsushi Nemoto Cc: gdb-gnats@sourceware.org Subject: Re: threads/2383: internal-error: linux_nat_wait: Assertion `iterate_over_lwps (running_callback, NULL)' failed. Date: Fri, 29 Feb 2008 11:50:18 -0500 On Fri, Feb 29, 2008 at 04:28:01PM -0000, Atsushi Nemoto wrote: > At that point, it seems gdb assume other threads are resumed, but this > assumption is not true with scheduler-locking. > > With this patch, I can avoid the internal error. Is this reasonable? > > --- gdb-6.7.50.20080222/gdb/linux-nat.c 2008-01-30 07:47:20.000000000 +0900 > +++ gdb/gdb/linux-nat.c 2008-03-01 01:10:57.000000000 +0900 > @@ -2138,6 +2138,9 @@ retry: > ignored. */ > if (num_lwps > 0) > { > + /* If lwps were stopped (by schedlock), resume them. */ > + if (!iterate_over_lwps (running_callback, NULL)) > + iterate_over_lwps (resume_callback, NULL); > /* Make sure there is at least one thread running. */ > gdb_assert (iterate_over_lwps (running_callback, NULL)); > So you've single-stepped a thread until its exit, while it was the only thread running. Is that correct? It seems like we ought to inform the user when this happens, not suddenly run somewhere else. -- Daniel Jacobowitz CodeSourcery