From owner-freebsd-current@FreeBSD.ORG Thu Feb 12 07:05:08 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A5EA816A4CE for ; Thu, 12 Feb 2004 07:05:08 -0800 (PST) Received: from white.imgsrc.co.jp (ns.imgsrc.co.jp [210.226.20.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 77AD143D1F for ; Thu, 12 Feb 2004 07:05:08 -0800 (PST) (envelope-from kuriyama@imgsrc.co.jp) Received: from localhost (localhost [127.0.0.1]) by white.imgsrc.co.jp (Postfix) with ESMTP id 308BF28410C; Fri, 13 Feb 2004 00:05:07 +0900 (JST) Received: from black.imgsrc.co.jp (black.imgsrc.co.jp [IPv6:2001:218:422:2::130]) by white.imgsrc.co.jp (Postfix) with ESMTP id 5D2F12840ED; Fri, 13 Feb 2004 00:05:05 +0900 (JST) Received: from black.imgsrc.co.jp (black.imgsrc.co.jp [IPv6:2001:218:422:2::130]) by black.imgsrc.co.jp (Postfix) with ESMTP id C8C891E4620; Fri, 13 Feb 2004 00:05:04 +0900 (JST) Date: Fri, 13 Feb 2004 00:05:04 +0900 Message-ID: <7msmhgz6cf.wl@black.imgsrc.co.jp> From: Jun Kuriyama To: Kirk McKusick User-Agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 Emacs/21.3 (i386--freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS snapshot-20020531 X-Mailman-Approved-At: Fri, 13 Feb 2004 05:23:30 -0800 cc: Current Subject: -current lock up at dump -L with snapshot X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2004 15:05:08 -0000 I'm still tracking down why my box is usually locking up. Reference: http://docs.freebsd.org/cgi/mid.cgi?7mznedas57.wl I try to simplify how to reproduce this. (a) A filesystem without any snapshot, I can take a dump -L. (b) A filesystem with a snapshot, I can take a dump (without -L). (c) A filesystem with a snapshot, I cannot take a dump -L. % dump -1 -f /dev/null -S -L / DUMP: Date of this level 1 dump: Thu Feb 12 23:52:43 2004 DUMP: Date of last level 0 dump: Wed Feb 11 16:30:22 2004 DUMP: Dumping snapshot of /dev/ad4s1a (/) to /dev/null DUMP: mapping (Pass I) [regular files] <--- stopped here This filesystem is /, so softdep is disabled, but situation is the same with softdep. "dump -L" is doing following: 1) take a snapshot: "mksnap_ffs / /.snap/dump_snapshot". 2) open a snapshot: open("/.snap/dump_snapshot", O_RDONLY). 3) unlink a snapshot: unlink("/.snap/dump_snapshot") 4) ... 5) pread(2) opened snapshot. dump(8) is locked at 5) syscall. At that time, ddb's "show lockedvnods" shows (line number may be different by my debug codes): ----- 0xc8194de0: tag ufs, type VREG, usecount 1, writecount 0, refcount 9, flags (VV_SYSTEM|VV_OBJBUF), lock type snplk2: SHARED (count 1) with 3 pending @ kern/vfs_vnops.c:529 by vop_stdlock (thread 0xc809a000 (pid 52934)) ino 187, on dev ad0s1a (4, 12) 0xc777b818: tag ufs, type VREG, usecount 1, writecount 0, refcount 9, flags (VV_SYSTEM), lock type snplk2: SHARED (count 1) with 3 pending @ kern/vfs_vnops.c:529 by vop_stdlock (thread 0xc809a000 (pid 52934)) ino 178, on dev ad0s1a (4, 12) ----- It looks there is a problem around removing a snapshot with opened file descriptor. But I'm not sure why there is no problem when I have no another snapshot in that filesystem. Is there any hints to track this down more? Any comments appreciated. -- Jun Kuriyama // IMG SRC, Inc. // FreeBSD Project