From owner-freebsd-current@FreeBSD.ORG Sun Jun 6 06:33:19 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 A7BA216A4CE for ; Sun, 6 Jun 2004 06:33:19 -0700 (PDT) Received: from black3.imgsrc.co.jp (black3.imgsrc.co.jp [210.226.20.147]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED33643D39 for ; Sun, 6 Jun 2004 06:33:18 -0700 (PDT) (envelope-from kuriyama@imgsrc.co.jp) Received: from localhost (localhost [127.0.0.1]) by black3.imgsrc.co.jp (Postfix) with ESMTP id AF0E250B5D; Sun, 6 Jun 2004 22:33:17 +0900 (JST) Received: from black3.imgsrc.co.jp (black3.imgsrc.co.jp [IPv6:2001:218:422:2::9999]) by black3.imgsrc.co.jp (Postfix) with ESMTP id 6372B50881; Sun, 6 Jun 2004 22:33:16 +0900 (JST) Date: Sun, 06 Jun 2004 22:33:16 +0900 Message-ID: <7moenw4xr7.wl@black3.imgsrc.co.jp> From: Jun Kuriyama To: Kirk McKusick In-Reply-To: References: User-Agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386--freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd 0.1 cc: freebsd-current@freebsd.org cc: Frode Nordahl Subject: Re: UFS snapshot deadlocks 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: Sun, 06 Jun 2004 13:33:19 -0000 At Fri, 4 Jun 2004 15:06:55 +0000 (UTC), Frode Nordahl wrote: > The following is a 100% reproducible procedure to make it happen: > > Running 5.2-CURRENT #0: Fri Jun 4 15:07:54 CEST 2004 > > tty1: > while (1) > ls -la /usr/.snap > end > > tty2: > dump -0af /some/where -C 32 -L /dev/ad0s1f I can also reproduce this with above steps. FWIW, I did them with debug.snapdebug=1. It looks we are in the deadlock between mksnap_ffs and ls... ----- ffs_snapgone: lost snapshot vnode 1346 ffs_snapshot: busy vnode: 0xc1354924: tag ufs, type VDIR, usecount 1, writecount 0, refcount 1, flags (VV_ROOT|VV_OBJBUF), lock type ufs: EXCL (count 1) by thread 0xc12ff420 (pid 870) ino 2, on dev ad0s1e (4, 16) ### go to debugger ### db> ps pid proc uarea uid ppid pgrp flag stat wmesg wchan cmd 874 c12fec08 c9e16000 1021 562 874 0004002 [SLPQ ufs 0xc1356bd8][SLP] ls 870 c13f1370 ca01a000 0 869 866 0004002 [SLPQ ufs 0xc14ad3b8][SLP] mksnap_ffs ... db> show lockedvnods Locked vnodes 0xc14ad30c: tag ufs, type VDIR, usecount 3, writecount 0, refcount 2, flags (VV_OBJBUF), lock type ufs: EXCL (count 1) by thread 0xc12ff9a0 (pid 874) with 1 pending ino 3, on dev ad0s1e (4, 16) 0xc1356b2c: tag ufs, type VREG, usecount 2, writecount 0, refcount 16, lock type ufs: EXCL (count 1) by thread 0xc12ff420 (pid 870) with 1 pending ino 1347, on dev ad0s1e (4, 16) -- Jun Kuriyama // IMG SRC, Inc. // FreeBSD Project