From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22615 invoked by alias); 29 Feb 2008 16:28:01 -0000 Received: (qmail 22600 invoked by uid 71); 29 Feb 2008 16:28:01 -0000 Date: Fri, 29 Feb 2008 16:28:00 -0000 Message-ID: <20080229162801.22599.qmail@sourceware.org> To: nobody@sources.redhat.com Cc: gdb-prs@sources.redhat.com, From: Atsushi Nemoto Subject: Re: threads/2383: internal-error: linux_nat_wait: Assertion `iterate_over_lwps (running_callback, NULL)' failed. Reply-To: Atsushi Nemoto 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/msg00056.txt.bz2 The following reply was made to PR threads/2383; it has been noted by GNATS. From: Atsushi Nemoto To: gdb-gnats@sources.redhat.com, nobody@sources.redhat.com Cc: Subject: Re: threads/2383: internal-error: linux_nat_wait: Assertion `iterate_over_lwps (running_callback, NULL)' failed. Date: Sat, 01 Mar 2008 01:23:06 +0900 (JST) I confirmed this problem is still in gdb-6.7.50.20080222. 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));