Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Feb 2007 16:09:44 -0500
From:      Kris Kennaway <kris@obsecurity.org>
To:        Mikhail Teterin <mi+kde@aldan.algebra.com>
Cc:        stable@FreeBSD.org
Subject:   Re: panic: kmem_malloc(16384): kmem_map too small: md-mounted /tmp filled up
Message-ID:  <20070227210943.GA56889@xor.obsecurity.org>
In-Reply-To: <200702271059.09230@aldan>
References:  <200702271059.09230@aldan>

next in thread | previous in thread | raw e-mail | index | archive | help
Documented in the manpage, use swap backing or reserve enough space.

Kris

On Tue, Feb 27, 2007 at 10:59:08AM -0500, Mikhail Teterin wrote:
> The memory-mounted /tmp filled up on this 6.2-PRERELEASE system (as of Nov 7).
> 
> Unfortunately, instead of the process existing due to ENOSPC, the entire 
> system paniced:
> 
> [...]
> g_vfs_done():md0[WRITE(offset=982335488, length=131072)]error = 28
> g_vfs_done():md0[WRITE(offset=982466560, length=131072)]error = 28
> panic: kmem_malloc(16384): kmem_map too small: 259153920 total allocated
> Uptime: 34d21h13m21s
> Dumping 767 MB (2 chunks)
>   chunk 0: 1MB (159 pages) ... ok
>   chunk 1: 767MB (196288 pages) 751 735 719 703 687 671 655 639 623 607 591 
> 575 559 543 527 511 495 479 463 447 431 415 399 383 367 351 335 319 303 287 
> 271 255 239 223 207 191 175 159 143 127 111 95 79 63 47 31 15 ... ok
> 
> Dump complete
> Automatic reboot in 15 seconds - press a key on the console to abort
> Rebooting...
> 
> I don't think, such DoS-ing is normal -- a regular user shot the entire system 
> in the knee...
> 
> Is anybody interested in the stack/etc.? Is this something, that's fixed in 
> the more recent 6.2?
> 
> Machine has 3/4Gb RAM and ample swap:
> 
> 	Device          1K-blocks     Used    Avail Capacity
> 	/dev/ad0s1b       3145728       32  3145696     0%
> 	/dev/ad2s1b       1048576       32  1048544     0%
> 	Total             4194304       64  4194240     0%
> 
> /tmp's space allocation (after reboot) is as follows:
> 
> 	Filesystem 1K-blocks Used   Avail Capacity  Mounted on
> 	/dev/md0     2026030 3552 1860396     0%    /tmp
> 
> Note, that it is supposed to hold 2Gb, but was filled up and paniced holding 
> about 300Mb... Probably, because it is created with ``-M'' by default -- but 
> it is not supposed to panic anyway!
> 
> Please, advise. Thanks!
> 
> 	-mi
> _______________________________________________
> freebsd-stable@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
> 



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