Bug 17174 - infrun.c:4400: internal-error: process_event_stop_test: Assertion `ecs->event_thread->control.exception_resume_breakpoint != NULL' failed.
Summary: infrun.c:4400: internal-error: process_event_stop_test: Assertion `ecs->event...
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: breakpoints (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: 17175
  Show dependency treegraph
 
Reported: 2014-07-18 11:08 UTC by Jan Kratochvil
Modified: 2020-11-09 12:12 UTC (History)
3 users (show)

See Also:
Host: x86_64-linux-gnu
Target: x86_64-linux-gnu
Build:
Last reconfirmed:
Project(s) to access:
ssh public key:


Attachments
Log of my gdb session when the bug occurred (782 bytes, text/x-log)
2018-06-15 08:03 UTC, Vincent Belaïche
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kratochvil 2014-07-18 11:08:54 UTC
i=0;while runtest gdb.threads/multiple-step-overs.exp;do i=$[$i+1];echo ------------------------------$i;done

infrun: BPSTAT_WHAT_CLEAR_LONGJMP_RESUME
infrun.c:4400: internal-error: process_event_stop_test: Assertion `ecs->event_thread->control.exception_resume_breakpoint != NULL' failed.

At about 1st to 4th run.

It happens already on the first check-in of this testcase:
  99619beac6252113fed212fdb9e1ab97bface423
It still happens on current FSF GDB trunk:
  fe1873d01904620c71a309249c0ae029e53ae0b6
Comment 1 Jan Kratochvil 2015-01-08 20:52:37 UTC
The same internal-error rarely happens also for:

 - I see it only on Fedora-patched GDB so I cannot confirm now it is not regressed by some Fedora patch.
 - Currently I no longer have Comment 0 reproducible on FSF GDB.

http://pkgs.fedoraproject.org/cgit/gdb.git/tree/gdb-simultaneous-step-resume-breakpoint-test.patch

(gdb) PASS: gdb.threads/simultaneous-step-resume-breakpoint.exp: step thread 1
step^M
40        if (errno != 0)       /* sleep-after */^M
(gdb) FAIL: gdb.threads/simultaneous-step-resume-breakpoint.exp: step thread 2
step^M
[New Thread 0x7ffff62d4700 (LWP 10552)]^M
../../gdb/infrun.c:4740: internal-error: process_event_stop_test: Assertion `ecs->event_thread->control.exception_resume_breakpoint != NULL' failed.^M
A problem internal to GDB has been detected,^M
further debugging may prove unreliable.^M
Quit this debugging session? (y or n) FAIL: gdb.threads/simultaneous-step-resume-breakpoint.exp: step thread 3 (GDB internal error)
Comment 2 Jan Kratochvil 2015-01-08 20:54:06 UTC
Comment 1 happened with: gdb-7.8.50.20150108.tar.xz
Comment 3 Vincent Belaïche 2018-06-15 08:03:19 UTC
Created attachment 11070 [details]
Log of my gdb session when the bug occurred
Comment 4 Vincent Belaïche 2018-06-15 08:06:33 UTC
Hello,
I got something similar, I attached the log of my session.
It made a core dump, but I don't know where to find the cure-dump file.

I am running gdb on a VirutalBox Linux VM running on a MACOS X 10.13.2

Here is my gdb version information:

$ gdb --version
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Comment 5 Vincent Belaïche 2018-06-15 08:25:56 UTC
One more word: I can reproduce the bug,so please feel free to ask me for help in understanding what happened.
Comment 6 Ákos Szőts 2020-11-09 12:12:23 UTC
Can be reproduced with GDB 9.2.

Error message in this version:
../../gdb/infrun.c:6068: internal-error: void process_event_stop_test(execution_control_state*): Assertion `ecs->event_thread->control.exception_resume_breakpoint != NULL' failed.

Backtrace:

#0  0x00007fddc08d2a37 in __GI___poll (fds=0x56496d68d930, nfds=4, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x0000564968c6fe5f in poll (__timeout=-1, __nfds=<optimized out>, __fds=<optimized out>) at /usr/include/bits/poll2.h:46
#2  gdb_wait_for_event (block=1) at ../../gdb/event-loop.c:769
#3  gdb_wait_for_event (block=block@entry=1) at ../../gdb/event-loop.c:744
#4  0x0000564968c732d4 in gdb_do_one_event () at ../../gdb/event-loop.c:346
#5  gdb_do_one_event () at ../../gdb/event-loop.c:294
#6  0x0000564968eb1007 in gdb_readline_wrapper (prompt=<optimized out>) at ../../gdb/top.c:1076
#7  0x0000564968ed6508 in defaulted_query(const char *, char, typedef __va_list_tag __va_list_tag *) (ctlstr=<optimized out>, defchar=0 '\000', args=<optimized out>) at /usr/include/c++/10/bits/basic_string.h:2299
#8  0x0000564968ed68ab in query (ctlstr=<optimized out>) at ../../gdb/utils.c:966
#9  0x0000564968ed6ebe in internal_vproblem(internal_problem *, const char *, int, const char *, typedef __va_list_tag __va_list_tag *) (problem=0x56496952b940 <_ZL22internal_error_problem.lto_priv.0>, file=<optimized out>, line=6068,
    fmt=<optimized out>, ap=<optimized out>) at /usr/include/c++/10/bits/basic_string.h:2299
#10 0x0000564968c96bea in internal_verror (ap=0x7ffe369c08b0, fmt=0x5649690cb083 "%s: Assertion `%s' failed.", line=<optimized out>, file=<optimized out>) at ../../gdb/utils.c:445
#11 internal_error (file=<optimized out>, line=<optimized out>, fmt=0x5649690cb083 "%s: Assertion `%s' failed.") at ../../gdb/gdbsupport/errors.c:55
#12 0x0000564968ce86ae in process_event_stop_test (ecs=0x7ffe369c0e80) at ../../gdb/gdbarch.c:2531
#13 0x0000564968ceb85a in handle_inferior_event (ecs=<optimized out>) at ../../gdb/infrun.c:5154
#14 0x0000564969091f09 in fetch_inferior_event(void*) [clone .constprop.0] (client_data=<optimized out>) at ../../gdb/infrun.c:3743
#15 0x0000564968c6fde6 in gdb_wait_for_event (block=0) at ../../gdb/event-loop.c:857
#16 gdb_wait_for_event (block=block@entry=0) at ../../gdb/event-loop.c:744
#17 0x0000564968c7329f in gdb_do_one_event () at ../../gdb/event-loop.c:321
#18 gdb_do_one_event () at ../../gdb/event-loop.c:294
#19 0x0000564968d26f35 in start_event_loop () at ../../gdb/event-loop.c:370
#20 captured_command_loop () at ../../gdb/main.c:359
#21 0x0000564968b072b5 in captured_main (data=0x7ffe369c0fe0) at ../../gdb/main.c:1259
#22 gdb_main (args=0x7ffe369c0fe0) at ../../gdb/main.c:1263
#23 main (argc=<optimized out>, argv=<optimized out>) at ../../gdb/gdb.c:40

Full bt before frame 12:

#12 0x0000564968ce86ae in process_event_stop_test (ecs=0x7ffe369c0e80) at ../../gdb/gdbarch.c:2531
        init_frame = <optimized out>
        current_id = <optimized out>
        stop_pc_sal = <optimized out>
        frame = 0x56496a0dac90
        gdbarch = 0x56496a002c00
        jmp_buf_pc = 140729814617728
        what = {main_action = <optimized out>, call_dummy = STOP_NONE, is_longjmp = false}
        __PRETTY_FUNCTION__ = <optimized out>
#13 0x0000564968ceb85a in handle_inferior_event (ecs=<optimized out>) at ../../gdb/infrun.c:5154
        free_values = {m_value = 0x56496fee8f00}
        stop_soon = <optimized out>
#14 0x0000564969091f09 in fetch_inferior_event(void*) [clone .constprop.0] (client_data=<optimized out>) at ../../gdb/infrun.c:3743
        maybe_restore_traceframe = <optimized out>
        maybe_restore_thread = {{m_dummy = {<No data fields>}, m_item = {m_thread = 0x0, m_inf = 0x0, m_selected_frame_id = {stack_addr = 0, code_addr = 0, special_addr = 0, stack_status = FID_STACK_INVALID, code_addr_p = 0, 
                special_addr_p = 0, artificial_depth = 0}, m_selected_frame_level = 0, m_was_stopped = false}}, m_instantiated = false}
--Type <RET> for more, q to quit, c to continue without paging--c
        save_exec_dir = <optimized out>
        finish_ptid = <optimized out>
        defer_delete_threads = {<scope_exit_base<scope_exit<void (*)()> >> = {m_released = false}, m_exit_function = 0x564968cd9090 <delete_just_stopped_threads_infrun_breakpoints()>}
        scope_exit_3690 = <optimized out>
        finish_state = {<scope_exit_base<detail::forward_scope_exit<void(ptid_t), finish_thread_state, void(ptid_t)> >> = {m_released = false}, m_bind_function = {<std::_Weak_result_type<void (*)(ptid_t)>> = {<std::_Weak_result_type_memfun<void (*)(ptid_t), false>> = {<std::_Weak_result_type_impl<void (*)(ptid_t)>> = {<No data fields>}, <No data fields>}, <No data fields>}, _M_f = 0x564968ea63b0 <finish_thread_state(ptid_t)>, _M_bound_args = std::tuple containing = {[1] = {m_pid = 12999, m_lwp = 12999, m_tid = 0}}}}
        defer_bpstat_clear = {<scope_exit_base<scope_exit<void (*)()> >> = {m_released = false}, m_exit_function = 0x564968b7d5f0 <bpstat_clear_actions()>}
        ecss = {ptid = {m_pid = 12999, m_lwp = 12999, m_tid = 0}, event_thread = 0x56496a9c3290, ws = {kind = TARGET_WAITKIND_STOPPED, value = {integer = 5, sig = GDB_SIGNAL_TRAP, related_pid = {m_pid = 5, m_lwp = 0, m_tid = 0}, execd_pathname = 0x5 <error: Cannot access memory at address 0x5>, syscall_number = 5}}, stop_func_filled_in = 0, stop_func_start = 0, stop_func_end = 0, stop_func_name = 0x0, wait_some_more = 0, hit_singlestep_breakpoint = 0}
        ecs = 0x7ffe369c0e80
        cmd_done = 0
        waiton_ptid = {m_pid = -1, m_lwp = 0, m_tid = 0}
        save_ui = <optimized out>
#15 0x0000564968c6fde6 in gdb_wait_for_event (block=0) at ../../gdb/event-loop.c:857
        i = <optimized out>
        mask = <optimized out>
        file_ptr = <optimized out>
        num_found = <optimized out>
        file_ptr = <optimized out>
        num_found = <optimized out>
        __PRETTY_FUNCTION__ = <optimized out>
        timeout = <optimized out>
        select_timeout = <optimized out>
        timeout_p = <optimized out>
        __d0 = <optimized out>
        __d1 = <optimized out>
        __d0 = <optimized out>
        __d1 = <optimized out>
        __d0 = <optimized out>
        __d1 = <optimized out>
        i = <optimized out>
        mask = <optimized out>
        mask = <optimized out>
        __d = <optimized out>
        __d = <optimized out>
        __d = <optimized out>
#16 gdb_wait_for_event (block=block@entry=0) at ../../gdb/event-loop.c:744
        file_ptr = <optimized out>
        num_found = <optimized out>
        __PRETTY_FUNCTION__ = <optimized out>
        timeout = <optimized out>
        select_timeout = <optimized out>
        timeout_p = <optimized out>
        __d0 = <optimized out>
        __d1 = <optimized out>
        __d0 = <optimized out>
        __d1 = <optimized out>
        __d0 = <optimized out>
        __d1 = <optimized out>
        i = <optimized out>
        mask = <optimized out>
        mask = <optimized out>
        __d = <optimized out>
        __d = <optimized out>
        __d = <optimized out>
#17 0x0000564968c7329f in gdb_do_one_event () at ../../gdb/event-loop.c:321
        res = <optimized out>
        number_of_sources = <optimized out>
        current = 2
        event_source_head = <optimized out>
        number_of_sources = <optimized out>
        current = <optimized out>
        res = <optimized out>
#18 gdb_do_one_event () at ../../gdb/event-loop.c:294
        event_source_head = 1
        res = <optimized out>
#19 0x0000564968d26f35 in start_event_loop () at ../../gdb/event-loop.c:370
        result = 0
#20 captured_command_loop () at ../../gdb/main.c:359
        ui = 0x5649695d0e00
#21 0x0000564968b072b5 in captured_main (data=0x7ffe369c0fe0) at ../../gdb/main.c:1259
        context = 0x7ffe369c0fe0
        context = <optimized out>
        ex = <optimized out>
#22 gdb_main (args=0x7ffe369c0fe0) at ../../gdb/main.c:1263
No locals.
#23 main (argc=<optimized out>, argv=<optimized out>) at ../../gdb/gdb.c:40
        args = {argc = 2, argv = 0x7ffe369c1108, interpreter_p = 0x5649690cb004 "console"}