From owner-freebsd-stable@FreeBSD.ORG Fri Sep 24 12:33:33 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B28CE106564A for ; Fri, 24 Sep 2010 12:33:33 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta03.emeryville.ca.mail.comcast.net (qmta03.emeryville.ca.mail.comcast.net [76.96.30.32]) by mx1.freebsd.org (Postfix) with ESMTP id 972948FC13 for ; Fri, 24 Sep 2010 12:33:33 +0000 (UTC) Received: from omta12.emeryville.ca.mail.comcast.net ([76.96.30.44]) by qmta03.emeryville.ca.mail.comcast.net with comcast id Abov1f0010x6nqcA3cZZcq; Fri, 24 Sep 2010 12:33:33 +0000 Received: from koitsu.dyndns.org ([98.248.41.155]) by omta12.emeryville.ca.mail.comcast.net with comcast id AcZY1f0023LrwQ28YcZY0k; Fri, 24 Sep 2010 12:33:32 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id F357F9B425; Fri, 24 Sep 2010 05:33:31 -0700 (PDT) Date: Fri, 24 Sep 2010 05:33:31 -0700 From: Jeremy Chadwick To: Leroy van Logchem Message-ID: <20100924123331.GA62762@icarus.home.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-stable@freebsd.org Subject: Re: 8.1-RELEASE: [zfs] [kmem] zfs destroy snapshot results in panic: kmem_map too small 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, 24 Sep 2010 12:33:33 -0000 On Fri, Sep 24, 2010 at 01:24:46PM +0200, Leroy van Logchem wrote: > ----------------------------------------------------------------------------- > Problem : Kernel panic "kmem_malloc(114688): kmem_map too small > Trigger : Destroy ZFS snapshots (each bigger >80GB) > Version : FreeBSD 8.1-RELEASE (GENERIC AMD64 but with DDB) > ... > panic: kmem_malloc(114688): kmem_map too small: 3307884544 total allocated > cpuid = 2 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2a > panic() at panic+0x182 > kmem_malloc() at kmem_malloc+0x5b5 > uma_large_malloc() at uma_large_malloc+0x4a > malloc() at malloc+0x14b > zio_compress_data() at zio_compress_data+0xa2 > zio_write_bp_init() at zio_write_bp_init+0xc2 > zio_exectute() at zio_execute+0x77 > taskq_run_safe() at taskq_run_safe+0x13 > taskqueue_run() at taskqueue_run+0x91 > taskqueue_thread_loop() at taskqueue_thread_loop+0x3f > fork_exit() at fork_exit+0x12a > fork_trampoline() at fork_trampoline+0xe > --- trap 0, rip = 0, rsp = 0xffffff81261edd30, rbp = 0 --- > panic: kmem_malloc(118784): kmem_map too small: 3307884544 total allocated > cpuid = 2 Can you please provide uname -a output? The built date of your kernel matters in this case. The panic looks like uma(9) is in use, which was enabled by default and then later reverted/removed, so this is why the build date matters. If "sysctl vfs.zfs.zio.use_uma" shows a value of 1, then please put this in your /boot/loader.conf to disable uma use: # Disable UMA (uma(9)) for ZFS; amd64 was moved to exclusively use UMA # on 2010/05/24. # http://lists.freebsd.org/pipermail/freebsd-stable/2010-June/057162.html vfs.zfs.zio.use_uma="0" If you upgrade to RELENG_8, you won't have to set this. As for your questions under "Questions" -- yes you have to tune, no there aren't really "reliable guidelines" and I've been asking for such since ZFS came out for FreeBSD, but your values look fine. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |