From owner-freebsd-current@FreeBSD.ORG Mon Jul 30 21:25:55 2007 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C28D16A418; Mon, 30 Jul 2007 21:25:55 +0000 (UTC) (envelope-from peter.schuller@infidyne.com) Received: from proxy1.bredband.net (proxy1.bredband.net [195.54.101.71]) by mx1.freebsd.org (Postfix) with ESMTP id F346D13C48A; Mon, 30 Jul 2007 21:25:54 +0000 (UTC) (envelope-from peter.schuller@infidyne.com) Received: from prometheus.scode.org (85.229.22.84) by proxy1.bredband.net (7.3.127) id 46A848D60012CCD1; Mon, 30 Jul 2007 23:25:53 +0200 Received: from localhost (localhost [127.0.0.1]) by prometheus.scode.org (Postfix) with ESMTP id 70B131CC8E; Tue, 31 Jul 2007 01:26:07 +0200 (CEST) From: Peter Schuller To: freebsd-current@freebsd.org Date: Tue, 31 Jul 2007 01:26:06 +0200 User-Agent: KMail/1.9.7 References: <200707282028.37102.peter.schuller@infidyne.com> <20070728175426.GF1092@garage.freebsd.pl> <200707292157.09742.peter.schuller@infidyne.com> In-Reply-To: <200707292157.09742.peter.schuller@infidyne.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707310126.06923.peter.schuller@infidyne.com> Cc: Pawel Jakub Dawidek , current@freebsd.org Subject: Re: (ZFS?): panic: lockmgr: locking against myself X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 30 Jul 2007 21:25:55 -0000 > vnode 0xffffff00037473e0: tag devfs, type VDIR > usecount 0, writecount 0, refcount 1 mountedhere 0xffffff0003745ca0 > flags (VV_ROOT) > lock type devfs: EXCL (count 1) by thread 0xffffff00010e6680 (pid 1) Some additional facts: Looking at the printouts, there is always a sequence of three or more (three at least twice; more than three at least once) vrele():s of the same vnode, in both the successful case and the panicing case. There are no vrele():s of any other vnodes in either case. Inserting enter/exit debug printouts in mountcheckdirs() confirms that all calls occur within the bounds of a single call to mountcheckdirs(). Does not this imply there is some locking mismatch in the non-ZFS specific code? I must admit I find the locking confusing; with several locking/unlocking functions/macros intermixed at different levels in the callstack. My (incorrect) reading was that this panic should always be happening, which is obviously not the case. Running with vfs.zfs.debug=1 confirms that vdev_geom open/attach/detach is happening prior to any vrele() even in the panicing case (i.e., zfs pool discovery seems to complete). In the case of an expected provider not being found, vd->vdev_devid is NULL in vdev_geom_open(), based on the "provider not found" debug printout (perhaps normal?). -- / Peter Schuller PGP userID: 0xE9758B7D or 'Peter Schuller ' Key retrieval: Send an E-Mail to getpgpkey@scode.org E-Mail: peter.schuller@infidyne.com Web: http://www.scode.org