Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1223370pxb; Wed, 4 Nov 2020 03:21:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJw6Zt8RDpANzEIeSxui8K+yhj1RXS6fpDdXzTayya4uQUr9qPgOp1PDMqaPAY7WBphFjMX2 X-Received: by 2002:a17:906:f98d:: with SMTP id li13mr18433691ejb.307.1604488912771; Wed, 04 Nov 2020 03:21:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604488912; cv=none; d=google.com; s=arc-20160816; b=Ilt+nWLHacIxyrA5DbsBmIHNGoBZ5eOjlvwoT6weGZLAOjF68IVXO7WQphEENDQdnP WRgUz/6+c38aM6PjAxbFTDOgf1MGJtCeE4PPmytx4LQWl0UTBIsFyawLzjT84TrjXTG7 aSuHw7XPrBj2mwwh2C/TueVObunJPoOAE6lRaZksMaLU/4W9pJYj9k8XK/p9Rgb/uEk3 8R6o9+9KsX+OiaaX7mqyIaTFUcbXSeqQ7unY8SGAqAX28jg/rDqNY2GZ1PAk1tc2dV39 gqfUVLU/vNDl/nziUZs/xqtk1KKRRnSGrBMFqOE4GvY7g0VWdW/fvsaN0fq6QR8p8Jxf IqhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=1lc46Rd9wCuf9yAM3x0VKjRoapHGrztvOKUbPr8Ji7E=; b=jD2qXChwe0PhXrEpiupWgxs4DOxUY+BqPs8R3inOptZ4+kH5VBk81wUBo9IUBiKTc5 bBG/s7ZCdmGFdrNxypS0TWxUCYSjNtYXS9QFv3IAl66MrIlAGTOJ6gOE46kBCsFMMy/6 nWUGDPXG2M3zmNNsVsWgOnArmwMW78/PWyLU4mTt4x2VUfGBbUBTS08SHox95DVcF/mv rJLP8FHiUyhdqoq8UN4/KvHR0bo86gWaVUYqPOz60njDvUFO7BZ47oYqfH1fmjI8IHfm 0kKKZmNutfrcWoYl5DTJnw12m0Q+HIMQWSIdovAFDs0E7dQSMAMFwl71VGKUpEEmgVrz vjKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cO2ZF0ww; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=ktTTc5QE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cq11si1025273edb.332.2020.11.04.03.21.30; Wed, 04 Nov 2020 03:21:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cO2ZF0ww; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=ktTTc5QE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729672AbgKDLRt (ORCPT + 99 others); Wed, 4 Nov 2020 06:17:49 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:48670 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729616AbgKDLRd (ORCPT ); Wed, 4 Nov 2020 06:17:33 -0500 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1604488648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1lc46Rd9wCuf9yAM3x0VKjRoapHGrztvOKUbPr8Ji7E=; b=cO2ZF0wwv9S0cKsVczS3IlOIfnKxt1HkxQVk5uvfxYDhOuVYIWxSGp1kuFtWX76T18qsjX hB7J94xcYaJqB+ORmCbkLyhQfKnxqQDUDVuxZgafVeyEtEpTZS1Yu/RCPv0c/ftZRLoi4B gFxgkCBSyTfMADAUDhKcg43UfS550sNrwxtf8s1J3LKE0uKeYaTNDm/nkYO+hp3xP5Qn0k Qc7p+FEa30cjAjyOdb0Zm9Zmc4VuE3+v7XgtO9Be9RWAm9b5e8BabDp52zLkSQja76bBvK H+/YEPEqq84hMi52VV3kNBTzaRg3D89YWqT6GDKVLLGXHaArGwcafPgBPILTXQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1604488648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1lc46Rd9wCuf9yAM3x0VKjRoapHGrztvOKUbPr8Ji7E=; b=ktTTc5QEuhm/ecR+uDBY6KbenTPsRh9aO5iQN0v/VhZwDpxz4ozua95XP7fQfPtYQ9mbeM Dn5AlhgWk5shKsCA== To: Mike Galbraith , Gratian Crisan , Peter Zijlstra Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, Brandon Streiff , Ingo Molnar , Darren Hart , James Minor , Sebastian Andrzej Siewior Subject: Re: BUG_ON(!newowner) in fixup_pi_state_owner() In-Reply-To: <874km5mnbf.fsf@nanos.tec.linutronix.de> References: <87a6w6x7bb.fsf@ni.com> <878sbixbk4.fsf@ni.com> <2376f4e71c638aee215a4911e5efed14c5adf56e.camel@gmx.de> <5f536491708682fc3b86cb5b7bc1e05ffa3521e7.camel@gmx.de> <874km5mnbf.fsf@nanos.tec.linutronix.de> Date: Wed, 04 Nov 2020 12:17:28 +0100 Message-ID: <871rh9mkvr.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 04 2020 at 11:24, Thomas Gleixner wrote: > On Wed, Nov 04 2020 at 08:42, Mike Galbraith wrote: >> On Wed, 2020-11-04 at 01:56 +0100, Mike Galbraith wrote: >> --- a/kernel/futex.c >> +++ b/kernel/futex.c >> @@ -2383,7 +2383,18 @@ static int fixup_pi_state_owner(u32 __us >> * Since we just failed the trylock; there must be an owner. >> */ >> newowner = rt_mutex_owner(&pi_state->pi_mutex); >> - BUG_ON(!newowner); >> + >> + /* >> + * Why? Because I know what I'm doing with these beasts? Nope, >> + * but what the hell, a busy restart loop let f_boosted become >> + * owner, so go for it. Box still boots, works, no longer makes >> + * boom with fbomb_v2, and as an added bonus, didn't even blow >> + * futextests all up. Maybe it'll help... or not, we'll see. >> + */ >> + if (unlikely(!newowner)) { >> + err = -EAGAIN; >> + goto handle_err; > > Yes, that cures it, but does not really explain why newowner is > NULL. Lemme stare more. Aside of that it's going to create inconsistent state in the worst case. There is something really fishy in the trace Gratian provided....