Subject: Re: Kernel panic while building emacs..
To: Martijn van Buul <martijnb@atlas.ipv6.stack.nl>
From: Martin Husemann <martin@duskware.de>
List: port-amd64
Date: 08/16/2006 15:18:31
--vkogqOf2sHV7VnPd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Tue, Aug 15, 2006 at 07:54:18PM +0000, Martijn van Buul wrote:
> panic: kernel diagnostic assertion "idx < VMEM_MAXORDER" failed: file "/usr/export/src/sys/kern/subr_vmem.c", line 267

Could you build a kernel with attached patch and try to reproduce it?
This will not fix it, but give some debugging aid. Looks like something is
trying to allocate *huge* chunks of vmem.

Martin

--vkogqOf2sHV7VnPd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch

Index: subr_vmem.c
===================================================================
RCS file: /cvsroot/src/sys/kern/subr_vmem.c,v
retrieving revision 1.3
diff -u -r1.3 subr_vmem.c
--- subr_vmem.c	21 Jul 2006 10:08:41 -0000	1.3
+++ subr_vmem.c	16 Aug 2006 13:16:25 -0000
@@ -155,6 +155,9 @@
 		i++;
 	}
 
+	if (i >= VMEM_MAXORDER)
+		panic("vmem calc_order(%zu) calculeted index %d >= VMEM_MAXORDER",
+		    size, i);
 	KASSERT(1 << i <= size);
 	KASSERT(size < 1 << (i + 1));
 

--vkogqOf2sHV7VnPd--