From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 69C083861863; Mon, 19 Feb 2024 08:43:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 69C083861863 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1708332207; bh=AsWiZV1jN0g14RLt2C7ay9Fp8eiV4hWvCpWJiaqB5/I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pM53UaOPcexFnHDLQyfEp2a6auQALeQ6B0xSA9fe6HCS0Sm59PTFicrKObQiqy1DQ 3kxQT3i7s+1OPPDpL3MxIlMao2dcTTsUEZ/pDZah7tRj5tr9t46cRlwnzuL6INT2yp S1d1WKdmBUEmKIiOV2KsiFsA/zQ2UJ20R9JOk2tk= From: "vries 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: Mon, 19 Feb 2024 08:43:26 +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=3D31380 --- Comment #5 from Tom de Vries --- (In reply to Tom Tromey from comment #1) > +dap_check_log_file_re "JSON writer: terminating" >=20 > I suspect the issue is that the writer thread notifies > the queue -- but then the log is written when the thread > actually stops. However, that means there is a race: > gdb may stop before the thread exits. >=20 > I believe that adding a log just before the final > call to task_done in the writer, then checking for this > would work reliably. I've addressed this by waiting in the DAP main thread for the JSON writer thread to exit. This ensures that the "JSON writer: terminating" is in the log. --=20 You are receiving this mail because: You are on the CC list for the bug.=