From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id /+V8CGVnGWZNyywAWB0awg (envelope-from ) for ; Fri, 12 Apr 2024 12:55:01 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=E3b2EcvD; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 0B7411E0C0; Fri, 12 Apr 2024 12:55:01 -0400 (EDT) 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 E0B221E030 for ; Fri, 12 Apr 2024 12:54:58 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0FD3D385843B for ; Fri, 12 Apr 2024 16:54:58 +0000 (GMT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id C47EA3858CDB for ; Fri, 12 Apr 2024 16:54:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C47EA3858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C47EA3858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712940880; cv=none; b=bVHYhUE2QNgyPwB9cCMAV6PAZ+41cXsLa4Wn+pVFlm4fOyFjh4WV/KoPRmO7JQiPGARdsxWDw5i5CCWTCw5FBgGbLnbUeXLbl2b7+MuKUv+o1ap8Pm2AnN00cTPRdjXzY7MVdmhKN3QNRVbEjlqHRFzQt9OnaDTv0V2WNAYWrdw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712940880; c=relaxed/simple; bh=5KXRPvki/PduwobtdLdpd9jfXdCBo5gh1bsrjQlNWf4=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=Q7hMObYTqxRifeH8Bjr2/UAD+tzSaAon4QUO7LlQ8IIf5FLKJxBd93kyWRaqgV95DjW/GAOp5uQJrmY8/lwoSMS4hUzMhP28Irs5q/b7ApePfuRhxhydo0W6MCDhWgzEt4SJf8O+2J87z5Abywa+Zd5lJt15eve5LvnOcoPMroQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712940878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=V0YIGFYqxCumZzPJN6aOl7sU16v5JzjnxdsnVVXR3Yc=; b=E3b2EcvDZfU9wUPp/arh++XgR0pfPRvE7A9ZpHj4awXDKPKGyARp+HhM1etdameUwQx47d OwplfsRohNVBhTJUpE++y+dv7IeDzUpOfEJY2tmIsdlvwagnN0AhxhaLOh3izSjtLjX4j0 s+ybzQOzoMiD7RaCMPqhwZOLernuKH4= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-637-gnwZh8geOLKA4T8SrgwTXg-1; Fri, 12 Apr 2024 12:54:36 -0400 X-MC-Unique: gnwZh8geOLKA4T8SrgwTXg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4137B3C0253E; Fri, 12 Apr 2024 16:54:36 +0000 (UTC) Received: from f39-zbm-amd (unknown [10.22.10.134]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EEE3340AE783; Fri, 12 Apr 2024 16:54:35 +0000 (UTC) Date: Fri, 12 Apr 2024 09:54:34 -0700 From: Kevin Buettner To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Cygwin/testsuite: Avoid infinite hang Message-ID: <20240412095434.1fd41264@f39-zbm-amd> In-Reply-To: <20240412152121.418780-1-pedro@palves.net> References: <20240412152121.418780-1-pedro@palves.net> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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 Fri, 12 Apr 2024 16:21:21 +0100 Pedro Alves wrote: > On Cygwin, the gdb.base/fork-no-detach-follow-child-dlopen.exp > testcase hits a sequence of cascading FAILs: > > (gdb) run > Starting program: ..../gdb.base/fork-no-detach-follow-child-dlopen/fork-no-detach-follow-child-dlopen > [New Thread 12672.0x318c] > [New Thread 12672.0x2844] > [New Thread 12672.0x714] > FAIL: gdb.base/fork-no-detach-follow-child-dlopen.exp: runto: run to add (timeout) > frame > FAIL: gdb.base/fork-no-detach-follow-child-dlopen.exp: frame (timeout) > list > FAIL: gdb.base/fork-no-detach-follow-child-dlopen.exp: list (timeout) > > And the test program never makes progress. > > ... and at this point, Cygwin is completely stuck. I can't run any > other Cygwin program. > > However, if we run the test program outside DejaGnu, we see something > different: > > (gdb) b add > Function "add" not defined. > Make breakpoint pending on future shared library load? (y or [n]) y > Breakpoint 1 (add) pending. > (gdb) r > Starting program: ..../gdb.base/fork-no-detach-follow-child-dlopen/fork-no-detach-follow-child-dlopen > [New Thread 10968.0x834] > [New Thread 10968.0x29a4] > [New Thread 10968.0x16b8] > [New Thread 10968.0xf9c] > [Switching to Thread 10968.0x16b8] > > Thread 4 "sig" hit Breakpoint 1.2, pending_signals::add (pack=..., this=0x7ffa1e748a40 ) at /usr/src/debug/cygwin-3.4.9-1/winsup/cygwin/sigproc.cc:1304 > 1304 se = sigs + pack.si.si_signo; > (gdb) > > Ah, the test wanted to run to a global "add" function, but managed to > stop at an internal Cygwin method called "add". And stopping there > deadlocks everything Cygwin in the system. (I believe some > cygwin1.dll mechanisms use cross-process synchronization or > communication, we're probably blocking something like that.) > > Fix this by using "break -q". The tests FAIL because we don't support > follow-fork for Cygwin, but at least we no longer deadlock the > machine. Thanks for the detailed explanation! Approved-by: Kevin Buettner