From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AA9393864841; Sat, 19 Feb 2022 16:03:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AA9393864841 From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/24069] gdb on OSX Mojave hangs in darwin_decode_message Date: Sat, 19 Feb 2022 16:03:50 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 8.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Feb 2022 16:03:51 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D24069 --- Comment #46 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Simon Marchi : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D9cca177baec3= 2a1ed1422a87a1f57cda2d2eb21a commit 9cca177baec32a1ed1422a87a1f57cda2d2eb21a Author: Dominique Quatravaux Date: Wed Feb 16 09:15:39 2022 -0500 gdb/darwin: remove not-so-harmless spurious call to `wait4` As seen in https://sourceware.org/bugzilla/show_bug.cgi?id=3D24069 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. Co-Authored-By: Philippe Blain Change-Id: Id4e4415d66d6ff6b3552b60d761693f17015e4a0 --=20 You are receiving this mail because: You are on the CC list for the bug.=