From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id AKPUKJVrjWEbNgAAWB0awg (envelope-from ) for ; Thu, 11 Nov 2021 14:14:29 -0500 Received: by simark.ca (Postfix, from userid 112) id A4E0E1F0BD; Thu, 11 Nov 2021 14:14:29 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 358701ECEB for ; Thu, 11 Nov 2021 14:14:29 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AEB1F385AC3C for ; Thu, 11 Nov 2021 19:14:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AEB1F385AC3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1636658068; bh=4bKEiyyf2JXTkK8ldd6PAy2fl2k8SnELfx2ZyPRWuqY=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=XFuyXABXS+Z9nUEz7oUDLAPAAr9cttQJfFlfb5KW/NPWJaMFQjvvfMjnPh5sNcDSG Z4klEzpJd0dzDd/XfTC0q+907+N7+aUgFiIjXJ5BiC/qkqdvfWIpEomSdIbux7gFgS s21yKL30pl4iYSq6BOjVpAYhGnuGgANG9+TumDuw= Received: from mail.efficios.com (mail.efficios.com [167.114.26.124]) by sourceware.org (Postfix) with ESMTPS id EBBC73858037 for ; Thu, 11 Nov 2021 19:14:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EBBC73858037 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id A622239AFDD; Thu, 11 Nov 2021 14:14:10 -0500 (EST) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id kkHOaSgp-g7o; Thu, 11 Nov 2021 14:14:09 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 90DF039B25F; Thu, 11 Nov 2021 14:14:09 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 90DF039B25F X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id O9LqIccNwzYK; Thu, 11 Nov 2021 14:14:09 -0500 (EST) Received: from [172.16.0.95] (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by mail.efficios.com (Postfix) with ESMTPSA id 6FBDC39AE63; Thu, 11 Nov 2021 14:14:09 -0500 (EST) Subject: Re: [PATCH] gdb: fix "set scheduler-locking" thread exit hang To: Pedro Alves , gdb-patches@sourceware.org References: <20211108214921.373638-1-simon.marchi@efficios.com> <223ea569-d16b-cfd6-c494-1e4a3349fecf@palves.net> <72158f21-42e1-6726-a311-207677da75af@efficios.com> Message-ID: Date: Thu, 11 Nov 2021 14:14:09 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: tl Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2021-11-11 2:04 p.m., Pedro Alves wrote: > On 2021-11-11 18:33, Simon Marchi wrote: >> On 2021-11-11 1:09 p.m., Pedro Alves wrote: >>> On 2021-11-08 21:49, Simon Marchi via Gdb-patches wrote: >>> >>>> The problem is in handle_no_resumed: we check if some other thread is >>>> actually resumed, to see if we should ignore that event (see comments in >>>> that function for more info). If this condition is true: >>>> >>>> (thread->executing () || thread->has_pending_waitstatus ()) >>>> >>>> ... then we ignore the event. The problem is that there are some non-resumed >>>> threads with a pending event, which makes us ignore the event. But these >>>> threads are not resumed, so we end up waiting while nothing executes, hence >>>> waiting for ever. >>> >>> "There are some non-resumed" ... "But these are not resumed". >>> >>> The first "non-resumed" should be "non-executing", I believe. >> >> Hmm, no. These other threads ("other" meaning other than the thread >> resumed under schedlock) are stopped / non-infrun-resumed. > > I see, nevermind, I somehow read "non-resumed" vs "not resumed" as opposites > and then brain shorted out. Sorry. > Np, thanks for the review. I will push the patch. Simon