From owner-freebsd-stable@FreeBSD.ORG Wed Dec 14 15:40:58 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1AA5616A41F; Wed, 14 Dec 2005 15:40:58 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 92CB543D7F; Wed, 14 Dec 2005 15:40:52 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.14] (imini.samsco.home [192.168.254.14]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id jBEFeiGH004672; Wed, 14 Dec 2005 08:40:45 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <43A03CFC.6070406@samsco.org> Date: Wed, 14 Dec 2005 08:40:44 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.7) Gecko/20050416 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Gleb Smirnoff References: <20051214132530.3b6daecd@TP51.local> <20051214131855.GH59644@FreeBSD.org> In-Reply-To: <20051214131855.GH59644@FreeBSD.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on pooker.samsco.org Cc: freebsd-stable@freebsd.org Subject: Re: FreeBSD 6.0 panic: kmem_malloc(16384): kmem_map too small: 172728320 total allocated X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2005 15:40:58 -0000 Gleb Smirnoff wrote: > On Wed, Dec 14, 2005 at 01:25:30PM +0100, Fabian Keil wrote: > F> I triggered a few reproducible panics on FreeBSD 6.0-STABLE. > F> > F> I created a ramdisk with: > F> > F> /sbin/mdconfig -a -t malloc -s 256M -u 10 > F> /sbin/newfs -U /dev/md10 > F> /sbin/mount /dev/md10 /mnt/ramdisk > F> > F> The system has "avail memory = 515932160 (492 MB)" > F> and 1GB swap space. > F> > F> While copying to /mnt/ramdisk trough ftp localhost > F> it got: > > This usually exposes some memory leak in kernel. Can you please do the > following - copy some amount of data to /mnt/ramdisk trough ftp localhost, > and cancel the operation before it panics. > > Then run vmstat -m and vmstat -z, to determine what kind of memory allocation > is leaking. > > While it can mean a memory leak in the kernel, I don't think that's the case here. On i386, only 320MB can be allocated to kernel malloc memory. Much of this space can get consumed with vnodes and other filesystem structures, so trying to allocate 256MB to a ramdisk is likely putting you over the max. I'd suggest instead to use a swap-back disk. It doesn't necessarily mean that the ramdisk pages will live in swap, it just means that they will get managed directly in the bufcache, eliminating the 320MB restriction. Scott