Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3612138ybd; Fri, 28 Jun 2019 11:40:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwHikmsVJJ1mxFhlOZJiaDNzrIBTuCswHlFGLSGneTfAOFJvkCoy8+eEWxoo1e6V1e/heiC X-Received: by 2002:a17:902:e65:: with SMTP id 92mr12746324plw.13.1561747255509; Fri, 28 Jun 2019 11:40:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561747255; cv=none; d=google.com; s=arc-20160816; b=ZM8pxtN7vNiKe2yBynsN13EG7zABW01Pt5xqAPgRglTKb0xXsm/0Zjo+x21vkPGUC3 Sjs0U6sSeSCiqZ0kOGxADVqmGvhRiCfZDAmLpnfUvtmKDKattE4PcWDj+ZuVkHvjJvCE dwKEqGCE62fLAJpyqHY1ySRCyAPT7ZHl4V0FGhBO0GCCZN478kme1MTJ8uCNwZL4pDK8 3xfmJJoE1Qtt1fjq8RiVNzqctfPkKCJtimU8qFR4eooYknQ2ojwe2ENC9jxqVXlUwQ7G tBUfyf2unC+YFkncLeHdM4P90lJ2wRkGJk5g/fY0344dtYWIE25mlqyqtfQK+yh/D/Qb GnYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=OVOwrrAjKoizTUmhmYtYHfWAox7vtPYJug1DDD2D0tI=; b=PJosa6CxVuPDRUIejRZGNyPyM50HJt41Lvt5zUYUMjjMY4uShWDPgXKWM5m+CvoVgs Qb3no/JQqAVOjN8Ns26gMsQ7do8bTzc48d1nZbStmx2N4SMOoJFyjTtj//CBz56boqZY UcXlmCR7NIUau9Yl/u/C+l7MJfdulM8hdYlrB5x4jjRYdQhnNMzP6JVTNdxSqepJC6Uh sm5K3kAEN/evRnDEDFChqAwlWvOBTZE4qmNbl9eePWMMB0wE7bHz4GhjBFxKwziPB4K4 WcjrxMbBR8pIgYYs68c+hPNEPP6tALIeWmKlM+3BcR7yfsVGc3ps5iD/7S6LRgfWc4cz vN/g== 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 h13si2484592pgp.296.2019.06.28.11.40.38; Fri, 28 Jun 2019 11:40:55 -0700 (PDT) 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 S1726664AbfF1Skf (ORCPT + 99 others); Fri, 28 Jun 2019 14:40:35 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:37792 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726498AbfF1Skf (ORCPT ); Fri, 28 Jun 2019 14:40:35 -0400 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1hgvnO-0004b1-Ei; Fri, 28 Jun 2019 20:40:26 +0200 Date: Fri, 28 Jun 2019 20:40:26 +0200 From: Sebastian Andrzej Siewior To: "Paul E. McKenney" Cc: Peter Zijlstra , Joel Fernandes , Steven Rostedt , rcu , LKML , Thomas Gleixner , Ingo Molnar , Josh Triplett , Mathieu Desnoyers , Lai Jiangshan Subject: Re: [RFC] Deadlock via recursive wakeup via RCU with threadirqs Message-ID: <20190628184026.fds6scgi2pnjnc5p@linutronix.de> References: <20190627142436.GD215968@google.com> <20190627103455.01014276@gandalf.local.home> <20190627153031.GA249127@google.com> <20190627155506.GU26519@linux.ibm.com> <20190627173831.GW26519@linux.ibm.com> <20190627181638.GA209455@google.com> <20190627184107.GA26519@linux.ibm.com> <20190628135433.GE3402@hirez.programming.kicks-ass.net> <20190628153050.GU26519@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190628153050.GU26519@linux.ibm.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-06-28 08:30:50 [-0700], Paul E. McKenney wrote: > On Fri, Jun 28, 2019 at 03:54:33PM +0200, Peter Zijlstra wrote: > > On Thu, Jun 27, 2019 at 11:41:07AM -0700, Paul E. McKenney wrote: > > > Or just don't do the wakeup at all, if it comes to that. I don't know > > > of any way to determine whether rcu_read_unlock() is being called from > > > the scheduler, but it has been some time since I asked Peter Zijlstra > > > about that. > > > > There (still) is no 'in-scheduler' state. > > Well, my TREE03 + threadirqs rcutorture test ran for ten hours last > night with no problems, so we just might be OK. > > The apparent fix is below, though my approach would be to do backports > for the full set of related changes. > > Joel, Sebastian, how goes any testing from your end? Any reason > to believe that this does not represent a fix? (Me, I am still > concerned about doing raise_softirq() from within a threaded > interrupt, but am not seeing failures.) For some reason it does not trigger as good as it did yesterday. Commit - 23634ebc1d946 ("rcu: Check for wakeup-safe conditions in rcu_read_unlock_special()") does not trigger the bug within 94 attempts. - 48d07c04b4cc1 ("rcu: Enable elimination of Tree-RCU softirq processing") needed 12 attempts to trigger the bug. > Thanx, Paul > Sebastian