From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B04303858298; Mon, 5 Feb 2024 16:24:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B04303858298 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707150254; bh=9R96XtCHRrObgvBkmFFurrAM9AuEHzk1+q8O9TcHJxA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vDYesZUOJJhWkTkwdJKjYPP14hoZRlL4mBX+s7ThAJ0f3HLy1PdPbXs8U3rvXhkuz ZcS7LRE83Zfa4tIv6MU3+MaHB7KYzNxk0KqZIRAxwc9bsN2q+NdCzJpgEubtOG4Wsw fNv/ikz3U8vElIq/AtmOeHwCmxEBOCoS+mukLVDM= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug dap/31306] [gdb/dap] segfault in new_threadstate during gdb.dap/eof.exp Date: Mon, 05 Feb 2024 16:24:13 +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=3D31306 --- Comment #6 from Tom de Vries --- (In reply to Tom Tromey from comment #4) > (In reply to Tom de Vries from comment #2) > > Could be a dup or PR31172. The tentative patch posted there makes this= PR > > less likely to occur, but it still does. Which almost looks like a run= nable > > was posted while quitting. >=20 > Could it be the runnable that is posted to cause the quit? > io.py does: >=20 > if obj is None: > # This is an exit request. The stream is already > # flushed, so all that's left to do is request an > # exit. > send_gdb("quit") > break Thanks for the hint. I think there's a race between: - a SIGHUP, and - send_gdb("quit") So, with clean sources, we have: - gdb receives a SIGHUP, calls quit_force - at that point, runnables contains quit in a python wrapper - python is finalized, so the python global interpreter lock is no longer available - runnables is destroyed, which trigger the destruction of a gdbpy_event, w= hich requires the python global interpreter lock - segfault when trying to acquire the no longer availabe python global interpreter lock --=20 You are receiving this mail because: You are on the CC list for the bug.=