Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 May 2006 17:03:02 -0400
From:      Kris Kennaway <kris@obsecurity.org>
To:        Iasen Kostov <tbyte@otel.net>
Cc:        freebsd-stable@freebsd.org, Kris Kennaway <kris@obsecurity.org>
Subject:   Re: kmem leak in tmpmfs?
Message-ID:  <20060526210302.GA72999@xor.obsecurity.org>
In-Reply-To: <1148639184.78660.32.camel@DraGoN.OTEL.net>
References:  <wpy7wq6qlh.fsf@heho.labo> <20060525205414.GC30137@xor.obsecurity.org> <1148639184.78660.32.camel@DraGoN.OTEL.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--/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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060526210302.GA72999>