From owner-freebsd-fs@FreeBSD.ORG Thu Mar 17 13:41:48 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D36A6106564A; Thu, 17 Mar 2011 13:41:48 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id AD2DB8FC08; Thu, 17 Mar 2011 13:41:47 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA26109; Thu, 17 Mar 2011 15:41:43 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <4D820F97.5090201@freebsd.org> Date: Thu, 17 Mar 2011 15:41:43 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110309 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: luke@hybrid-logic.co.uk References: <1300334881.3837.126.camel@pow> <20110317113744.GT78089@deviant.kiev.zoral.com.ua> <1300365280.3837.129.camel@pow> In-Reply-To: <1300365280.3837.129.camel@pow> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org Subject: Re: Guaranteed kernel panic with ZFS + nullfs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Mar 2011 13:41:48 -0000 on 17/03/2011 14:34 Luke Marsden said the following: > On Thu, 2011-03-17 at 13:37 +0200, Kostik Belousov wrote: >> [Enormous Cc: list trimmed down] >> On Thu, Mar 17, 2011 at 12:08:01AM -0400, Luke Marsden wrote: >>> Hi all, >>> >>> The following script seems to cause a guaranteed kernel panic on 8.1-R, >>> 8.2-R and 8-STABLE as of today (2011-03-16), with both ZFS v14/15, and >>> v28 on 8.2-R with mm@ patches from 2011-03. I suspect it may also affect >>> 9-CURRENT but have not tested this yet. >>> >>> #!/usr/local/bin/bash >>> export POOL=hpool # change this to your pool name >>> sudo zfs destroy -r $POOL/foo >>> sudo zfs create $POOL/foo >>> sudo zfs set mountpoint=/foo $POOL/foo >>> sudo mount -t nullfs /foo /bar >>> sudo touch /foo/baz >>> ls /bar # should see baz >>> sudo zfs umount -f $POOL/foo # seems okay (ls: /bar: Bad file >>> descriptor) I believe that it's a bad idea to forcefully unmount a filesystem under a nullfs mount. Without -f the unmounting wouldn't succeed? >>> sudo zfs mount $POOL/foo # PANIC! >>> >>> Can anyone suggest a patch which fixes this? Preferably against >>> 8-STABLE :-) >> Please show the backtrace. >> > > Here you go: > > http://lukemarsden.net/zfs-panic-1.png > http://lukemarsden.net/zfs-panic-2.png IMO this is expected. I am not sure if this is ZFS specific or if it can happen with any kind of an underlying filesystem. Maybe Edward would be interested in fixing this behavior? :) -- Andriy Gapon