Re: threads/2383: internal-error: linux_nat_wait: Assertion `iterate_over_lwps (running_callback, NULL)' failed.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: threads/2383: internal-error: linux_nat_wait: Assertion `iterate_over_lwps (running_callback, NULL)' failed.

Atsushi Nemoto
The following reply was made to PR threads/2383; it has been noted by GNATS.

From: Atsushi Nemoto <[hidden email]>
To: [hidden email], [hidden email]
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));
 
Reply | Threaded
Open this post in threaded view
|

Re: threads/2383: internal-error: linux_nat_wait: Assertion `iterate_over_lwps (running_callback, NULL)' failed.

Daniel Jacobowitz-2
The following reply was made to PR threads/2383; it has been noted by GNATS.

From: Daniel Jacobowitz <[hidden email]>
To: Atsushi Nemoto <[hidden email]>
Cc: [hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: threads/2383: internal-error: linux_nat_wait: Assertion `iterate_over_lwps (running_callback, NULL)' failed.

Atsushi Nemoto
In reply to this post by Atsushi Nemoto
The following reply was made to PR threads/2383; it has been noted by GNATS.

From: Atsushi Nemoto <[hidden email]>
To: [hidden email]
Cc: [hidden email]
Subject: Re: threads/2383: internal-error: linux_nat_wait: Assertion
 `iterate_over_lwps (running_callback, NULL)' failed.
Date: Sat, 01 Mar 2008 22:46:42 +0900 (JST)

 On Fri, 29 Feb 2008 11:50:18 -0500, Daniel Jacobowitz <[hidden email]> wrote:
 > So you've single-stepped a thread until its exit, while it was the
 > only thread running.  Is that correct?
 
 Yes.
 
 > It seems like we ought to inform the user when this happens, not
 > suddenly run somewhere else.
 
 Hmm...  Thank you, it might be better.  But how to do that exactly?
 
 ---
 Atsushi Nemoto
Reply | Threaded
Open this post in threaded view
|

Re: threads/2383: internal-error: linux_nat_wait: Assertion `iterate_over_lwps (running_callback, NULL)' failed.

Daniel Jacobowitz-2
In reply to this post by Atsushi Nemoto
The following reply was made to PR threads/2383; it has been noted by GNATS.

From: Daniel Jacobowitz <[hidden email]>
To: Atsushi Nemoto <[hidden email]>
Cc: [hidden email]
Subject: Re: threads/2383: internal-error: linux_nat_wait: Assertion
        `iterate_over_lwps (running_callback, NULL)' failed.
Date: Sat, 1 Mar 2008 09:49:05 -0500

 On Sat, Mar 01, 2008 at 10:46:42PM +0900, Atsushi Nemoto wrote:
 > > It seems like we ought to inform the user when this happens, not
 > > suddenly run somewhere else.
 >
 > Hmm...  Thank you, it might be better.  But how to do that exactly?
 
 I don't know.  I suppose it could be a new
 TARGET_WAITKIND_THREAD_EXIT...
 
 --
 Daniel Jacobowitz
 CodeSourcery