From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CE6BE3857BB2; Wed, 12 Jul 2023 09:17:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CE6BE3857BB2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1689153423; bh=W32vBQgYc8vnQuvSbziKM3VAvYmEnmZkZW3Loee5y8Q=; h=From:To:Subject:Date:From; b=y6JXtLtwYyX8GmA5RnDB2oW7+6qew6HXW/yr7nPaTqVY2+YEw4vYMZCUG70vtmvPj zq20lwSoP8BD80fuXG0ZCTG34FgAVRn0iK8+2x+xBnHpTZ65TsFdtK6EonOWELeH/3 r8TH8BN2CWfU2CZSME4eAWsTDBk77hkFCib4XzLk= From: "christian.prochaska@genode-labs.com" To: gdb-prs@sourceware.org Subject: [Bug gdb/30630] New: remote.c:8352: internal-error: wait: Assertion `!async_event_handler_marked (rs->remote_async_inferior_event_token)' failed. Date: Wed, 12 Jul 2023 09:16:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: christian.prochaska@genode-labs.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30630 Bug ID: 30630 Summary: remote.c:8352: internal-error: wait: Assertion `!async_event_handler_marked (rs->remote_async_inferior_event_token)' failed. Product: gdb Version: unknown Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: christian.prochaska@genode-labs.com Target Milestone: --- I got this error while working on a custom GDB stub which sends two initial stop replies and could reproduce it with gdbserver with the following test: #include #include #include void *thread_func(void *) { sleep(1000); } int main() { printf("pid: %u\n", getpid()); pthread_t t; pthread_create(&t, 0, thread_func, 0); pthread_join(t, 0); return 0; } --- $ ./test=20 pid: 13129 ^Z [1]+ Stopped ./test $ ./gdbserver --attach :5555 13129 & [2] 13578 $ Attached; pid =3D 13129 Listening on port 5555 $ ./gdb -ex "set non-stop on" -ex "target extended-remote :5555" GNU gdb (GDB) 13.2 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later 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-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word". Remote debugging using :5555 Remote debugging from host 127.0.0.1, port 59942 Reading /.../test from remote target... warning: File transfers from remote targets can be slow. Use "set sysroot" = to access files locally instead. Reading /.../test from remote target... Reading symbols from target:/.../test... ../../gdb-13.2/gdb/remote.c:8352: internal-error: wait: Assertion `!async_event_handler_marked (rs->remote_async_inferior_event_token)' faile= d. A problem internal to GDB has been detected, further debugging may prove unreliable. ----- Backtrace ----- 0x55e67dce9cbb gdb_internal_backtrace_1 ../../gdb-13.2/gdb/bt-utils.c:122 0x55e67dce9cbb _Z22gdb_internal_backtracev ../../gdb-13.2/gdb/bt-utils.c:168 0x55e67e09ea1c internal_vproblem ../../gdb-13.2/gdb/utils.c:396 0x55e67e09ec3a _Z15internal_verrorPKciS0_P13__va_list_tag ../../gdb-13.2/gdb/utils.c:476 0x55e67e1e787e _Z18internal_error_locPKciS0_z ../../gdb-13.2/gdbsupport/errors.cc:58 0x55e67dfaac74 _ZN13remote_target4waitE6ptid_tP17target_waitstatus10enum_flagsI16target_wa= it_flagE ../../gdb-13.2/gdb/remote.c:8351 0x55e67e04cb78 _Z11target_wait6ptid_tP17target_waitstatus10enum_flagsI16target_wait_flagE ../../gdb-13.2/gdb/target.c:2579 0x55e67dfa2e18 _ZN13remote_target28process_initial_stop_repliesEi ../../gdb-13.2/gdb/remote.c:4579 0x55e67dfacfe6 _ZN13remote_target14start_remote_1Eii ../../gdb-13.2/gdb/remote.c:5020 0x55e67dfad668 _ZN13remote_target12start_remoteEii ../../gdb-13.2/gdb/remote.c:5072 0x55e67dfad668 _ZN13remote_target6open_1EPKcii ../../gdb-13.2/gdb/remote.c:5875 0x55e67e04d211 open_target ../../gdb-13.2/gdb/target.c:853 0x55e67dd1e0bf _Z8cmd_funcP16cmd_list_elementPKci ../../gdb-13.2/gdb/cli/cli-decode.c:2543 0x55e67e05cfcd _Z15execute_commandPKci ../../gdb-13.2/gdb/top.c:690 0x55e67defca94 catch_command_errors ../../gdb-13.2/gdb/main.c:513 0x55e67defcbb0 execute_cmdargs ../../gdb-13.2/gdb/main.c:608 0x55e67defe31b captured_main_1 ../../gdb-13.2/gdb/main.c:1299 0x55e67defefca captured_main ../../gdb-13.2/gdb/main.c:1320 0x55e67defefca _Z8gdb_mainP18captured_main_args ../../gdb-13.2/gdb/main.c:1345 0x55e67dc2850a main ../../gdb-13.2/gdb/gdb.c:32 --------------------- ../../gdb-13.2/gdb/remote.c:8352: internal-error: wait: Assertion `!async_event_handler_marked (rs->remote_async_inferior_event_token)' faile= d. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) Recursive internal problem. Fatal signal: Aborted ----- Backtrace ----- 0x55e67dce9cbb gdb_internal_backtrace_1 ../../gdb-13.2/gdb/bt-utils.c:122 0x55e67dce9cbb _Z22gdb_internal_backtracev ../../gdb-13.2/gdb/bt-utils.c:168 0x55e67de0d98a handle_fatal_signal ../../gdb-13.2/gdb/event-top.c:956 0x7f14ab8f2f0f ??? 0x7f14ab8f2e87 ??? 0x7f14ab8f47f0 ??? 0x55e67dc2611f abort_with_message ../../gdb-13.2/gdb/utils.c:183 0x55e67e09eb2f internal_vproblem ../../gdb-13.2/gdb/utils.c:343 0x55e67e09ec3a _Z15internal_verrorPKciS0_P13__va_list_tag ../../gdb-13.2/gdb/utils.c:476 0x55e67e1e787e _Z18internal_error_locPKciS0_z ../../gdb-13.2/gdbsupport/errors.cc:58 0x55e67dfaac74 _ZN13remote_target4waitE6ptid_tP17target_waitstatus10enum_flagsI16target_wa= it_flagE ../../gdb-13.2/gdb/remote.c:8351 0x55e67e04cb78 _Z11target_wait6ptid_tP17target_waitstatus10enum_flagsI16target_wait_flagE ../../gdb-13.2/gdb/target.c:2579 0x55e67de9be49 do_target_wait_1 ../../gdb-13.2/gdb/infrun.c:3736 0x55e67deae47a operator() ../../gdb-13.2/gdb/infrun.c:3795 0x55e67deae47a do_target_wait ../../gdb-13.2/gdb/infrun.c:3814 0x55e67deae47a _Z20fetch_inferior_eventv ../../gdb-13.2/gdb/infrun.c:4172 0x55e67dca3ac0 _Z26check_async_event_handlersv ../../gdb-13.2/gdb/async-event.c:337 0x55e67e1e8a9c _Z16gdb_do_one_eventi ../../gdb-13.2/gdbsupport/event-loop.cc:221 0x55e67e05a3c0 _Z20gdb_readline_wrapperPKc ../../gdb-13.2/gdb/top.c:1173 0x55e67e09de5e defaulted_query ../../gdb-13.2/gdb/utils.c:924 0x55e67e09e19a _Z5queryPKcz ../../gdb-13.2/gdb/utils.c:1016 0x55e67e09eaef internal_vproblem ../../gdb-13.2/gdb/utils.c:407 0x55e67e09ec3a _Z15internal_verrorPKciS0_P13__va_list_tag ../../gdb-13.2/gdb/utils.c:476 0x55e67e1e787e _Z18internal_error_locPKciS0_z ../../gdb-13.2/gdbsupport/errors.cc:58 0x55e67dfaac74 _ZN13remote_target4waitE6ptid_tP17target_waitstatus10enum_flagsI16target_wa= it_flagE ../../gdb-13.2/gdb/remote.c:8351 0x55e67e04cb78 _Z11target_wait6ptid_tP17target_waitstatus10enum_flagsI16target_wait_flagE ../../gdb-13.2/gdb/target.c:2579 0x55e67dfa2e18 _ZN13remote_target28process_initial_stop_repliesEi ../../gdb-13.2/gdb/remote.c:4579 0x55e67dfacfe6 _ZN13remote_target14start_remote_1Eii ../../gdb-13.2/gdb/remote.c:5020 0x55e67dfad668 _ZN13remote_target12start_remoteEii ../../gdb-13.2/gdb/remote.c:5072 0x55e67dfad668 _ZN13remote_target6open_1EPKcii ../../gdb-13.2/gdb/remote.c:5875 0x55e67e04d211 open_target ../../gdb-13.2/gdb/target.c:853 0x55e67dd1e0bf _Z8cmd_funcP16cmd_list_elementPKci ../../gdb-13.2/gdb/cli/cli-decode.c:2543 0x55e67e05cfcd _Z15execute_commandPKci ../../gdb-13.2/gdb/top.c:690 0x55e67defca94 catch_command_errors ../../gdb-13.2/gdb/main.c:513 0x55e67defcbb0 execute_cmdargs ../../gdb-13.2/gdb/main.c:608 0x55e67defe31b captured_main_1 ../../gdb-13.2/gdb/main.c:1299 0x55e67defefca captured_main ../../gdb-13.2/gdb/main.c:1320 0x55e67defefca _Z8gdb_mainP18captured_main_args ../../gdb-13.2/gdb/main.c:1345 0x55e67dc2850a main ../../gdb-13.2/gdb/gdb.c:32 --------------------- A fatal error internal to GDB has been detected, further debugging is not possible. GDB will now terminate. This is a bug, please report it. For instructions, see: . Remote side has terminated connection. GDBserver will reopen the connectio= n. Listening on port 5555 Aborted (core dumped) --=20 You are receiving this mail because: You are on the CC list for the bug.=