From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9E10B3858C50; Thu, 8 Feb 2024 12:48:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E10B3858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707396480; bh=eP9KLhML4rwppJvyH+M2UowCoc4R1VaUly4OQsAXuwg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BNkXak0omgz3SmSnRHoPAryYvh14vyPpD1hEt/MKgMWlEiaV/HtIOr2TA960TODDe 9i1hx0Svhku3I7vGEL0fTizAbQzri1Jrrwyp7VzyqVmL4ZbpBUOy9VKkGBhcZzNrbO kxeOjAxGV3pH0upFL7BVBVMSGOzOpi/bx3O8sE0s= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug dap/31354] [gdb/dap] FAIL: gdb.dap/pause.exp: python command failed Date: Thu, 08 Feb 2024 12:47:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: dap X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org 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: 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31354 --- Comment #1 from Tom de Vries --- So, AFAICT the following happens: - dap calls gdb.interrupt to cancel a request - in gdbpy_interrupt, the quit flag is set - at the end of gdbpy_interrupt, the no_python_sigint destructor is called, which calls restore_active_language, during which check_quit_flag is call= ed, followed by set_quit_flag - this calls gdbpy_set_quit_flag, which calls PyErr_SetInterrupt (I'm not sure if that's legal at this point. It's not necessary to hold = the GIL, but we're also in a PyEval_SaveThread context which has set thread state = to null). - the interrupt is caught while executing the python script using PyRun_SimpleFile, throwing a KeyboardInterrupt exception - the KeyboardInterrupt propagates up to PyRun_SimpleFile, where the except= ion is dumped on the output=20 - PyRun_SimpleFile returns -1 because of the KeyboardInterrupt exception, b= ut that's silently ignored by python_run_simple_file The KeyboardInterrupt is intended to propagate all the way up to the python runnable, which would capture the exception and hand it back to the dap thr= ead, but instead it's captured by PyRun_SimpleFile. --=20 You are receiving this mail because: You are on the CC list for the bug.=