From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 7u5lBVZpjWFkNQAAWB0awg (envelope-from ) for ; Thu, 11 Nov 2021 14:04:54 -0500 Received: by simark.ca (Postfix, from userid 112) id 047201F0BD; Thu, 11 Nov 2021 14:04:54 -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.8 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, NICE_REPLY_A 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 7CEB81ECEB for ; Thu, 11 Nov 2021 14:04:53 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0593C385AC30 for ; Thu, 11 Nov 2021 19:04:53 +0000 (GMT) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by sourceware.org (Postfix) with ESMTPS id 210633858037 for ; Thu, 11 Nov 2021 19:04:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 210633858037 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f42.google.com with SMTP id d24so11543130wra.0 for ; Thu, 11 Nov 2021 11:04:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=UsMuc3yQlebBxNK+ncMI50kVfsW5BwhCHVpKb4zELB0=; b=Y/VUQWHEUipscp6KYJP3qB+vmZdSSefoL2eHgzr2nLihSQtq1DwjIyJbcnR0ENfJBP IdsyvULVxMGHNLdn7TCmwWs5kDd6UAg8JCXo70jMapCg3f61PG+kafC/W9qnwPvxFlXV 6FZG+Y6ntW0q+9pCj6ImJgT9HZwrLcTsplctUxaiKfXpJZLFh3UlCk8JJlHSiqJ8jACq 7s4mNwCbp55iCQItf3fPrwtZ9NCZDOJFdpJp6uQacwBC8ZpF7u+vtZE4utHMbXWxfvQe UfJEAkGQqAg6IPUWwGFbpnUC4nWbDcjoYfS2JTjzW8MjSlrv5mDOkmm4ALw2DVmz1Hqr cRWQ== X-Gm-Message-State: AOAM531WGDz/zGR9oAWcV+R6JHvnIwdQOQ3vO9Ir8KnMIVkJqOi+PhHs NEG+lTJdMKaTKpWvL98AIsb2rg7e5unWqg== X-Google-Smtp-Source: ABdhPJyiYFb5YsYmYprp6BlTnM5EgIvRyzfF6MbiHbyVSXKfF+CH1kYFAFE2kOMPlU1kmY4zuuyLcw== X-Received: by 2002:a5d:6508:: with SMTP id x8mr11452374wru.388.1636657481112; Thu, 11 Nov 2021 11:04:41 -0800 (PST) Received: from ?IPV6:2001:8a0:f912:1a00:fb57:3faf:e98:b979? ([2001:8a0:f912:1a00:fb57:3faf:e98:b979]) by smtp.gmail.com with ESMTPSA id k27sm10457975wms.41.2021.11.11.11.04.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Nov 2021 11:04:40 -0800 (PST) Message-ID: Date: Thu, 11 Nov 2021 19:04:39 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [PATCH] gdb: fix "set scheduler-locking" thread exit hang Content-Language: en-US To: Simon Marchi , 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> From: Pedro Alves In-Reply-To: <72158f21-42e1-6726-a311-207677da75af@efficios.com> Content-Type: text/plain; charset=UTF-8 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: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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.