Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 May 2006 19:57:56 +0200
From:      Fabian Keil <freebsd-listen@fabiankeil.de>
To:        "Arno J. Klaassen" <arno@heho.snv.jussieu.fr>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: kmem leak in tmpmfs?
Message-ID:  <20060525195756.7eaf4aa2@localhost>
In-Reply-To: <wpy7wq6qlh.fsf@heho.labo>
References:  <wpy7wq6qlh.fsf@heho.labo>

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

[-- Attachment #1 --]
"Arno J. Klaassen" <arno@heho.snv.jussieu.fr> wrote:

> Hello,
> 
> I get a very easy to reproduce panic on 6.1-STABLE :
> 
> /etc/periodic/weekly/310.locate panics with
> 
>   panic: kmem_malloc(4096): kmem_map too small: 335544320 total
> allocated

> This box has nothing particular, apart from maybe a large number
> of stamp-file based test-databases (with a lot of zero-sized
> files named .key=value).
> Producing this bug is easy :
> 
>  - set tmpmfs="YES" and set tmpsize greater than around 220m
>  - start /etc/periodic/weekly/310.locate (and nothing else!)
>  - wait two-three hours and bang
> 
> Last test is with tmpfs=1024m and I monitored df -h /tmp and
> vmstat -zm every minute; when the system panics, last output is :
> 
>   Filesystem    Size    Used   Avail Capacity  Mounted on
>   /dev/md0      989M    219M    691M    24%    /var/tmp
> 
>   vmstat -zm | fgrep md0
>   md0:             512,        0,  453257,     15,   453437
> 
> I'm quite not an expert, but looks to me as if md0 use stays
> almost 100% in kmem and is never swapped (as it is supposed to do
> by default according to the man-page).

The rc script has different defaults than mdmfs:

fk@TP51 ~ $grep tmpmfs_flags /etc/defaults/rc.conf 
tmpmfs_flags="-S -M"    # Extra mdmfs options for the mfs /tmp

You probably want to ditch the "-M".

Fabian
-- 
http://www.fabiankeil.de/

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (FreeBSD)

iD8DBQFEdfApjV8GA4rMKUQRAlQgAJ93eF5uhuyA9wjYsv11DVvxalTLJACeJZvg
7u40GgI18Heskl0UMJMUSBI=
=wt/E
-----END PGP SIGNATURE-----

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