From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753592AbbGKJhQ (ORCPT ); Sat, 11 Jul 2015 05:37:16 -0400 Received: from mail-wg0-f52.google.com ([74.125.82.52]:36666 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753374AbbGKJhO (ORCPT ); Sat, 11 Jul 2015 05:37:14 -0400 Date: Sat, 11 Jul 2015 11:37:09 +0200 From: Ingo Molnar To: Thomas Gleixner Cc: Dave Jones , x86@kernel.org, Linus Torvalds , Linux Kernel Subject: Re: CONFIG_DEBUG_VIRTUAL instant reboot. Message-ID: <20150711093709.GA27975@gmail.com> References: <20150710145047.GA16804@codemonkey.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Thomas Gleixner wrote: > On Fri, 10 Jul 2015, Dave Jones wrote: > > I bought a Haswell Xeon E3-1225 v3 box, and found that > > my self-built kernel would instantly reboot the machine once > > grub had loaded it. > > > > Through trial and error I found the following options matter.. > > > > if I _enable_ DEBUG_PAGEALLOC, it boots fine. > > disabling it again, instant death. > > > > further narrowing down revealed that if I have DEBUG_PAGEALLOC off, > > I also _must_ also have CONFIG_DEBUG_VIRTUAL turned off. > > With both disabled, it also boots fine. > > > > I tried earlyprintk, but this happens so soon I don't think > > we're even at the point of initializing that code. > > > > Any ideas how I can further narrow this down ? > > I assume that VIRTUAL_BUG_ON() triggers very early. Changing it to > WARN_ON() should keep the machine alive and give you a hint which of > those checks explodes. I suspect an early console might be useful as well, in case the kernel doesn't manage to boot. > --- a/include/linux/mmdebug.h > +++ b/include/linux/mmdebug.h > @@ -50,7 +50,7 @@ void dump_mm(const struct mm_struct *mm); > #endif > > #ifdef CONFIG_DEBUG_VIRTUAL > -#define VIRTUAL_BUG_ON(cond) BUG_ON(cond) > +#define VIRTUAL_BUG_ON(cond) WARN_ON(cond) I'd make this WARN_ON_ONCE(), to see the first instance and to cross fingers afterwards and maybe boot up. Thanks, Ingo