Received: by 10.223.176.5 with SMTP id f5csp138259wra; Tue, 6 Feb 2018 18:57:41 -0800 (PST) X-Google-Smtp-Source: AH8x224Xl09tX9mUsUFhLUVQib3sZ8xcAajuw6onaxGOGBWhL7UsiLiMrIiJS6rI2fdluKXbxlb8 X-Received: by 10.98.192.11 with SMTP id x11mr4480797pff.27.1517972261530; Tue, 06 Feb 2018 18:57:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517972261; cv=none; d=google.com; s=arc-20160816; b=GY+czPYIPF1QgmKIfuOuJIXe/Uc3s2XgKP78lJAWBqttj+piwfZnjvl7Xmje5fHtta 3SvHuG9Cc+8acmWseqR0FY7mmgxPvlwJ9D7xxb/eCpvGKMbZro74lS9mDsuT6cGMtdPh LxhaiVCzIbUNY7739lIqETJaokMus5DRjbJEbMK0a30QidTaigJdhZmiMO7KbRJV3jzh iVJ0maTpkZXXdK12OiWqKia1mtFvnqS6dfEm+l05EJj7R8LEVkTf2Y8wurfzri7TthfF EoN8NALtihAactf7NLgq2h4WPfS4TZ1UT8zIaaaBOCZIPdrc1XAfquY0mz3KKmHsnzdJ Dmsg== 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:arc-authentication-results; bh=wh+LQ/dmZp1oAiOsWU4KnTKmk57Tjz8irfyhiPAqgIQ=; b=MoIawMHOmGAf8BS01Q+JHhUeQanN83Nq9S04nj+2eYT1ZUYXWeOajk8C3JkaLwzPMN N/jqqdBSP/3OiHpq8FFDw91+hvGS9lHmZj4o7FaPFRrLMhlwKnyzQ426fS4oLEr9RoLW 47jg3UMlHuXCpV88L5MlcZ0F+c9Y5eJKIPApx2P3cmUPBb4Ka3o7fayloSV5OHMzTRO4 94kCws8h6lj0GjWcbJo0Pkg8TvxqoToaZYUFEkiwJuJ8yPbxbyXetq0EUqfXlyJdK2nT eX/JXw8Wi1hkXUYGBlaqq6iFirDDbUgbhjzfaw/B23X5nI9wcpaQLtWnYZT0GLqj2ayr qgtA== 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 r2si309720pgv.485.2018.02.06.18.57.27; Tue, 06 Feb 2018 18:57:41 -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 S1753335AbeBGCzH (ORCPT + 99 others); Tue, 6 Feb 2018 21:55:07 -0500 Received: from h2.hallyn.com ([78.46.35.8]:39802 "EHLO mail.hallyn.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753283AbeBGCzG (ORCPT ); Tue, 6 Feb 2018 21:55:06 -0500 Received: by mail.hallyn.com (Postfix, from userid 1001) id 0008C1206BA; Tue, 6 Feb 2018 20:55:04 -0600 (CST) Date: Tue, 6 Feb 2018 20:55:04 -0600 From: "Serge E. Hallyn" To: "Paul E. McKenney" Cc: "Serge E. Hallyn" , Tejun Heo , linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: Can RCU stall lead to hard lockups? Message-ID: <20180207025504.GA10892@mail.hallyn.com> References: <20180109035207.GD3668920@devbig577.frc2.facebook.com> <20180109042425.GS9671@linux.vnet.ibm.com> <20180109141114.GF3668920@devbig577.frc2.facebook.com> <20180109152234.GU9671@linux.vnet.ibm.com> <20180202234430.GA25611@mail.hallyn.com> <20180203205032.GN3617@linux.vnet.ibm.com> <20180207023303.GA10583@mail.hallyn.com> <20180207025337.GD3617@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180207025337.GD3617@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 06, 2018 at 06:53:37PM -0800, Paul E. McKenney wrote: > On Tue, Feb 06, 2018 at 08:33:03PM -0600, Serge E. Hallyn wrote: > > On Sat, Feb 03, 2018 at 12:50:32PM -0800, Paul E. McKenney wrote: > > > On Fri, Feb 02, 2018 at 05:44:30PM -0600, Serge E. Hallyn wrote: > > > > Quoting Paul E. McKenney (paulmck@linux.vnet.ibm.com): > > > > > On Tue, Jan 09, 2018 at 06:11:14AM -0800, Tejun Heo wrote: > > > > > > Hello, Paul. > > > > > > > > > > > > On Mon, Jan 08, 2018 at 08:24:25PM -0800, Paul E. McKenney wrote: > > > > > > > > I don't know the RCU code at all but it *looks* like the first CPU is > > > > > > > > taking a sweet while flushing printk buffer while holding a lock (the > > > > > > > > console is IPMI serial console, which faithfully emulates 115200 baud > > > > > > > > rate), and everyone else seems stuck waiting for that spinlock in > > > > > > > > rcu_check_callbacks(). > > > > > > > > > > > > > > > > Does this sound possible? > > > > > > > > > > > > > > 115200 baud? Ouch!!! That -will- result in trouble from console > > > > > > > printing, and often also in RCU CPU stall warnings. > > > > > > > > > > > > It could even be slower than 115200, and we occassionally see RCU > > > > > > stall warnings caused by printk storms, for example, while the kernel > > > > > > is trying to dump a lot of info after an OOM. That's an issue we > > > > > > probably want to improve from printk side; however, they don't usually > > > > > > lead to NMI hard lockup detector kicking in and crashing the machine, > > > > > > which is the peculiarity here. > > > > > > > > > > > > Hmmm... show_state_filter(), the function which dumps all task > > > > > > backtraces, share a similar problem and it avoids it by explicitly > > > > > > calling touch_nmi_watchdog(). Maybe we can do something like the > > > > > > following from RCU too? > > > > > > > > > > If this fixes things for you, I would welcome such a patch. > > > > > > > > Hi - would this also be relevant to 4.9-stable and 4.4-stable, or > > > > has something elsewhere changed after 4.9 that actually triggers this? > > > > > > As far as I can tell, slow console lines have been prone to RCU CPU stall > > > warnings for a very long time. > > > > Ok, thanks Paul. > > > > Tejun were you going to push this? > > I have it queued for the next merge window. 3eea9623926f ("rcu: Call > touch_nmi_watchdog() while printing stall warnings") in -rcu. D'oh - thanks! -serge