From owner-freebsd-fs@FreeBSD.ORG Sun May 19 23:47:27 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4D4AB555; Sun, 19 May 2013 23:47:27 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) by mx1.freebsd.org (Postfix) with ESMTP id B5582E90; Sun, 19 May 2013 23:47:26 +0000 (UTC) Received: by mail-wi0-f174.google.com with SMTP id c10so1630619wiw.1 for ; Sun, 19 May 2013 16:47:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=oOf9moy1ztdnPXpuMr8YEyl6Vu7otMhV6zXGpMSamUU=; b=ntO+m+TGba/fthjiWrkWbo7qA60Vt3a+rfYhyj2yFed+ad3IE8vE1tKUiDj/luWX22 GPj0cx5bYhq89cbfiDpNHz98SgvtRJ7nc5TJh9/prTsGaQVCHaZGWOvCPKkcOkaYIvYN eG0wecVYZpXqUjkdY/3q0ekMVfgvwzolOZ7uLE+tB+QMKA191kW1T7ld7sl42NdQEssI E6NQLuRegW31SGPTjcJuzGIHOqKNxx0/wMQAckxWqWsN9NgY9ElpjxZl6u100XZVkPqV rfZSz/74AhwtafyAGVNR7Zeio4Sy0hTe3Rnk+qBARIPPxZL/rpFXyfanC+kHRrqOa/EV dcqA== MIME-Version: 1.0 X-Received: by 10.180.21.167 with SMTP id w7mr8589194wie.2.1369007245760; Sun, 19 May 2013 16:47:25 -0700 (PDT) Sender: antoine.brodin.freebsd@gmail.com Received: by 10.194.91.143 with HTTP; Sun, 19 May 2013 16:47:25 -0700 (PDT) In-Reply-To: References: Date: Sun, 19 May 2013 23:47:25 +0000 X-Google-Sender-Auth: Dy6zgy6vvT7D1k4LCTR0neY_pL0 Message-ID: Subject: Re: Nullfs - Panic when umounting and lower fs has been removed From: Antoine Brodin To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Konstantin Belousov X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2013 23:47:27 -0000 On Sun, May 19, 2013 at 8:41 PM, Antoine Brodin wrote: > Hi there, > > I encountered a panic on head today with nullfs using poudriere. > > It is quite easy to reproduce, the script is probably doing something > wrong but panicking is not nice > > %%% > mkdir /tmp/.new_packages /mnt/new_packages > mount -t nullfs /tmp/.new_packages /mnt/new_packages > dd if=/dev/zero of=/mnt/new_packages/bar count=20000 > mv /tmp/.new_packages/bar /tmp/ > rm -rf /tmp/.new_packages > umount -f /mnt/new_packages > %%% > > The panic: > > userret: returning with the following locks held: > exclusive lockmgr ufs (ufs) r = 0 (0xfffffe0010a77548) locked @ > /usr/src/sys/modules/nullfs/../../fs/nullfs/null_vnops.c:615 > panic: witness_warn > cpuid = 0 > KDB: enter: panic > > db:1:lockinfo> show locks > exclusive lockmgr ufs (ufs) r = 0 (0xfffffe0010a77548) locked @ > /usr/src/sys/modules/nullfs/../../fs/nullfs/null_vnops.c:615 > > db:1:locks> show alllocks > Process 1032 (umount) thread 0xfffffe0010623920 (100116) > exclusive lockmgr ufs (ufs) r = 0 (0xfffffe0010a77548) locked @ > /usr/src/sys/modules/nullfs/../../fs/nullfs/null_vnops.c:615 > > db:1:alllocks> show lockedvnods > Locked vnodes > 0xfffffe0010a774e0: tag ufs, type VDIR > usecount 0, writecount 0, refcount 0 mountedhere 0 > flags (VI_FREE) > v_object 0xfffffe0010af0960 ref 0 pages 0 > #0 0xffffffff8088cd59 at __lockmgr_args+0x979 > #1 0xffffffff80af4df2 at ffs_lock+0x92 > #2 0xffffffff80ce96f9 at VOP_LOCK1_APV+0xf9 > #3 0xffffffff81a5f8df at null_lock+0xdf > #4 0xffffffff80ce96f9 at VOP_LOCK1_APV+0xf9 > #5 0xffffffff8095a836 at _vn_lock+0xc6 > #6 0xffffffff8094b681 at vflush+0x3a1 > #7 0xffffffff81a5eace at nullfs_unmount+0x2e > #8 0xffffffff809436cb at dounmount+0x39b > #9 0xffffffff8094330b at sys_unmount+0x37b > #10 0xffffffff80c41322 at amd64_syscall+0x282 > #11 0xffffffff80c2981b at Xfast_syscall+0xfb > > db:0:kdb.enter.panic> bt > Tracing pid 1032 tid 100116 td 0xfffffe0010623920 > kdb_enter() at kdb_enter+0x3e/frame 0xffffff8122567940 > vpanic() at vpanic+0x146/frame 0xffffff8122567980 > kassert_panic() at kassert_panic+0x136/frame 0xffffff81225679f0 > witness_warn() at witness_warn+0x4e4/frame 0xffffff8122567ab0 > userret() at userret+0x89/frame 0xffffff8122567ae0 > amd64_syscall() at amd64_syscall+0x397/frame 0xffffff8122567bf0 > Xfast_syscall() at Xfast_syscall+0xfb/frame 0xffffff8122567bf0 > --- syscall (0, FreeBSD ELF64, nosys), rip = 0x80087abcc, rsp = > 0x7fffffffd398, rbp = 0x800c0a9d0 --- Reverting r250505 fixes this issue. Cheers, Antoine