From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by sourceware.org (Postfix) with ESMTPS id C3E5B3858D28 for ; Sat, 28 Jan 2023 02:18:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C3E5B3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=fastmail.fm Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=fastmail.fm 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm3; t=1674872314; x=1674958714; bh=VtqQmfywnfkeNrJ/TAhkr3Nql YQL0JXahKMyeeQcGs8=; b=PyPrlld9iTKBOyhQyMb2FdxHk7WwjO980M0pBbvDt qObB3+mV05sQthFz/c+RnX9TqR197n5SH+aIFX+ipDVIr3Sfa8AyfiZbC/FX1lTU 25RFjDrFH2PHtgwybrLHhWl/11pSFjo0K8kFbey/JbRgp9GJ0QMuZ6QxXjlDW+VO pUdGKxaLBD19YE07WZsLQTloNnOfASotUChfDVKwi9QvbF3rYOTk1Qs0zLRBsOfd lQAfkeTMcpP9hzvpDBA9TVLuFTM7ou/sKPDcAgvSHGaE/oI4eCOXHKpgvEbL2pV/ c8up6mQOiIEKzugbpsQ2yF6gboDXSJinGGlryd/3s4Gbw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1674872314; x=1674958714; bh=VtqQmfywnfkeNrJ/TAhkr3NqlYQL0JXahKM yeeQcGs8=; b=QM0HEYgWI+ItUCMugkokI9Lr7AS6Ao3i7pUUrJkzJCoJ4JQP4an 2XtJLQRZGcVL7bPex2uJ61fEDgv4FCE6GRjuRFYoDSScUnClA/2ZJNKwjckQvb86 18SiXN7y162MgXKxnTbm/LVxmlIX6rhYZrVctiT45/oAwW4Q2Urv4NdZ6Av25xv0 mXIi4Ftkb2/kPrZ4/9yjWxh5NJDWrA4r9fSpXReKmB31D0ov/EIOTRBewYkf/w2K zMo1y7/Kde9n8W9HEOQ1RQ5PDXzNe3VHF7K+pw4hCVp7cTiac6IJLXkNxZb9J70T Ed9uBSKhCgFyn9m40m0UHZ3awpfxZZfeqjg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddvjedggeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepmhgrlhhtvghs khgrrhhuphhkvgesfhgrshhtmhgrihhlrdhfmhenucggtffrrghtthgvrhhnpeeiudeltd efudejudefieetheduhefgudfhveegleektdekffdvgffggeffudegvdenucffohhmrghi nhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepmhgrlhhtvghskhgrrhhuphhkvgesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: ifa6c408f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Jan 2023 21:18:34 -0500 (EST) From: malteskarupke@fastmail.fm To: libc-alpha@sourceware.org Cc: Malte Skarupke 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 List-Id: From: Malte Skarupke 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(-) -- 2.25.1