From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id VLfOL3QASGjuOQgAWB0awg (envelope-from ) for ; Tue, 10 Jun 2025 05:52:52 -0400 Received: by simark.ca (Postfix, from userid 112) id AFF141E11C; Tue, 10 Jun 2025 05:52:52 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.0 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 D6CE41E089 for ; Tue, 10 Jun 2025 05:52:51 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 54642382C083 for ; Tue, 10 Jun 2025 09:52:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 54642382C083 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by sourceware.org (Postfix) with ESMTPS id 8A083382C085 for ; Tue, 10 Jun 2025 09:51:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8A083382C085 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8A083382C085 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.128.47 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1749549089; cv=none; b=sW2/JYjaFqCB4yrAvPBnmFnQZUCHsCXCJQIB87LpSjD6Ub5E5VkI9OEUTcyVCprlwipDZYybU5jOkfjCkKI6Xlv5ExnU3O/EuR4rENT+DGVHE24iCnKxHEl+pb0LOnpeXjnBZSvP9/HpoWb4PB1so5Hg/tRriBggORz90S0dOsQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1749549089; c=relaxed/simple; bh=JUyF6ulbTgoau+uZzfck81QpQkIE1z8sL4ID39vqU1Q=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=elbl0+0NpC3tJzltqmMmkgIwQfIh+Tzm2LcudDNlV02IKYRksLoRsaeRAKgrulZvMgtGAZ4MqyupCsXrR/mBU9D/GtrUqailBd3TnAHNWMiOER/7t7jbyVFtx/NtDWntxCKLScNEiWTnUAF/qxKQsBU2923R5qwt3OiHS3JYDJc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8A083382C085 Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-450ccda1a6eso48865065e9.2 for ; Tue, 10 Jun 2025 02:51:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749549088; x=1750153888; h=content-transfer-encoding:in-reply-to:content-language:from :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JThg0MlrNHrzzGGguEjwXSV5intaPgyoVWSFITaPz9U=; b=NkgsyR56fzEW8WZHtRiXScRBx6wH98McAgQMAUJg+jphm2X2D+pCHBsrpnoEUbPPq+ mEpYz9vW5YqjeNqePpMsEM59NR0mDIh5A2aju4B9hhDyPJ6+p1KKRnAXqVrgMOvtK76H epctaVT8IC+gl1+Ef2irE/8ixn1JGVxLha/tRAOs8XH1IHhc7HzFLrFrBaULz+tcXYdS XpP3Kt6M1iFu2FGkrZTH9uMtitVtFRYSnY+gNpTSo0iu76cqjhI1riIdqvMzphRvPwwL zZWqh0ctjiWsq/hZVdwlvDvd4ofPTEJnHW4tjfx/0WC4qFIL+q7jW79px6hGSNx3edWz 2cUQ== X-Forwarded-Encrypted: i=1; AJvYcCWuZ5KjIlbZ+cgJTZCXQ3UuZf1uRAruWIDoOvYZ19rMsA/ax62slwvB1NDUv6G2pvF6hhwIV4h2ym/M+g==@sourceware.org X-Gm-Message-State: AOJu0YwFWvls+Mme6szTZiP/nPUpWXyLfXHTlRVlm6Qw+Aydx9v46Guf gr+6jNR0xorsgyWNvAv2iLDnmgmZhDXaLNZ3wqvHz5lvS/SVpWOWbFXfNUBOKFqQ X-Gm-Gg: ASbGncuuDzMcXeVDLvbzChPDtlt56WLJqjxpK7wQhTh9OWWiTilf47IwuastTjionfC fgU9r3I26VbmNGJO+vUYAj1Nd5JaXDwPhjmiOqaTmMlsyIU+pnnkTPYqX661IA0mp3MwqmaCd3T f+1zmjSNk990deZjpoZeupCSvk5UqquKuz7KEGfmrtaH0bPNPVJMxVTOcUlxadURWd3upClFsnf iBvjeZ0kDep3V43aNV543nEY/9lAq02hrGL3ks+cXvdDAjOhzbVPIC4yLBCmDWw6MkGquxgcpYa +hb2NfYrnCaWN0p1hAkKmtcfCFqboOOkzmjyHqxH40ekuNoNPCBgxqDUmeGKubY1XhQ5vnEZdeQ VFmD71jvb8UuUaey93SFfh7gGkgXVZpxQ2o8f9sQB X-Google-Smtp-Source: AGHT+IH80ZVHnJXSm5gu93l4QeJXoUCeYHrV+k2/ww9Zbmjx1dxffoKbsjELD054rMFqvITG4N68MA== X-Received: by 2002:a05:600c:8581:b0:453:8a6:d8de with SMTP id 5b1f17b1804b1-45308a6dea9mr53906165e9.1.1749549088016; Tue, 10 Jun 2025 02:51:28 -0700 (PDT) Received: from ?IPV6:2001:8a0:facf:2b00:c9f0:e29c:b0c6:fdd7? ([2001:8a0:facf:2b00:c9f0:e29c:b0c6:fdd7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45307b4788fsm86537745e9.21.2025.06.10.02.51.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Jun 2025 02:51:27 -0700 (PDT) Message-ID: <1acf7f91-8e06-40c9-b983-e9f0afd6c58b@palves.net> Date: Tue, 10 Jun 2025 10:51:26 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] [gdb/tdep] Don't call WaitForSingleObject with INFINITE arg To: Tom de Vries , gdb-patches@sourceware.org References: <20250605150330.26246-1-tdevries@suse.de> <15d44b6f-bf37-47a3-a38e-767daa8270ce@palves.net> <30a2d900-1fed-431b-9e85-2fb09593e050@suse.de> From: Pedro Alves Content-Language: en-US In-Reply-To: <30a2d900-1fed-431b-9e85-2fb09593e050@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 On 2025-06-10 08:13, Tom de Vries wrote: > On 6/6/25 15:11, Pedro Alves wrote: >> I've long suspected that this is actually some deadlock bug in Cygwin somewhere around >> closing stdin/stdout, and I still suspect so.  But I can't discard it being a GDB bug. >> > > If cygwin is problematic, I'm happy to ignore it and use one of the other setups. > > I've tried msys2, but also there I run into trouble ( https://sourceware.org/bugzilla/show_bug.cgi?id=33072 ) and I get even less far than on cygwin: starting gdb is a problem because it produces some control characters that the testsuite doesn't expect, and I can't debug it because the gdb executable is missing debug info. That's because when you say "msys2", you're really saying that you tried to test MinGW GDB with MSYS2 DejaGnu. Thing is, MSYS2 _is_ Cygwin. Or rather, it's a Cygwin fork with a few extra patches that make is easier to bridge Cygwin programs and MinGW programs. It's kind of like if they were different Linux distros, but of Cygwin. For my Windows non-stop work, it's important that I test Cygwin GDB, because the Windows native target has special support for some extra Cygwin-only features, like Cygwin signals. > >> I didn't use to have this issue maybe a year ago, then I stopped working on Windows for a >> few months, and when I got back at it, I started seeing the issue.  It's like some Cygwin >> update, or Windows update caused the issue. > > I also wonder whether it's easy to introduce regressions in gdb by testing mingw but not cygwin. We need to test both. For the Windows target backend (windows-nat.c and friends), most of the code is common between Cygwin and MinGW, but there are a few important differences. For example, the support for Cygwin signals just doesn't exist on MinGW, because, well, it's a Cygwin thing. And then, the common code outside windows-nat.c takes different paths (POSIX vs native Windows APIs) in important areas, like Ctrl-C handling, terminal I/O and event loop, to name a few. I'm very much interested in testing mingw GDB too, BTW. That is actually my end goal. > > Anyway, my windows/cygwin setup is fresh.  I bought a windows laptop this spring with windows 11 home, and installed cygwin on it. FWIW, I run Windows on a VM (on Linux/KVM/libvirt). Simon also recently installed Cygwin and didn't see the same issue I see. I'll need to try recreating my setup from scratch, maybe this issue just goes away... > >> The hang is like other hangs I've observed before, it's around closing GDB to restart it >> for more tests, and the patch at: >> >> https://sourceware.org/pipermail/gdb-patches/2025-May/217949.html >> >> still helps with it for me.  With that one on top of yours, and with >> gdb.base/branch-to-self.exp, I get: >> >>   WARNING: closing gdb failed with: child process exited abnormally >> >> (the same as what I get without your patch) and the testcase moves on and >> finishes properly (though a couple tests fail with timeout, as they do for you.) >> > > I've not seen that failure mode sofar, but thanks for the fix, that looks useful. > >> If I look at the task manager while doing a full testsuite run, I see a bunch of leftover >> gdb.exe processes and their children still running, because dejagnu fails to properly >> close gdb.exe. > > I also see other cases of processes left behind.  I've filed this (https://sourceware.org/bugzilla/show_bug.cgi?id=33061 ) for one of those. > > I've also got a patch submitted here ( https://patchwork.sourceware.org/project/gdb/patch/20250217163619.8662-3-tdevries@suse.de/ ) for another case. > Thanks, I hadn't seen it. Pedro Alves