From owner-freebsd-stable@FreeBSD.ORG Fri Apr 15 21:21:32 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 97AD516A4CE for ; Fri, 15 Apr 2005 21:21:32 +0000 (GMT) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA95143D2D for ; Fri, 15 Apr 2005 21:21:31 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) j3FLLT9K020614 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sat, 16 Apr 2005 07:21:30 +1000 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])j3FLLT7l007801 for ; Sat, 16 Apr 2005 07:21:29 +1000 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id j3FLLT77007800 for stable@freebsd.org; Sat, 16 Apr 2005 07:21:29 +1000 (EST) (envelope-from pjeremy) Date: Sat, 16 Apr 2005 07:21:29 +1000 From: Peter Jeremy To: stable@freebsd.org Message-ID: <20050415212129.GB90280@cirb503493.alcatel.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2i Subject: Deadlock in 5.3p5 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 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, 15 Apr 2005 21:21:32 -0000 My son's computer deadlocked last night. "show lockedvnods" in DDB showed: Locked vnodes 0xc1669840: tag ufs, type VDIR, usecount 8, writecount 0, refcount 2, flags (VV_ROOT|VV_OBJBUF), lock type ufs: EXCL (count 1) by thread 0xc18ed000 (pid 9666) with 7 pending ino 2, on dev ad0s1g (4, 25) 0xc1682000: tag ufs, type VDIR, usecount 5, writecount 0, refcount 2, flags (VV_OBJBUF), lock type ufs: EXCL (count 1) by thread 0xc16fd000 (pid 15686) with 1 pending ino 23552, on dev ad0s1g (4, 25) 0xc1b30d68: tag ufs, type VDIR, usecount 2, writecount 0, refcount 1, flags (VV_OBJBUF), lock type ufs: EXCL (count 1) by thread 0xc268f000 (pid 9075) with 1 pending ino 122986, on dev ad0s1g (4, 25) 0xc1c3c210: tag ufs, type VDIR, usecount 3, writecount 0, refcount 1, flags (VV_OBJBUF), lock type ufs: EXCL (count 1) by thread 0xc16fe4b0 (pid 9067) with 1 pending ino 142022, on dev ad0s1g (4, 25) 0xc1e2ce70: tag ufs, type VREG, usecount 6, writecount 0, refcount 0, flags (VV_OBJBUF), lock type ufs: SHARED (count 1) with 1 pending ino 142169, on dev ad0s1g (4, 25) After poking around in the crashdump for a while, I've worked out that the process holding each of the above exclusive locks is waiting on the next lock in the list. Unfortunately, there doesn't appear to be any way to work out which process is holding the shared lock unless DEBUG_LOCKS is set (and even this doesn't work if the lock was implicitly downgraded by a process calling lockmgr(LK_SHARED) when it holds an exclusive lock). FWIW, the affected inodes are: 2 /usr 23552 /usr/local 122986 /usr/local/OpenOffice.org1.1.4 142022 /usr/local/OpenOffice.org1.1.4/program 142169 /usr/local/OpenOffice.org1.1.4/program/libpsp645fi.so Does anyone have any ideas on how to track this further (or so I just write it off as a glitch). -- Peter Jeremy