From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754946AbZHKVXy (ORCPT ); Tue, 11 Aug 2009 17:23:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754659AbZHKVXx (ORCPT ); Tue, 11 Aug 2009 17:23:53 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:48033 "EHLO e7.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754382AbZHKVXw (ORCPT ); Tue, 11 Aug 2009 17:23:52 -0400 Date: Tue, 11 Aug 2009 14:23:52 -0700 From: "Paul E. McKenney" To: Pavel Machek Cc: Martin Schwidefsky , linux-kernel@vger.kernel.org, Ingo Molnar , Thomas Gleixner , Gerald Schaefer , manfred@colorfullife.com Subject: Re: [BUG] race of RCU vs NOHU Message-ID: <20090811212352.GF6739@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <20090807151529.2806b8b4@skybase> <20090807142957.GB6700@linux.vnet.ibm.com> <20090810142535.3e685109@skybase> <20090810161007.GB1505@ucw.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090810161007.GB1505@ucw.cz> User-Agent: Mutt/1.5.15+20070412 (2007-04-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 10, 2009 at 06:10:07PM +0200, Pavel Machek wrote: > Hi! > > > > > I analysed a dump of a hanging 2.6.30 system and found what I think is > > > > a bug of RCU vs NOHZ. There are a number of patches ontop of that > > > > kernel but they should be independent of the bug. > > > > > > > > The systems has 4 cpus and uses classic RCU. cpus #0, #2 and #3 woke up > > > > recently, cpu #1 has been sleeping for 5 minutes, but there is a pending > > > > rcu batch. The timer wheel for cpu #1 is empty, it will continue to > > > > sleep for NEXT_TIMER_MAX_DELTA ticks. > > > > > > Congratulations, Martin! You have exercised what to date has been a > > > theoretical bug identified last year by Manfred Spraul. The fix is to > > > switch from CONFIG_RCU_CLASSIC to CONFIG_RCU_TREE, which was added in > > > 2.6.29. > > > > > > Of course, if you need to work with an old kernel version, you might > > > still need a patch, perhaps for the various -stable versions. If so, > > > please let me know -- otherwise, I will focus forward on CONFIG_RCU_TREE > > > rather than backwards on CONFIG_RCU_CLASSIC. > > > > SLES11 is 2.6.27 and uses classic RCU. The not-so theoretical bug is > > present there and I think it needs to be fixed :-/ > > Plus... if config_rcu_classic is known buggy (and you are not willing > to fix it), it should be disabled (or made depend on !CONFIG_NOHZ, or > maybe made depend on CONFIG_BROKEN). Already done in -tip. ;-) paulmck@paulmck-laptop:/home/git/linux-2.6-tip$ ls kernel/rcuclassic.c ls: kernel/rcuclassic.c: No such file or directory Thanx, Paul > Ugh. rcu_classic does not seem to have help text, and I'm running > known > bad > code > here > :-(.