Message ID | 20230128021829.7990-1-malteskarupke@fastmail.fm (mailing list archive) |
---|---|
Headers |
Return-Path: <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 83B3F3858281 for <patchwork@sourceware.org>; Sat, 28 Jan 2023 02:19:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 83B3F3858281 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674872345; bh=VtqQmfywnfkeNrJ/TAhkr3NqlYQL0JXahKMyeeQcGs8=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=lMJ4Y4AR/fe7FPagpp8UdlrSICZMnZ/xZzMGWt8U2q2yAhuOq3m9S5z0Xlo5ceDU9 oRrmy/i/bDSN1KZNshYSjMyf2joJWw4NvLdALpaoyGaCEGmkhc60Z2PJV3un9MFdyY DBC4cPrbZTif7ypQ8b3j7Cc9e/489g8XBF4dvnvw= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by sourceware.org (Postfix) with ESMTPS id C3E5B3858D28 for <libc-alpha@sourceware.org>; Sat, 28 Jan 2023 02:18:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C3E5B3858D28 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 658343200908; Fri, 27 Jan 2023 21:18:35 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 27 Jan 2023 21:18:35 -0500 X-ME-Sender: <xms:-oXUY22uloQK8nQ4dSjuBy1Pux-LAAIqGx0ODq0KzOtYo5u_wjqx_g> <xme:-oXUY5FOUG-ZSK8F3vs6Ojj2u4nxXrWqZNgO4UmPBlfzACQreXp8M0llEiLaHGgpn GLELrMFMNwttOQ8Bg> X-ME-Received: <xmr:-oXUY-4R1K4UG1iKvfmFvnT2-jooE4LL19kaW4usPX9GwMydIMiKJ_1W_y0Md1u8AWcUbOQkZpQtc0JtgSfGw_tOVGFosaJ5qd-29-yy4A> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddvjedggeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepmhgrlhhtvghs khgrrhhuphhkvgesfhgrshhtmhgrihhlrdhfmhenucggtffrrghtthgvrhhnpeeiudeltd efudejudefieetheduhefgudfhveegleektdekffdvgffggeffudegvdenucffohhmrghi nhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepmhgrlhhtvghskhgrrhhuphhkvgesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: <xmx:-oXUY33isig0LDFkPYIHsqSXjNdJPMASyAdOklZ0U6olExR2aKgxmA> <xmx:-oXUY5GBJnniy1aX2NBb1-BeSRDI015MW8Q_9vI3TsuBCPCabADw6Q> <xmx:-oXUYw8NYN4yrFwx4WVjsguOnzwbr3QyekPIWWoDcT00h_H3jIvbNA> <xmx:-oXUY8M-LNJylW4qBBtHkAA4qkrxwqWM_dPBdYbS2xnp5TvsWWdz8g> Feedback-ID: ifa6c408f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Jan 2023 21:18:34 -0500 (EST) To: libc-alpha@sourceware.org Cc: Malte Skarupke <malteskarupke@fastmail.fm> Subject: [PATCH 0/9] Patch to fix glibc condition variable bug (BZ 25847) Date: Fri, 27 Jan 2023 21:18:20 -0500 Message-Id: <20230128021829.7990-1-malteskarupke@fastmail.fm> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: malteskarupke--- via Libc-alpha <libc-alpha@sourceware.org> Reply-To: malteskarupke@fastmail.fm Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
Patch to fix glibc condition variable bug (BZ 25847)
|
|
Message
develop--- via Libc-alpha
Jan. 28, 2023, 2:18 a.m. UTC
From: Malte Skarupke <malteskarupke@fastmail.fm>
The following emails are patches to fix the glibc condition variable bug,
BZ 25847.
The first patch is Frank Barrus' patch, as he submitted it on bugzilla.
Patch 2 fixes up comments and indentation, finishing the patch.
Further patches in the series do follow-up clean-up, like removing
unnecessary checks and unnecessary variables.
All of these patches are verified in TLA+ so that I am at least sure
that they don't introduce some similar issue. The condition variable
implementation also got a lot simpler as a result, so it is now much
easier to reason about, further increasing confidence.
The code for the TLA+ checking is here:
https://github.com/skarupke/glibc_tla_plus
Please note that this will probably be my last attempt to submit a
patch. I have submitted two series of patches before and was mostly
greeted with silence. If the same thing happens again, I'm going to give
up on glibc.
Frank Barrus (1):
pthreads NPTL: lost wakeup fix 2
Malte Skarupke (8):
nptl: Update comments and indentation for new condvar implementation
nptl: Remove unnecessary catch-all-wake in condvar group switch
nptl: Remove unnecessary quadruple check in pthread_cond_wait
nptl: Remove g_refs from condition variables
nptl: Use a single loop in pthread_cond_wait instaed of a nested loop
nptl: Fix indentation
nptl: rename __condvar_quiesce_and_switch_g1
nptl: Use all of g1_start and g_signals
nptl/pthread_cond_broadcast.c | 8 +-
nptl/pthread_cond_common.c | 109 ++--------
nptl/pthread_cond_signal.c | 19 +-
nptl/pthread_cond_wait.c | 278 +++++-------------------
nptl/tst-cond22.c | 12 +-
sysdeps/nptl/bits/thread-shared-types.h | 4 +-
sysdeps/nptl/pthread.h | 2 +-
7 files changed, 100 insertions(+), 332 deletions(-)
Comments
Ping. I really think you want these changes. These are patches that fix the issue with no downsides. The code is clearer, performance better, and a really bad bug is fixed.
> On 8 Feb 2023, at 02:48, Malte Skarupke via Libc-alpha <libc-alpha@sourceware.org> wrote: > > Ping. I really think you want these changes. These are patches that fix the issue with no downsides. The code is clearer, performance better, and a really bad bug is fixed. > It's been a few days and your patch was noted in Monday's patch review. It looks like it's on Carlos' list to review shortly. > -- > Malte Skarupke > malteskarupke@fastmail.fm
Hi again, is there any update on this? I can also hop on a call or chat with someone if that helps with the review. Let me know, Malte