Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6509689imu; Wed, 30 Jan 2019 16:28:07 -0800 (PST) X-Google-Smtp-Source: ALg8bN5WeJgC7DRw/NcIwP2hZ3P6XQS3Pb84aBbL4nBoAxgopcXNO3fOrCs/6DVLGJQQ4TMC3XFP X-Received: by 2002:a17:902:161:: with SMTP id 88mr33387091plb.306.1548894487122; Wed, 30 Jan 2019 16:28:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548894487; cv=none; d=google.com; s=arc-20160816; b=n3M2l9yUmrG+1Bk649K9KhELA+hiqJMXZWymJxyrEzxF76nw25euvpb6iGIdT02dWa s9yB8LmBgIbQzfYETFmnMQgI2y4ms+T0mbf9BQdigY+vDV6uiWeLz+xkXw1qZ9JnIYLs h1GlqF/r8qGSL9Wj/J7YLW90XSeHk3fSct+ZLX5I/r0tHBL+FmWsZbsOZpICJIoW2jTn Jz4EfpMLN+HGK0qdAOlOQTA+5T6mG4OhZdSHL+YmWJln0OQcY2HMaxCMOQX2WOboac6I deb3q6m5MBFt3LdV4sXQttQYPxYKKhxgEd/99L90EjnJ1fTi7xLECPYQBbWajw80avIt VHkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=xRXmZKTOGUFh5OWxPZ4ojCZQ4bKsPEgysJk1iySjy+k=; b=bWDdZN1hsBdQs/hZwHzomeiLWqKSTADFl10d61M1e64ftDD6d0bZUT86ZCDa+LGS7O JA8lNZPXALwTG3b6Sjz2m2+N5WJcnlpdg3AAe1P5gFeFOc7JCW+1ruo+N2CmCjVNqQOl NTg5I+AH1fioxKHu2wPlt2/6ePH6uAmoOjRXdz4UtvjzkIQwA+n38Z+nNo2HnaxRGr+g BBQNP2O57kP08UkODQqBMfIKUmvv+Hq30V8iMcA+eG4lgWDBZr/h/txGQXZAeKXoU5nG ghfoqgET3hS0iuR6vN3DOzl/knNnNbucwxqs9Nud9JRx1gjAnQT5aVmlAn5igxioJiCk ZgEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y27si2756513pga.459.2019.01.30.16.27.51; Wed, 30 Jan 2019 16:28:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727531AbfAaA1e (ORCPT + 99 others); Wed, 30 Jan 2019 19:27:34 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:48423 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725768AbfAaA1d (ORCPT ); Wed, 30 Jan 2019 19:27:33 -0500 Received: from p5492e0d8.dip0.t-ipconnect.de ([84.146.224.216] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gp0CU-0000WP-9v; Thu, 31 Jan 2019 01:27:26 +0100 Date: Thu, 31 Jan 2019 01:27:25 +0100 (CET) From: Thomas Gleixner To: "Paul E. McKenney" cc: Sebastian Sewior , Heiko Carstens , Peter Zijlstra , Ingo Molnar , Martin Schwidefsky , LKML , linux-s390@vger.kernel.org, Stefan Liebler Subject: Re: WARN_ON_ONCE(!new_owner) within wake_futex_pi() triggerede In-Reply-To: Message-ID: References: <20190129171653.ycl64psq2liy5o5c@linutronix.de> <20190130094913.GC5299@osiris> <20190130125955.GD5299@osiris> <20190130132420.spwrq2d4oxeydk5s@linutronix.de> <20190130210733.mg6aascw2gzl3oqz@linutronix.de> <20190130233557.GA4240@linux.ibm.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 31 Jan 2019, Thomas Gleixner wrote: > On Wed, 30 Jan 2019, Paul E. McKenney wrote: > > On Thu, Jan 31, 2019 at 12:13:51AM +0100, Thomas Gleixner wrote: > > > I might be wrong as usual, but this would definitely explain the fail very > > > well. > > > > On recent versions of GCC, the fix would be to put this between the two > > stores that need ordering: > > > > __atomic_thread_fence(__ATOMIC_RELEASE); > > > > I must defer to Heiko on whether s390 GCC might tear the stores. My > > guess is "probably not". ;-) > > So I just checked the latest glibc code. It has: > > /* We must not enqueue the mutex before we have acquired it. > Also see comments at ENQUEUE_MUTEX. */ > __asm ("" ::: "memory"); > ENQUEUE_MUTEX_PI (mutex); > /* We need to clear op_pending after we enqueue the mutex. */ > __asm ("" ::: "memory"); > THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); > > 8f9450a0b7a9 ("Add compiler barriers around modifications of the robust mutex list.") > > in the glibc repository, There since Dec 24 2016 ... And of course, I'm using the latest greatest glibc for testing that, so I'm not at all surprised that it just does not reproduce on my tests. I just hacked the ordering and restarted the test. If the theory holds, then this should die sooner than later. Thanks, tglx