From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Vlq/Ci7bR2hhGggAWB0awg (envelope-from ) for ; Tue, 10 Jun 2025 03:13:50 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=lTPstZIb; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=HWtK/zOn; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=lTPstZIb; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=HWtK/zOn; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 15B2E1E11C; Tue, 10 Jun 2025 03:13:50 -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.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 09F011E089 for ; Tue, 10 Jun 2025 03:13:49 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 93F5E386EC22 for ; Tue, 10 Jun 2025 07:13:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 93F5E386EC22 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=lTPstZIb; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=HWtK/zOn; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=lTPstZIb; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=HWtK/zOn Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by sourceware.org (Postfix) with ESMTPS id 3840A3858CD1 for ; Tue, 10 Jun 2025 07:13:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3840A3858CD1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3840A3858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1749539595; cv=none; b=x7L0sTr+gKsgCL5Q6bdpqCXDj1hcmXx9InFsN65aUsuvedziy+KQGql8IwGiQ+EKsDkiARxdiKLBqKvj46fovMBT4rpeHV4OWKeuDfiH9TsnJBrHcfG0qStHuf9GVO/Xv6hmNUm1wJJYOABhP4dLB6iDzobkr6VNnHrZE83R11k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1749539595; c=relaxed/simple; bh=3FEJRYVxVOVbV8elRc0VC9hFsmS5Ps71L4pkBAkQtoA=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=SFs6DmhiD2WuoqP3p1FIfKIMs/8f98XRLtV1pGMEZTWbNHYnGSuU+GbhbvZLGFayF0yC99EkbawaD7YmrqiyZbhqo+8zIOJ64wnEpUSmarL2Jhg+9J/DxNkRYWXC/IVGuH6yb46mKOmaA6+R+0qt2wr2z/2jxsSh9Z3Dw/jz9tk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3840A3858CD1 Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id B6A4C21259; Tue, 10 Jun 2025 07:13:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1749539593; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FVqYW4iNj5Ei2Qoa1ndpsY+puep/RG0SpHfqlTsPZlE=; b=lTPstZIbZcENV/rb6jjYKApw/WPZebS6QUjPwdza5KNpJuTdMhk3QqBRtH7QmIopDBBsI8 InMX4DTSQZxavuH2qTtMRTk3zyzbCd5YHP4RCryWgpXfKDfu0MH8oLXrUrUTG55WbUSFM6 IjUwvqCwi5yKeZtaYlP+zJxVA9BvTOg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1749539593; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FVqYW4iNj5Ei2Qoa1ndpsY+puep/RG0SpHfqlTsPZlE=; b=HWtK/zOnnh2IZvcgCNror2IGMjOSrza/udJ1UPuuLfuhJ/QEJlIGhhOd7xE6VyFr48rQeQ DFARFcueHlsryRCg== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1749539593; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FVqYW4iNj5Ei2Qoa1ndpsY+puep/RG0SpHfqlTsPZlE=; b=lTPstZIbZcENV/rb6jjYKApw/WPZebS6QUjPwdza5KNpJuTdMhk3QqBRtH7QmIopDBBsI8 InMX4DTSQZxavuH2qTtMRTk3zyzbCd5YHP4RCryWgpXfKDfu0MH8oLXrUrUTG55WbUSFM6 IjUwvqCwi5yKeZtaYlP+zJxVA9BvTOg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1749539593; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FVqYW4iNj5Ei2Qoa1ndpsY+puep/RG0SpHfqlTsPZlE=; b=HWtK/zOnnh2IZvcgCNror2IGMjOSrza/udJ1UPuuLfuhJ/QEJlIGhhOd7xE6VyFr48rQeQ DFARFcueHlsryRCg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 9EC3513964; Tue, 10 Jun 2025 07:13:13 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id cIo/JQnbR2hjfgAAD6G6ig (envelope-from ); Tue, 10 Jun 2025 07:13:13 +0000 Message-ID: <30a2d900-1fed-431b-9e85-2fb09593e050@suse.de> Date: Tue, 10 Jun 2025 09:13:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] [gdb/tdep] Don't call WaitForSingleObject with INFINITE arg To: Pedro Alves , gdb-patches@sourceware.org References: <20250605150330.26246-1-tdevries@suse.de> <15d44b6f-bf37-47a3-a38e-767daa8270ce@palves.net> Content-Language: en-US From: Tom de Vries In-Reply-To: <15d44b6f-bf37-47a3-a38e-767daa8270ce@palves.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,sourceware.org:url] 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 6/6/25 15:11, Pedro Alves wrote: > On 2025-06-05 17:15, Pedro Alves wrote: >>> However, testsuite progress ground to a halt at >>> gdb.base/branch-to-self.exp. [ AFAICT, similar problems reported >>> here [1]. ] >> The testsuite fails to kill gdb all the time for me, it may well be >> the same. I'll give it a try after you've merged it. >> > > I tested this now, and, unfortunately, it makes no difference for me. Hi Pedro, that's a pity. FWIW, I've rebuild gdb from scratch, this time with -O0, ran the test-case 10 times, and it finished every time. > With upstream from before your patch, and I do see a gdb.base/branch-to-self.exp hang. > > However, after your patch, I still see the same hang. > > If I attach another GDB to the hung GDB, I see several other GDB threads stopped in > WaitForMultipleObjects with an INFINITE argument, in Cygwin code, so I'm puzzled on > how changing that particular call made a difference for you. :-/ Wonder if it's just > a happy coincidence of affecting the scheduling. > Could be, I'm not sure. FWIW, I've now managed to run the testsuite until gdb.base.sigterm.exp, and it's stuck there. > 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. > 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. Anyway, my windows/cygwin setup is fresh. I bought a windows laptop this spring with windows 11 home, and installed cygwin on it. > 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, - Tom