From owner-freebsd-stable@FreeBSD.ORG Fri May 26 21:03:03 2006 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 CF7A316AAC0 for ; Fri, 26 May 2006 21:03:03 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8823443D4C for ; Fri, 26 May 2006 21:03:03 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 6842A1A4DAE; Fri, 26 May 2006 14:03:03 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id B9FB751559; Fri, 26 May 2006 17:03:02 -0400 (EDT) Date: Fri, 26 May 2006 17:03:02 -0400 From: Kris Kennaway To: Iasen Kostov Message-ID: <20060526210302.GA72999@xor.obsecurity.org> References: <20060525205414.GC30137@xor.obsecurity.org> <1148639184.78660.32.camel@DraGoN.OTEL.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline In-Reply-To: <1148639184.78660.32.camel@DraGoN.OTEL.net> User-Agent: Mutt/1.4.2.1i Cc: freebsd-stable@freebsd.org, Kris Kennaway Subject: Re: kmem leak in tmpmfs? 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: Fri, 26 May 2006 21:03:05 -0000 --/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 26, 2006 at 01:26:24PM +0300, Iasen Kostov wrote: > On Thu, 2006-05-25 at 16:54 -0400, Kris Kennaway wrote: > > On Thu, May 25, 2006 at 06:01:30PM +0200, Arno J. Klaassen wrote: > > > Hello, > > >=20 > > > I get a very easy to reproduce panic on 6.1-STABLE : > > >=20 > > > /etc/periodic/weekly/310.locate panics with > > >=20 > > > panic: kmem_malloc(4096): kmem_map too small: 335544320 total alloc= ated > >=20 > > It looks like you are using a malloc-backed md and you do not have > > enough RAM to handle the size. Perhaps tmpmfs does not use swap > > backing, as it is supposed to? > >=20 > > Kris >=20 > First of all if there is not enough kmem (not just plain ram I think) > kernel should not allow disk creation in first place, second - I think > (although there could be some ... reason for that) it's stupid way to > say "I don't have more kmem" by panicing :). Better way will be just to > fail disk operation of that FS with "Disk is full" or something like > that. At home I tried to raise kmem like that: > "vm.kmem_size_max=3D"1073741824" (I got 2G of RAM) > (setting vm.kmem_size directly panices kernel at boot if I remember > correctly). >=20 > but for my surprise kernel panices at exact same allocated md disk space > with the same panic as the original poster's. Is it possible that I > should rise KVA_PAGES too ? And I don't think its documented anywhere > (of course I've tried googling and it's always possible that I've missed > something :). All this was on FreeBSD 6.0. It's documented in the mdconfig manpage including how to make it not panic. Kris --/04w6evG8XlLl3ft Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEd20GWry0BWjoQKURArPEAKC37ldmPhGJ6BQ64QLt1G5rwiGemwCeJ/Lr 2qpgRSSJ5yfysXkfi53Hbgw= =UE+M -----END PGP SIGNATURE----- --/04w6evG8XlLl3ft--