From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id cUoVMmwTEWLfPQAAWB0awg (envelope-from ) for ; Sat, 19 Feb 2022 10:57:32 -0500 Received: by simark.ca (Postfix, from userid 112) id BC4431F3C9; Sat, 19 Feb 2022 10:57:32 -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 30D591EA69 for ; Sat, 19 Feb 2022 10:57:32 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 940CA3858D1E for ; Sat, 19 Feb 2022 15:57:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 940CA3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1645286251; bh=r+xWT0HUW+Sazuhkw2U4ziEsIMMAT2MLNrIfRSpUHpM=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=GgzgfkfTTST/PFBI+DOilMYGyIcNjSMlghdsvqUdw/d3PHTuhyZV7WcOIJ6aJMpHG e5xrm5Hr5MuQqsyHgav1C1g+QVTP2JzOolYCdDjyTf2Q+EB5FCXscploWBUQsRsDfA kA0g71YB9BK5XzCujwpXLF/Rntftr2Pi+aUnwbiw= Received: from mail-qv1-xf2d.google.com (mail-qv1-xf2d.google.com [IPv6:2607:f8b0:4864:20::f2d]) by sourceware.org (Postfix) with ESMTPS id 2C6B23858D1E for ; Sat, 19 Feb 2022 15:57:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2C6B23858D1E Received: by mail-qv1-xf2d.google.com with SMTP id o5so21050014qvm.3 for ; Sat, 19 Feb 2022 07:57:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=r+xWT0HUW+Sazuhkw2U4ziEsIMMAT2MLNrIfRSpUHpM=; b=dwCZK4zVW1b56CqDezK0hWXB3dSwvbggrnctYtxygj15EM0bJs5HNX4G7eiya/Fk+S RIEDWbJ9tOU2OY8KzsvFqF1A+pDrlX8sdUoPsbDMV1qlC3s6S9gcoOOKKrzVHxuYq+8R /mnsVKxBPkNgDcf6k1aABnnYwKNVFsEuFz3aO2ZuBtkbPFo5iR8enGm2X5BanUhYtRj3 ahvDAhZD+zkaVkAkzYdQmQFVF4z7uqC3Rk7UlmJC0VwHvMtte7oztjl7nJO0kXrTgkI7 AMsKRTZlZHSCY2SpplaK01loHRF3gkI1ejk9tB/XvI9VKP0l8fQu4QsR9/teXAhf68Jn tsOg== X-Gm-Message-State: AOAM532IT8rjNpndKs3rs2+1IBwKjpqbMYGieAEtH6Y0mb5cBHN8zU8a 4hzu97PgMNpSPrHXwxGsioQ= X-Google-Smtp-Source: ABdhPJzTC9IaRvnyX0dxgXBEkP2ACXQ3q3i4pF+xUzYXr1upeIKLvPcWS5y+pGuopNBhVhuZz7fB8A== X-Received: by 2002:a05:6214:d6e:b0:42d:7cb3:aa49 with SMTP id 14-20020a0562140d6e00b0042d7cb3aa49mr9728538qvs.107.1645286232663; Sat, 19 Feb 2022 07:57:12 -0800 (PST) Received: from [192.168.1.127] (173-246-5-136.qc.cable.ebox.net. [173.246.5.136]) by smtp.gmail.com with ESMTPSA id a20sm940837qtx.6.2022.02.19.07.57.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 19 Feb 2022 07:57:12 -0800 (PST) Subject: Re: [RFC][PATCH v2 1/2][PR gdb/24069] [delete] Not-so-harmless spurious call to `wait4` To: Simon Marchi , gdb-patches@sourceware.org References: <20210408191449.27434-1-dominique.quatravaux@epfl.ch> <20220216141540.96514-1-levraiphilippeblain@gmail.com> <20220216141540.96514-2-levraiphilippeblain@gmail.com> Message-ID: Date: Sat, 19 Feb 2022 10:57:10 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 8bit 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: Philippe Blain via Gdb-patches Reply-To: Philippe Blain Cc: Louis-He <1726110778@qq.com>, Dominique Quatravaux , samuel.r.warner@me.com Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi Simon, Le 2022-02-19 à 10:47, Simon Marchi a écrit : > On 2022-02-16 09:15, Philippe Blain wrote: >> From: Dominique Quatravaux >> >> 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 - A cursory investigation with `git blame` pinpoints >> commits bb00b29d7802 and a80b95ba67e2 from the 2008-2009 era, but >> fails to answer the “why” question conclusively. > > Given that this additional wait does not seem logical at all and > empirical evidence shows that it's not right, I'm fine with merging > this one directly. Do you have push access, or would you like me to do > it on your behalf? > > Simon > I do not have push access, so yes, if you think that it's a good idea to merge this one directly, please go ahead. I think it won't solve all problems on its own, but the bugzilla history indicates it would at least be a good start. I did include a changelog entry, so that it could also be included in an eventual 11.3 release if you think it makes sense. Thanks! Philippe.