This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Assertion `lp->resumed' failed - multiple processes in all-stop mode


I am getting an internal error in linux-nat.c after trying to continue multiple threads. This
is all-stop mode, async commands, and detach-on-fork off setting. This is a program where
new threads are being created with fork() system call.


(gdb) r &
Starting program: /eng/upc/dev/nenad/gdb-upc-dev/test/cg/cg
(gdb) [New UPC Thread 0]
[New UPC Thread 1]
[New UPC Thread 2]
[New UPC Thread 3]
info threads
  5 UPC Thread 3  0x000000000043c666 in fork ()
  4 UPC Thread 2  0x000000000043c666 in fork ()
  3 UPC Thread 1  0x000000000043c666 in fork ()
  2 UPC Thread 0  0x000000000043c666 in fork ()
* 1 process 18102  (running)
(gdb) interrupt
(gdb)
Program received signal SIGINT, Interrupt.
0x000000000043c2e4 in wait ()
thread apply 2 3 c&

Thread 2 (UPC Thread 0):
Continuing.

Thread 3 (UPC Thread 1):
Continuing.
(gdb) ../../src/gdb/linux-nat.c:3207: internal-error: linux_nat_filter_event: Assertion `lp->resumed' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.


If I remove assert on line 3207 everything works as expected:

3205
3206       lp->stopped = 0;
3207       gdb_assert (lp->resumed);
3208
3209       /* Discard the event.  */
3210       return NULL;

it works with assert() in if you specify only one thread:

(gdb) thread apply 2 c&

Thread 2 (UPC Thread 0):
Continuing.
(gdb) info threads
  5 UPC Thread 3  0x000000000043c666 in fork ()
  4 UPC Thread 2  0x000000000043c666 in fork ()
  3 UPC Thread 1  0x000000000043c666 in fork ()
  2 UPC Thread 0  (running)
* 1 process 18621  0x000000000043c2e4 in wait ()
(gdb)

Any ideas?

Nenad


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]