Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 May 2007 16:39:09 -0400 (EDT)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        freebsd-fs@freebsd.org, Craig Boston <craig@xfoil.gank.org>, freebsd-current@freebsd.org, Peter Schuller <peter.schuller@infidyne.com>, Pawel Jakub Dawidek <pjd@freebsd.org>
Subject:   Re: ZFS committed to the FreeBSD base.
Message-ID:  <Pine.GSO.4.63.0705011630010.15295@muncher>
In-Reply-To: <20070501160213.GA496@xor.obsecurity.org>
References:  <20070407165759.GG8831@cicely12.cicely.de> <20070407180319.GH8831@cicely12.cicely.de> <20070407191517.GN63916@garage.freebsd.pl> <20070407212413.GK8831@cicely12.cicely.de> <20070410003505.GA8189@nowhere> <46365F76.7090708@infidyne.com> <20070430213043.GF67738@garage.freebsd.pl> <463665F2.8090605@infidyne.com> <46373CAD.6000502@infidyne.com> <Pine.GSO.4.63.0705011033410.23282@muncher> <20070501160213.GA496@xor.obsecurity.org>

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


On Tue, 1 May 2007, Kris Kennaway wrote:
>> I don't know if it relevent, but I've seen "kmem_map: too small" panics
>> when testing my NFSv4 server, ever since about FreeBSD5.4. There is no
>> problem running the same server code on FreeBSD4 (which is what I still
>> run in production mode) or OpenBSD3 or 4. If I increase the size of the
>> map, I can delay the panic for up to about two weeks of hard testing,
>> but it never goes away. I don't see any evidence of a memory leak during
>> the several days of testing leading up to the panic. (NFSv4 uses
>> MALLOC/FREE extensively for state related structures.)
>
> Sounds exactly like a memory leak to me.  How did you rule it out?
Well, I had a little program running on the server that grabbed the
mti_stats[] out of the kernel and logged them. I had one client mounted
running thousands of passes of the Connectathon basic tests (one client,
same activity over and over and over again). For a week, the stats don't
show any increase in allocation for any type (alloc - free doesn't get
unreasonably big), then..."panic: kmem_map too small". How many days it
took to happen would vary with the size of the kernel map, but no evidence
of a leak prior to the crash. It seemed to be based on the number of times
MALLOC and FREE were called.

Also, the same server code (except for the port changes, which have 
nothing to do with the state handling where MALLOC/FREE get called a lot),
works fine for months on FreeBSD4 and OpenBSD3.9.

So, I won't say a "memory leak is ruled out", but if there was a leak why
wouldn't it bite FreeBSD4 or show up in mti_stats[]?

I first saw it on FreeBSD6.0, but went back to FreeBSD5.4 and tried the
same test and got the same result.

rick




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