Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3622945ybd; Fri, 28 Jun 2019 11:54:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqypz6i7wZUVg8/Lvl+NKJQXw4QPr131v7y6n/l9xmY3/ZJ2lOZOtKtW+oU47XfQSh8SBfPL X-Received: by 2002:a17:902:8689:: with SMTP id g9mr3873730plo.252.1561748080617; Fri, 28 Jun 2019 11:54:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561748080; cv=none; d=google.com; s=arc-20160816; b=BYtSlTV3nnQoNP9Wl+jYyODiZnn/B5ME52YMQRcbu4uebTcC9VDw+DfVKclBIEXC7W 7fUzb1MMm0ylhsyZ149iqmA7QwHhPmb80aBs+ucFQx3hfnKW5iWW+g78oR87+9pdnsEf 9LUZesVQhnG/iO4OD+MDdQ9dhqAzz8+V2p0xuC3/a4tYk2/IQxUGh0NZimHSiSaJz0+m 4wz2jwZtXxhRW98+XU7SEp41deyV2HZ6v++lCpPigPkEwR37oHht3h6C5gwzA1Wsyyja PFL7CN69Qh6uuNiVvFJOeHTwFOXxy+InOFa9NwbLqYbd/BCPAhaonRLdOWhk0ei1vmNN ghoA== 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:reply-to:message-id :subject:cc:to:from:date; bh=1wpe6vdYFJFGcQVb81dfYP71g4nSr/o8bteV+Zpn0Cw=; b=Bn6YXvE/BwBb4j6WC+yEFYOGqS1WWwED64iUDCDzaeBM9cqU8KKuQ7IvbPAzQ4hB+D anIYKHvjz5OBSj2AJiLRLzlXpVaGziCbHqDIE74mhmUULNbOyzUVzOMPpqQemBtEs59k GKQEmhAJceVJ83zkQDw/QAOqGRSV3V5cAmxSB3nVUnoBhVt/IrZavb6F1a0Ua+O4siv3 KBKOvoDzmcyD888xHuBj4+Np1k283MmiQ3RYH6rmfsVjjJ3RWbAXKijiXxIMSJn76nlP cHqn09QR9hNmxjlrAzg6Q9wKKvEY1uO500J2tbKk7QTyaDD5m582NVnDeq3FBhwh26So YhzA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si2744719pln.247.2019.06.28.11.54.24; Fri, 28 Jun 2019 11:54:40 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727015AbfF1SxY (ORCPT + 99 others); Fri, 28 Jun 2019 14:53:24 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:48952 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726812AbfF1SxY (ORCPT ); Fri, 28 Jun 2019 14:53:24 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5SIq2Bc131640; Fri, 28 Jun 2019 14:52:21 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2tdqe82dkm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Jun 2019 14:52:21 -0400 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id x5SIqLAO134916; Fri, 28 Jun 2019 14:52:21 -0400 Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com with ESMTP id 2tdqe82dje-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Jun 2019 14:52:21 -0400 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x5SIoXLg000306; Fri, 28 Jun 2019 18:52:20 GMT Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by ppma03dal.us.ibm.com with ESMTP id 2t9by7q7f6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Jun 2019 18:52:20 +0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5SIqJIM42795434 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 Jun 2019 18:52:19 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 37F6DB205F; Fri, 28 Jun 2019 18:52:19 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 19AD7B2064; Fri, 28 Jun 2019 18:52:19 +0000 (GMT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.26]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 28 Jun 2019 18:52:19 +0000 (GMT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id C7D0716C39C0; Fri, 28 Jun 2019 11:52:19 -0700 (PDT) Date: Fri, 28 Jun 2019 11:52:19 -0700 From: "Paul E. McKenney" To: Sebastian Andrzej Siewior 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: <20190628185219.GA26519@linux.ibm.com> Reply-To: paulmck@linux.ibm.com References: <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> <20190628184026.fds6scgi2pnjnc5p@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190628184026.fds6scgi2pnjnc5p@linutronix.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-06-28_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906280213 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 28, 2019 at 08:40:26PM +0200, Sebastian Andrzej Siewior wrote: > 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. I swear that I wasn't watching!!! ;-) But I do know that feeling. > 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. That matches my belief that 23634ebc1d946 ("rcu: Check for wakeup-safe conditions in rcu_read_unlock_special()") will at least greatly decrease the probability of this bug occurring. Thanx, Paul