From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 57931386186A; Mon, 10 May 2021 19:24:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 57931386186A From: "andrew.burgess at embecosm dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/27830] Attempt to resume already running thread Date: Mon, 10 May 2021 19:24:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: andrew.burgess at embecosm dot com X-Bugzilla-Status: NEW 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: attachments.created Message-ID: In-Reply-To: References: 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2021 19:24:27 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27830 --- Comment #3 from Andrew Burgess --- Created attachment 13432 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D13432&action=3Ded= it testsuite patch Of course, once I realised that what we have is a thread that manages to be running when it shouldn't be, then it's easy enough to get GDB to trigger an assertion like this: internal-error: int finish_step_over(execution_control_state*): Assertion `ecs->event_thread->control.trap_expected' failed. What's happening here is the new thread, the thread that GDB isn't expectin= g to be running, is hitting a stop event. The thread then ends up inside finish_step_over, where we make some assertions about the state of the thre= ad that we expect to stop. As the thread that actually stops is not the one we expect, things go wrong and we hit the assertion. The attached patch adds a new testcase that exposes this issue (on x86-64/Linux). --=20 You are receiving this mail because: You are on the CC list for the bug.=