From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D47D13858425; Wed, 21 Feb 2024 09:46:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D47D13858425 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1708508800; bh=Gd1yy+ZYeTj/9FPwViyLQHYfhJ17CPUaR4nUcSfVjAg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Hvj+srJNNge4kqoC9ufLucrbCJb4BaQFwuPMgrKYJGToaz1fxWuOmY63dzNSLO4Gm ej2c2/WwpCTgRijOyyJYHARpqkRHSe42TJbKXOOUhYcy341vaGMpxUl9VsgF5YNPFa lwcSHh+IgA4mgY0rajrZesGCBOLm7oS2uW32xIxU= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug dap/31380] [gdb/dap] Ensure responses are flushed to client before exiting Date: Wed, 21 Feb 2024 09:46:38 +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: cvs-commit 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=3D31380 --- Comment #6 from Sourceware Commits --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D7c34de9efdb1= 3fff482ed0c4de0dffee1e1880f3 commit 7c34de9efdb13fff482ed0c4de0dffee1e1880f3 Author: Tom de Vries Date: Wed Feb 21 10:46:08 2024 +0100 [gdb/dap] Join JSON writer thread with DAP thread The DAP interpreter runs in its own thread, and starts a few threads: - the JSON reader thread, - the JSON writer thread, and - the inferior output reader thread. As part of the DAP shutdown, both the JSON reader thread and the JSON writer thread, as well as the DAP main thread run to exit, but these exits are= not ordered in any way. Wait in the main DAP thread for the exit of the JSON writer thread. This makes sure that the responses are flushed to the DAP client before= DAP shutdown. An earlier version of this patch used Queue.task_done() to accomplish t= he same, but that didn't guarantee writing the ": terminating" log entry from thread_wrapper before DAP shutdown. Tested on aarch64-linux. Approved-By: Tom Tromey PR dap/31380 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31380 --=20 You are receiving this mail because: You are on the CC list for the bug.=