From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28296 invoked by alias); 15 Dec 2016 22:27:12 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 28261 invoked by uid 89); 15 Dec 2016 22:27:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=flaw, our X-HELO: mx1.redhat.com Message-ID: <1481840825.14990.586.camel@redhat.com> Subject: [PATCH][BZ #20973] Robust mutexes: Fix lost wake-up. From: Torvald Riegel To: GLIBC Devel Cc: vl@samba.org, Michael Adam , Rich Felker Date: Thu, 15 Dec 2016 22:27:00 -0000 Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-12/txt/msg00586.txt.bz2 See patch for a description. Tested on x86_64-linux with our tests and the test case from the original bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1401665 OK? I'm sending this minimal patch first to have something that's easy to backport. I'll send further such patches for any other bugs I can find for which a simple backport is possible. I then plan to follow this up with a general clean-up of robust mutexes including proper documentation of the concurrent code. There's another bug that's probably just a glibc problem, one that is a glibc problem but seems to happen to work currently (at least on x86_64), one bug that is just in kernel code, and there's also a general design flaw in the glibc/kernel synchronization algorithm that prevents us from guaranteeing the mutex destruction requirements. I'll work on the latter two subsequently and crosspost to LKML.