From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id J+ECHV/5+WnH3RYAWB0awg (envelope-from ) for ; Tue, 05 May 2026 10:06:23 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=LoyYjgla; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 636E81E067; Tue, 05 May 2026 10:06:23 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id CE9A11E067 for ; Tue, 05 May 2026 10:06:22 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 3F7D84BA79AE for ; Tue, 5 May 2026 14:06:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3F7D84BA79AE Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=LoyYjgla Received: from omta038.useast.a.cloudfilter.net (omta038.useast.a.cloudfilter.net [44.202.169.37]) by sourceware.org (Postfix) with ESMTPS id D2E104BA23DF for ; Tue, 5 May 2026 14:05:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D2E104BA23DF Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D2E104BA23DF Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777989947; cv=none; b=mRxVDrU7h+hluNtB0oziBc0lnBdQd8if3JbcjRDYvWXev4JU/pjW3sJ1iOYBy0/Dh3I5Xg8d7SWO24rnzMw+uYYkIiN4KOBjqNbOmfVcgPD0P5bbJNHUpbncizyJEmGNWhTF+GlBCur4Alot3WFudmA6XMtruIn3MYENgBSBzl0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777989947; c=relaxed/simple; bh=9n0j5w8u64oTa9bh3VAnKmYg2FyiPZA8ZD142AXvBVY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=I0jQYZcieJDiglfYHOrU898tJiqBadFUs+Q57u8QEKSVBH2aU0KrYfHt6nsRDDHxfsJVf/dK1hRgORQl7ruQ5BVnVVlKZUWOpNIEYh7oAtUuz9duzoCNzuceQrTKxKlcM+EgPtvq3WpkekakECZc7ddhwv1fIMUmpB7EKoBpaHQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D2E104BA23DF Received: from eig-obgw-5003b.ext.cloudfilter.net ([10.0.29.155]) by cmsmtp with ESMTPS id KFCZwOQf0nfzsKGPDw7lVc; Tue, 05 May 2026 14:05:47 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id KGP2wN0iR2utbKGP3wxcfA; Tue, 05 May 2026 14:05:37 +0000 X-Authority-Analysis: v=2.4 cv=K+IiHzWI c=1 sm=1 tr=0 ts=69f9f93b a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=NGcC8JguVDcA:10 a=ItBw4LHWJt0A:10 a=T_Alst9gAAAA:8 a=xEm1P5vO6V1xqn_F2mMA:9 a=DvZ5ixILWSEuw56YIEpp:22 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=RMIHZPvcSdOoKB+tKpod8vsu/BdOX+cXVQ0dZhNqo0U=; b=LoyYjglaS6uaDRM4bzYy3wKfs8 KI3bOMDCKcVP4cTJvQYJ6NpcvzdiKLNqw2KrFxhlkVHTIF5xtq/x6pr16m7H85clzYxnC7acve2jV FSNBVeIvJU1+n+A3K4DN7G65o; Received: from 75-166-225-82.hlrn.qwest.net ([75.166.225.82]:59960 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.99.2) (envelope-from ) id 1wKGP2-00000001oZX-2r6F; Tue, 05 May 2026 08:05:36 -0600 From: Tom Tromey To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Windows gdb: Avoid hang second attach/run In-Reply-To: <20260505121823.1442331-1-pedro@palves.net> (Pedro Alves's message of "Tue, 5 May 2026 13:18:23 +0100") References: <20260505121823.1442331-1-pedro@palves.net> X-Attribution: Tom Date: Tue, 05 May 2026 08:05:33 -0600 Message-ID: <87o6iueytu.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.225.82 X-Source-L: No X-Exim-ID: 1wKGP2-00000001oZX-2r6F X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-225-82.hlrn.qwest.net (bapiya) [75.166.225.82]:59960 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfB2yiZYjMN26iqHUbVKABKPneMzENkDtwphRo3boWUOPlPUXWIQHk3tr1OH8pm7SXi1qj5z5RPCd4zjgRlc/T8S2QXoQjoXi/x/07KqOoDGKdSSkWNsx mybQU5dVY8BBwbhXEQrLhyctttUqbrsV+Amb7b+E5TzHNDLaEKc2+WbDXt2w9lG4LvXy0LzZM3gXC/NoD5G3dby74QGz/XrLY9k= X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org >>>>> "Pedro" == Pedro Alves writes: Pedro> windows_nat_target::attach and windows_nat_target::create_inferior Pedro> both hang in this situation, because they call into do_synchronously, Pedro> which hangs because the 'process_thread' thread is blocked in Pedro> WaitForDebugEvent. Do we need something similar for gdbserver? Pedro> Until the Windows backend is taught to debug multiple processes, which Pedro> will probably require having one process_thread thread per inferior, Pedro> detect the situation and error out before GDB hangs. Yeah. I've never understood why MS did things this way instead of the seemingly obvious approach of having debug events integrated into WaitForMultipleObjects. Pedro> There are still other failures not addressed by this patch. FWIW the internal AdaCore automated testing shows a number of failures after a merge on 20260427. I guess when I did my testing I happened to pick the one particular OS instance that had no problems :( Tom