From tk@ef80.jnx.de  Sun Aug 24 13:10:55 2003
Return-Path: <tk@ef80.jnx.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8F75D16A4C0
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Aug 2003 13:10:55 -0700 (PDT)
Received: from webmail.tiscali.de (relay1.tiscali.de [62.26.116.129])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7721543FE0
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Aug 2003 13:10:54 -0700 (PDT)
	(envelope-from tk@ef80.jnx.de)
Received: from Haby.thorstenK.nu (213.54.46.165) by webmail.tiscali.de (6.7.019)
        id 3F2FB429005046DC for FreeBSD-gnats-submit@freebsd.org; Sun, 24 Aug 2003 22:10:53 +0200
Received: from ef80.jnx.de (ef80.thorstenK.nu [10.0.0.42])
	by Haby.thorstenK.nu (8.12.9/8.12.9) with ESMTP id h7OKApZN009416
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Aug 2003 22:10:52 +0200 (CEST)
	(envelope-from tk@ef80.jnx.de)
Received: from ef80.jnx.de (localhost.jnx.de [127.0.0.1])
	by ef80.jnx.de (8.12.9/8.12.9) with ESMTP id h7OKAvej001266
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Aug 2003 22:10:57 +0200 (CEST)
	(envelope-from tk@ef80.jnx.de)
Received: (from tk@localhost)
	by ef80.jnx.de (8.12.9/8.12.9/Submit) id h7OKAvVT001265;
	Sun, 24 Aug 2003 22:10:57 +0200 (CEST)
Message-Id: <200308242010.h7OKAvVT001265@ef80.jnx.de>
Date: Sun, 24 Aug 2003 22:10:57 +0200 (CEST)
From: Thorsten Kuehnemann <Thorsten.Kuehnemann@Hamburg.de>
Reply-To: Thorsten Kuehnemann <Thorsten.Kuehnemann@Hamburg.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: kernel panics while restoring into vinum volume with 64MB RAM
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         55934
>Category:       kern
>Synopsis:       [vinum] [workaround] kernel panics while restoring into vinum volume with 64MB RAM
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    le
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 24 13:20:09 PDT 2003
>Closed-Date:    Sat Nov 26 15:26:13 GMT 2005
>Last-Modified:  Sat Nov 26 15:26:13 GMT 2005
>Originator:     Thorsten Kuehnemann
>Release:        FreeBSD 5.1-RELEASE-p2 i386
>Organization:
private
>Environment:
System: FreeBSD ef80.jnx.de 5.1-RELEASE-p2 FreeBSD 5.1-RELEASE-p2 #0: Wed Aug 20 13:41:44 CEST 2003 tk@ef80.jnx.de:/home/usr/obj/home/usr/src/sys/GENERIC-DEBUG i386
	GENERIC-DEBUG is GENERIC with activated "makeoptions DEBUG=-g"
	
	The machine has only 64 MB RAM.

>Description:
	While restoring a filesystem into a vinum volume /dev/vinum/root
	the kernel panics with the message:
	   panic: kmem_malloc(4096): kmem_map too small: 27398144 total allocated

	Restoring the same data into a manually calculated overlay
	partition /dev/da0s1a (as described in Chapter 13.9.2 of the Handbook)
	works without problems.
>How-To-Repeat:
	On a system with only 64 MB RAM create a big vinum volume for
	root and start to dump/restore all filesystems (with populated
	/usr/src and /usr/ports) into the new volume.
>Fix:
	1. Add the following line to the file /boot/lader.conf:
	   kern.vm.kmem.size="59000000"

	Question to the kernel expert: Is it a good idea to change
	the default calculation of vm_kmem_size in
	/sys/kern/kern_malloc.c for low memory systems
	(for example lower VM_KMEM_SIZE_SCALE)???

	or

	2. Inrease the physical RAM size to a minimum of 128MB.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->grog 
Responsible-Changed-By: kris 
Responsible-Changed-When: Fri Oct 10 22:28:22 PDT 2003 
Responsible-Changed-Why:  
Assign to vinum author 

http://www.freebsd.org/cgi/query-pr.cgi?pr=55934 
Responsible-Changed-From-To: grog->le 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Sep 9 19:02:37 GMT 2004 
Responsible-Changed-Why:  
With permission of both, reassign from grog to le. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=55934 
State-Changed-From-To: open->closed 
State-Changed-By: le 
State-Changed-When: Sat Nov 26 15:24:46 GMT 2005 
State-Changed-Why:  
Without proper debugging information it is a bit hard to find out 
why the kernel mem is exhausted there. 

Also, since 'classic' vinum isn't supported anymore, I'm closing this PR. 
If the described behaviour also exists in geom_vinum, a new PR can be 
opened. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=55934 
>Unformatted:
