From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id lvvcKT9ijWEsNAAAWB0awg (envelope-from ) for ; Thu, 11 Nov 2021 13:34:39 -0500 Received: by simark.ca (Postfix, from userid 112) id 9B5971F0BD; Thu, 11 Nov 2021 13:34:39 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_DYNAMIC, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 2FD3A1E813 for ; Thu, 11 Nov 2021 13:34:39 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3B8D4385AC24 for ; Thu, 11 Nov 2021 18:34:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3B8D4385AC24 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1636655678; bh=2Yhe4Jr4w/w6P3GIf7uxd77iinsGvrWtoMvG30RjulE=; 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=Tz72DnLMzRkvQepBFTMOBq/E3KT3WCmatZ3xarlilfSbSUnxwrUvwFqgeYZTBoOhM jLhjsHbBjSyjbcW2LqxbaVvtZd22phHiXCIWcGriV/NUqp9fwzsHwDeOGFpfxkLIsK iJmErxQrwVyya+0xJ8ExfU5k63RVXDzGQArhcv7k= Received: from mail.efficios.com (mail.efficios.com [167.114.26.124]) by sourceware.org (Postfix) with ESMTPS id 30A57385B83B for ; Thu, 11 Nov 2021 18:34:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 30A57385B83B Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 6C00D39A4B2; Thu, 11 Nov 2021 13:33:59 -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 7C5TlIweSV-d; Thu, 11 Nov 2021 13:33:59 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id E3E8E39A4AD; Thu, 11 Nov 2021 13:33:58 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com E3E8E39A4AD 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 wp6MvsHE0Lz5; Thu, 11 Nov 2021 13:33:58 -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 B5D4239A806; Thu, 11 Nov 2021 13:33:58 -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> Message-ID: <72158f21-42e1-6726-a311-207677da75af@efficios.com> Date: Thu, 11 Nov 2021 13:33:58 -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: <223ea569-d16b-cfd6-c494-1e4a3349fecf@palves.net> 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 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. Simon