From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id nc8LGUQxj2pl6gMAWB0awg (envelope-from ) for ; Wed, 26 Aug 2026 14:32:36 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=m5/o+wA0; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 536321E0A3; Wed, 26 Aug 2026 14:32:36 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::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 6545C1E033 for ; Wed, 26 Aug 2026 14:32:35 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 81A0C4BA2E3B for ; Wed, 26 Aug 2026 18:32:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 81A0C4BA2E3B Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=m5/o+wA0 Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id D8A514BA2E3B for ; Wed, 26 Aug 2026 18:32:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D8A514BA2E3B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D8A514BA2E3B Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787769131; cv=none; b=ccxcC0N7s6HWbxaJLzOB3pttzG84uGmH1uvddfn/BMjQDSCO/30DmdQMC04A7YBsct1dYp6s0zGqPO7a/sXsYDcJYiLlJnWT6VuIvQBifGZ6gJW4Stce7QazJiPfa415XMVzLMeaqgUF6B4KHNv7VXwULmv52lpg06NzZUjJh2c= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787769131; c=relaxed/simple; bh=vcTnowmxRZd1DiguzaqTbVFO73pjvrN5Nz/m73FeGCQ=; h=DKIM-Signature:Date:Message-Id:From:To:Subject; b=J8x83lodFdvo8WA8PVQyzQfI0Lf5ylhpe5aAzbQZkTWH+1MlCvQ6oqfhfoD5xsielw1jVCd2kZH1jj419LVNMpY4bCyZpsymh5D6YPqa2gTyTonIPgOuuIkXIXoV7Q2DA0FW3+WDvqha2ZtW4NiRGzbCYtHl6RCeFNegNYhHYbo= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=m5/o+wA0 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D8A514BA2E3B Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wzIPx-0000nf-7a; Wed, 26 Aug 2026 14:32:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=nwrHN/GBS66e52GaDyuiLzKoztg1D3C2u+0iRQ382oA=; b=m5/o+wA0yzer NzYFxI71fwoyx0jgRnYePUfsjd/W7kFH3ntjoE+3Z0jzsU7/N89Y5xWl0zniC0qSE/Dv8eOrajsjI 3iHzsmEJC9U956L+xeKzC3AgQVJyWz8DXOqKgLXO/QPmNC5uv9KCTkwfcDfB8edba1cPTS8OD1lvy UXqSll7O9X1lti8pYUlSOzwipkaU4YnhcEtL4rl5s7OQzOLX7MGk55HAWDleQfGCUQqG4FhGAkX/Z 4fOy6/8pTBilzRdceNLeefHOayYXHd3bxUqNq4hEi3/Xvjlvqq5oXC1sNZQmxCfYDyIspQE/azGwm Uz6VHZRKAeq54y4nbjXD6Q==; Date: Wed, 26 Aug 2026 21:32:06 +0300 Message-Id: <86ld9sohqx.fsf@gnu.org> From: Eli Zaretskii To: Hannes Domani , Tom Tromey Cc: gdb-patches@sourceware.org In-Reply-To: <20260826182037.757713-1-ssbssa@yahoo.de> (message from Hannes Domani on Wed, 26 Aug 2026 20:20:37 +0200) Subject: Re: [PATCH] Windows gdb: Don't abort get_windows_debug_event with no threads References: <20260826182037.757713-1-ssbssa.ref@yahoo.de> <20260826182037.757713-1-ssbssa@yahoo.de> 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 > From: Hannes Domani > Date: Wed, 26 Aug 2026 20:20:37 +0200 > > When a machine is under heavy load, windows sometimes provides the debug > events in a weird order: > > [windows events] get_windows_debug_event: kernel event for pid=22208 tid=0x6df0 code=CREATE_PROCESS_DEBUG_EVENT > [windows events] get_windows_debug_event: kernel event for pid=22208 tid=0xe74 code=CREATE_THREAD_DEBUG_EVENT > [windows events] get_windows_debug_event: kernel event for pid=22208 tid=0xe74 code=EXIT_THREAD_DEBUG_EVENT > [windows events] get_windows_debug_event: kernel event for pid=22208 tid=0x6df0 code=EXIT_THREAD_DEBUG_EVENT > > At this point the process has seemingly no threads, even though for the last > thread there should be EXIT_PROCESS_DEBUG_EVENT instead of > EXIT_THREAD_DEBUG_EVENT. But the next event shows that a new thread was > created, which then finally got EXIT_PROCESS_DEBUG_EVENT: > > [windows events] get_windows_debug_event: kernel event for pid=22208 tid=0x5a7c code=CREATE_THREAD_DEBUG_EVENT > [windows events] get_windows_debug_event: kernel event for pid=22208 tid=0x5a7c code=EXIT_PROCESS_DEBUG_EVENT > > Since the introduction of non-stop support, gdb fails with this error at > the point of no threads: > > No unwaited-for children left. > > It's because it added this check which prevents getting the next debug > event: > > /* If there are no resumed threads left, bail. */ > if (windows_process->windows_initialization_done > && !any_resumed_thread ()) > { > ourstatus->set_no_resumed (); > return minus_one_ptid; > } > > This fixes it by changing any_resumed_thread to return true if there is > no thread at all. Thanks. Tom, it sounds like this is the root cause of the problem you tried to fix in https://sourceware.org/pipermail/gdb-patches/2026-August/229659.html, no?