[Bug breakpoints/22613] New: assert in inferior_thread from tui_on_normal_stop

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Bug breakpoints/22613] New: assert in inferior_thread from tui_on_normal_stop


            Bug ID: 22613
           Summary: assert in inferior_thread from tui_on_normal_stop
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: breakpoints
          Assignee: unassigned at sourceware dot org
          Reporter: matz at suse dot de
  Target Milestone: ---

Created attachment 10690
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10690&action=edit
script showing problem

Place script in gdb build directory, then:

% ./gdb-crash.sh

This is a bug, please report it.  For instructions, see:

./gdb-crash.sh: line 50:  4560 Aborted                 (core dumped) ../gdb/gdb
--data-directory ../gdb/data-directory -nx --batch-silent -return-child-result
--eval-command="break '$break_line'" --eval-command='source bp.py'
--eval-command="run a b c" --eval-command='quit' ./prog

(core file is strange, so use gdb directly, then from the tmp dir created
by script:)

% gdb --args ../gdb/gdb --data-directory ../gdb/data-directory -nx
--batch-silent -return-child-result --eval-command="break '$break_line'"
--eval-command='source bp.py' --eval-command="run a b c" --eval-command='quit'
(gdb) r
(gdb) bt
#0  0x00007ffff64bc3d5 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff64bd858 in __GI_abort () at abort.c:90
#2  0x000000000083b056 in dump_core () at ../../gdb/utils.c:284
#3  0x000000000083b526 in internal_vproblem(internal_problem *, const char *,
int, const char *, typedef __va_list_tag __va_list_tag *) (
    problem=0x10281a0 <internal_error_problem>,
    file=0xb42136 "../../gdb/thread.c", line=93,
    fmt=0xb420cb "%s: Assertion `%s' failed.", ap=0x7fffffffcf58)
    at ../../gdb/utils.c:493
#4  0x000000000083b5f9 in internal_verror (file=0xb42136 "../../gdb/thread.c",
    line=93, fmt=0xb420cb "%s: Assertion `%s' failed.", ap=0x7fffffffcf58)
    at ../../gdb/utils.c:518
#5  0x0000000000543c71 in internal_error (file=0xb42136 "../../gdb/thread.c",
    line=93, fmt=0xb420cb "%s: Assertion `%s' failed.")
    at ../../gdb/common/errors.c:55
#6  0x000000000080ddc3 in inferior_thread () at ../../gdb/thread.c:93
#7  0x00000000004a4ebf in tui_on_normal_stop (bs=0x1344f50, print_frame=1)
    at ../../gdb/tui/tui-interp.c:97
#8  0x000000000073ae51 in observer_normal_stop_notification_stub (
    data=0x4a4e61 <tui_on_normal_stop(bpstats*, int)>,
    args_data=0x7fffffffd120) at ./observer.inc:36
#9  0x000000000073ad56 in generic_observer_notify (subject=0x1215780,
    args=0x7fffffffd120) at ../../gdb/observer.c:167
#10 0x000000000073aeef in observer_notify_normal_stop (bs=0x1344f50,
    print_frame=1) at ./observer.inc:61
#11 0x00000000006f12b9 in normal_stop () at ../../gdb/infrun.c:8309
#12 0x00000000006e8a28 in fetch_inferior_event (client_data=0x0)
    at ../../gdb/infrun.c:3942
#13 0x00000000006d7112 in inferior_event_handler (event_type=INF_REG_EVENT,
    client_data=0x0) at ../../gdb/inf-loop.c:43
#14 0x000000000045d9a3 in handle_target_event (error=0, client_data=0x0)
    at ../../gdb/linux-nat.c:4521
#15 0x0000000000695165 in handle_file_event (file_ptr=0x1330500, ready_mask=1)
    at ../../gdb/event-loop.c:733
#16 0x0000000000695708 in gdb_wait_for_event (block=0)
    at ../../gdb/event-loop.c:859
#17 0x0000000000694588 in gdb_do_one_event () at ../../gdb/event-loop.c:322
#18 0x0000000000816899 in wait_sync_command_done () at ../../gdb/top.c:503
#19 0x0000000000816911 in maybe_wait_sync_command_done (was_sync=0)
    at ../../gdb/top.c:520
#20 0x0000000000816ce5 in execute_command (p=0x7fffffffdfbb "c", from_tty=0)
    at ../../gdb/top.c:632
#21 0x0000000000714416 in catch_command_errors (
    command=0x81692a <execute_command(char const*, int)>,
    arg=0x7fffffffdfb3 "run a b c", from_tty=0) at ../../gdb/main.c:378
#22 0x0000000000715596 in captured_main_1 (context=0x7fffffffd8e0)
    at ../../gdb/main.c:1124
#23 0x00000000007156ab in captured_main (data=0x7fffffffd8e0)
    at ../../gdb/main.c:1145
#24 0x0000000000715782 in gdb_main (args=0x7fffffffd8e0)
    at ../../gdb/main.c:1171
#25 0x000000000041120d in main (argc=10, argv=0x7fffffffd9e8)
    at ../../gdb/gdb.c:32

So it doesn't find the thread to continue when called from inside the
handler.  Whatever should happen here, gdb shouldn't crash.

You are receiving this mail because:
You are on the CC list for the bug.