Re: Linux 2.6.27-rc3: kernel BUG at mm/vmalloc.c - bisected

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Alan D. Brunelle <Alan.Brunelle@...>
Cc: <linux-kernel@...>
Date: Tuesday, August 19, 2008 - 3:46 pm

On Wed, 13 Aug 2008 19:03:20 -0400
"Alan D. Brunelle" <Alan.Brunelle@hp.com> wrote:


Please confirm that this happened at

static struct vm_struct *
__get_vm_area_node(unsigned long size, unsigned long flags, unsigned long start,
		unsigned long end, int node, gfp_t gfp_mask, void *caller)
{
	struct vm_struct **p, *tmp, *area;
	unsigned long align = 1;
	unsigned long addr;

-->	BUG_ON(in_interrupt());



Thing is, the code *isn't* in an interrupt.  Something got screwed up.

What can happen is that some code has a lock imbalance or a
preempt_disable imbalance and it does preempt_disable() so many times
that the counter overflows eight bits and starts to increment the
softirq counter, then the hardirq counter, then in_interrupt() starts
incorrectly returning true then blam.

You could confirm/debug it with something along the lines of this:

--- a/mm/vmalloc.c~a
+++ a/mm/vmalloc.c
@@ -214,7 +214,9 @@ __get_vm_area_node(unsigned long size, u
 	unsigned long align = 1;
 	unsigned long addr;
 
-	BUG_ON(in_interrupt());
+	if (preempt_count() > 10)
+		printk("%s: preempt_count()=%d\n", __func__, preempt_count());
+	WARN_ON(in_interrupt());
 	if (flags & VM_IOREMAP) {
 		int bit = fls(size);
 
_


But this bug could be in practically anywhere in the kernel and
bisection is by far the best way to find it.  It's sad and odd that
bisection landed you on a merge commit.  I'd suggest that you persist
with the bisection (please). 
http://www.kernel.org/doc/local/git-quick.html#example might be useful.



--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Linux 2.6.27-rc3: kernel BUG at mm/vmalloc.c - bisected, Alan D. Brunelle, (Wed Aug 13, 7:03 pm)
Re: Linux 2.6.27-rc3: kernel BUG at mm/vmalloc.c - bisected, Andrew Morton, (Tue Aug 19, 3:46 pm)
Re: Linux 2.6.27-rc3: kernel BUG at mm/vmalloc.c - bisected, Alan D. Brunelle, (Fri Aug 22, 11:37 am)
Re: Linux 2.6.27-rc3: kernel BUG at mm/vmalloc.c - bisected, Alan D. Brunelle, (Fri Aug 22, 3:47 pm)
Re: Linux 2.6.27-rc3: kernel BUG at mm/vmalloc.c - bisected, Alan D. Brunelle, (Fri Aug 22, 4:17 pm)
Re: Linux 2.6.27-rc3: kernel BUG at mm/vmalloc.c - bisected, Alan D. Brunelle, (Fri Aug 22, 2:07 pm)
Re: Linux 2.6.27-rc3: kernel BUG at mm/vmalloc.c - bisected, Rafael J. Wysocki, (Thu Aug 14, 12:14 pm)
Re: Linux 2.6.27-rc3: kernel BUG at mm/vmalloc.c - bisected, Alan D. Brunelle, (Thu Aug 14, 3:21 pm)
Re: Linux 2.6.27-rc3: kernel BUG at mm/vmalloc.c - bisected, Rafael J. Wysocki, (Thu Aug 14, 4:29 pm)
Re: Linux 2.6.27-rc3: kernel BUG at mm/vmalloc.c - bisected, Alan D. Brunelle, (Wed Aug 13, 7:27 pm)