From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id RVkdHnlq4mCIUQAAWB0awg (envelope-from ) for ; Sun, 04 Jul 2021 22:12:09 -0400 Received: by simark.ca (Postfix, from userid 112) id 6D34B1F1F2; Sun, 4 Jul 2021 22:12:09 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,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 080381E54D for ; Sun, 4 Jul 2021 22:12:08 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 62D7A385E445 for ; Mon, 5 Jul 2021 02:12:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 62D7A385E445 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1625451127; bh=bqk1yLWIZRjSV/k2NXUkG8ktbTx+Pt/KXA/CEdFp9/s=; 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=V6Q6bLLPnX6HwxhXZIs/JFylbtfaAhWY8HiyoAIhASJ7fszDylpGoY7Kq8AqQK6bq kc6CD3x51W2BjavQmwblH/3gvDLgr/qtLBLwdseVcKPDUcJAwG6SW0khYonB1OYXAb gfjZP0oy5c3cajLOS1DHOCtyuNPzsY3bMF/uEpKg= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id CE64C3857C4E for ; Mon, 5 Jul 2021 02:11:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CE64C3857C4E Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 1652Bema006956 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 4 Jul 2021 22:11:45 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 1652Bema006956 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 5B55B1E54D; Sun, 4 Jul 2021 22:11:40 -0400 (EDT) Subject: Re: [PATCH] was Re: [PATCH 2/3] [delete] Not-so-harmless spurious call to `wait4` To: Dominique Quatravaux , "gdb-patches@sourceware.org" References: <20210408191449.27434-1-dominique.quatravaux@epfl.ch> <20210408191449.27434-2-dominique.quatravaux@epfl.ch> <133F84AF-3B74-47B1-BEA2-830151901ADE@epfl.ch> <15b36e20-0ff0-6678-cce4-65782ed450e7@polymtl.ca> Message-ID: Date: Sun, 4 Jul 2021 22:11:40 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <15b36e20-0ff0-6678-cce4-65782ed450e7@polymtl.ca> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 5 Jul 2021 02:11:40 +0000 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" >> From 5c3756e9eb0342b1a5a23bcb54d5b8317743ce0d Mon Sep 17 00:00:00 2001 >> From: Dominique Quatravaux > >> Date: Thu, 8 Apr 2021 21:35:57 +0200 >> Subject: [PATCH] [delete] not-so-harmless spurious call to `wait4` >> MIME-Version: 1.0 >> Content-Type: text/plain; charset=UTF-8 >> Content-Transfer-Encoding: 8bit >> >> As seen in https://sourceware.org/bugzilla/show_bug.cgi?id=24069 this >> code will typically wait4() a second time on the same process that was >> already wait4()'d a few lines above. While this used to be >> harmless/idempotent (when we assumed that the process already exited), >> this now causes a deadlock in the WIFSTOPPED case. >> >> The early (~2019) history of bug #24069 cautiously suggests to use >> WNOHANG instead of outright deleting the call. However, tests on the >> current version of Darwin (Big Sur) demonstrate that gdb runs just >> fine without a redundant call to wait4(), as would be expected. >> Notwithstanding the debatable value of conserving bug compatibility >> with an OS release that is more than a decade old, there is scant >> evidence of what that double-wait4() was supposed to achieve in the >> first place > > Thanks, this looks good. If we had more contributors for macOS, > especially some that cared about old macOS versions, we could aim at > supporting many versions back. But given the current state, it's > perfectly reasonable to aim at making GDB work well for the latest > version. > > - A cursory investigation with `git blame` pinpoints >> commits bb00b29d7802 and a80b95ba67e2 from the 2008-2009 era, but >> fails to answer the “why” question conclusively. > > Yes, the commits that predate the usage of git don't have the patch > message / rationale that people sent along with the patch, it just > wasn't recorded in CVS. You can always dig into into the mailing > list. > > a80b95ba67e2: https://pi.simark.ca/gdb-patches/F1826DD8-CC0F-4FF1-BC47-3F2ACBB42909@adacore.com/ > bb00b29d7802: https://pi.simark.ca/gdb-patches/20090319141746.GA81236@ulanbator.act-europe.fr/ > > Although there isn't more details about the bit you are removing. > > So let's just wait until we hear back from the FSF about your copyright > assignment, and then we can merge all of this. > > Note that we currently require contributions to include ChangeLog > entries: > > https://sourceware.org/gdb/wiki/ContributionChecklist#Properly_Formatted_GNU_ChangeLog > > I don't mind for this time, the patches are small enough that I can > write them when merging. We are also discussing whether we keep using > those, so it may or may not apply in the future. > > Simon > Hi Dominique, Now that your copyright assignment is done, I'd like to merge your patches, but I'm a bit lost and the patches don't apply because they got messed up in the process of sending them. Would you mind sending a clean v2, rebased on today's master (I don't think it will change much, darwin-nat.c hasn't had other changes)? And if you could use git-send-email, that would make sure the patches arrive correctly formatted. Thanks, Simon