This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
threads/2383: internal-error: linux_nat_wait: Assertion `iterate_over_lwps (running_callback, NULL)' failed.
- From: anemo at mba dot ocn dot ne dot jp
- To: gdb-gnats at sources dot redhat dot com
- Date: 13 Dec 2007 16:53:42 -0000
- Subject: threads/2383: internal-error: linux_nat_wait: Assertion `iterate_over_lwps (running_callback, NULL)' failed.
- Reply-to: anemo at mba dot ocn dot ne dot jp
>Number: 2383
>Category: threads
>Synopsis: internal-error: linux_nat_wait: Assertion `iterate_over_lwps (running_callback, NULL)' failed.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Dec 13 16:58:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
>Release: 6.7.1, 6.7.50-20071213
>Organization:
>Environment:
Linux debian 2.6.18-5-686
>Description:
With 'step' scheduler-locking, stepping attached program causes assertion failure.
session log:
(gdb) break func
Breakpoint 1 at 0x8048417: file /home/anemo/tmp/foo.c, line 5.
(gdb) run
Starting program: /home/anemo/tmp/foo
Failed to read a valid object file image from memory.
[Thread debugging using libthread_db enabled]
[New Thread 0xb7e196c0 (LWP 14988)]
[New Thread 0xb7e18bb0 (LWP 14991)]
[Switching to Thread 0xb7e18bb0 (LWP 14991)]
Breakpoint 1, func (arg=0x0) at /home/anemo/tmp/foo.c:5
5 return NULL;
(gdb) set scheduler-locking step
(gdb) s
6 }
(gdb) s
0xb7f51240 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
(gdb) s
Single stepping until exit from function start_thread,
which has no line number information.
[Thread 0xb7e18bb0 (LWP 14991) exited]
../../gdb-6.7.50.20071213/gdb/linux-nat.c:2146: internal-error: linux_nat_wait: Assertion `iterate_over_lwps (running_callback, NULL)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
stack trace:
#9 0x0809d36c in linux_nat_wait (ptid={pid = -1, lwp = 0, tid = 0},
ourstatus=0xbff62244) at ../../gdb-6.7.50.20071213/gdb/linux-nat.c:2146
#10 0x08097869 in thread_db_wait (ptid={pid = -1, lwp = 0, tid = 0},
ourstatus=0xbff62244)
at ../../gdb-6.7.50.20071213/gdb/linux-thread-db.c:874
#11 0x08111277 in wait_for_inferior ()
at ../../gdb-6.7.50.20071213/gdb/infrun.c:1035
#12 0x081113dc in proceed (addr=4294967295, siggnal=TARGET_SIGNAL_DEFAULT,
step=1) at ../../gdb-6.7.50.20071213/gdb/infrun.c:855
#13 0x0810ace1 in step_1 (skip_subroutines=0,
single_inst=<value optimized out>, count_string=0x0)
at ../../gdb-6.7.50.20071213/gdb/infcmd.c:774
#14 0x08084cd3 in execute_command (p=0x83190e1 "", from_tty=1)
at ../../gdb-6.7.50.20071213/gdb/top.c:449
#15 0x0811c43c in command_handler (command=0x83190e0 "s")
at ../../gdb-6.7.50.20071213/gdb/event-top.c:518
#16 0x0811d0df in command_line_handler (rl=0x83c9ce8 "0B9\b\200�4\b")
at ../../gdb-6.7.50.20071213/gdb/event-top.c:804
#17 0x081c1c2b in rl_callback_read_char ()
at ../../gdb-6.7.50.20071213/readline/callback.c:205
#18 0x0811c5db in rl_callback_read_char_wrapper (client_data=0x0)
at ../../gdb-6.7.50.20071213/gdb/event-top.c:177
#19 0x0811c023 in handle_file_event (event_file_desc=0)
at ../../gdb-6.7.50.20071213/gdb/event-loop.c:728
#20 0x0811b4cd in process_event ()
at ../../gdb-6.7.50.20071213/gdb/event-loop.c:341
#21 0x0811bc85 in gdb_do_one_event (data=0x0)
at ../../gdb-6.7.50.20071213/gdb/event-loop.c:378
#22 0x08118f2b in catch_errors (func=0x811bb80 <gdb_do_one_event>,
func_args=0x0, errstring=0x824e045 "", mask=6)
at ../../gdb-6.7.50.20071213/gdb/exceptions.c:513
#23 0x080c53f4 in tui_command_loop (data=0x0)
at ../../gdb-6.7.50.20071213/gdb/tui/tui-interp.c:153
#24 0x081194cf in current_interp_command_loop ()
at ../../gdb-6.7.50.20071213/gdb/interps.c:276
#25 0x0807e75b in captured_command_loop (data=0x0)
at ../../gdb-6.7.50.20071213/gdb/main.c:99
#26 0x08118f2b in catch_errors (func=0x807e750 <captured_command_loop>,
func_args=0x0, errstring=0x824e045 "", mask=6)
at ../../gdb-6.7.50.20071213/gdb/exceptions.c:513
#27 0x0807ef34 in captured_main (data=0xbff627c4)
at ../../gdb-6.7.50.20071213/gdb/main.c:870
#28 0x08118f2b in catch_errors (func=0x807e790 <captured_main>,
func_args=0xbff627c4, errstring=0x824e045 "", mask=6)
at ../../gdb-6.7.50.20071213/gdb/exceptions.c:513
#29 0x0807e743 in gdb_main (args=0xbff627c4)
at ../../gdb-6.7.50.20071213/gdb/main.c:879
#30 0x0807e705 in main (argc=Cannot access memory at address 0x3a87
) at ../../gdb-6.7.50.20071213/gdb/gdb.c:33
This might be duplication of PR1988 or PR2260, but not sure.
If I did not set scheduler-locking to 'step', this problem does not happen.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-csrc; name="foo.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="foo.c"
I2luY2x1ZGUgPHB0aHJlYWQuaD4KCnZvaWQgKmZ1bmModm9pZCAqYXJnKQp7CglyZXR1cm4gTlVM
TDsKfQoKaW50IG1haW4oaW50IGFyZ2MsIGNoYXIgKiphcmd2KSAKewogICAgICAgIHB0aHJlYWRf
dCBpZDsKCXB0aHJlYWRfY3JlYXRlKCZpZCwgTlVMTCwgZnVuYywgTlVMTCk7CglwdGhyZWFkX2pv
aW4oaWQsIE5VTEwpOwoJcmV0dXJuIDA7Cn0K