From owner-freebsd-current@FreeBSD.ORG Sat Feb 15 23:48:55 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D057CF20; Sat, 15 Feb 2014 23:48:55 +0000 (UTC) Received: from esa-annu.net.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 7F3D21513; Sat, 15 Feb 2014 23:48:54 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqQEAI77/1KDaFve/2dsb2JhbABZgz5XgwK7a0+BJXSCJQEBAQQBAQEgBCcgCxsOCgICDRkCKQEJJgYIBwQBHASHZA2oK6EPF4EpjQcBARs0B4JvgUkEiUiMEIQGiR2HVIFvgVweMYEEOQ X-IronPort-AV: E=Sophos;i="4.95,852,1384318800"; d="scan'208";a="96849811" Received: from muskoka.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.222]) by esa-annu.net.uoguelph.ca with ESMTP; 15 Feb 2014 18:47:45 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id D831FB3F91; Sat, 15 Feb 2014 18:47:45 -0500 (EST) Date: Sat, 15 Feb 2014 18:47:45 -0500 (EST) From: Rick Macklem To: Andriy Gapon Message-ID: <1366623125.6790356.1392508065873.JavaMail.root@uoguelph.ca> In-Reply-To: <52FF59B8.1080206@FreeBSD.org> Subject: Re: panic: LK_RETRY set with incompatible flags (0x200400) or an error occured (11) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 7.2.1_GA_2790 (ZimbraWebClient - FF3.0 (Win)/7.2.1_GA_2790) Cc: freebsd-current@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 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: Sat, 15 Feb 2014 23:48:55 -0000 Andriy Gapon wrote: > on 14/02/2014 21:18 Jeremie Le Hen said the following: > > I've just got another occurence of the exact same panic. Any clue > > how > > to debug this? > > Could you please obtain *vp from frame 12 ? > > The problem seems to be happening in this piece of ZFS code: > if (cnp->cn_flags & ISDOTDOT) { > ltype = VOP_ISLOCKED(dvp); > VOP_UNLOCK(dvp, 0); > } > ZFS_EXIT(zfsvfs); > error = vn_lock(*vpp, cnp->cn_lkflags); > if (cnp->cn_flags & ISDOTDOT) > vn_lock(dvp, ltype | LK_RETRY); > > ltype is apparently LK_SHARED and the assertion is apparently > triggered by > EDEADLK error. The error can occur only if a thread tries to obtain > a lock in a > shared mode when it already has the lock exclusively. > My only explanation of how this could happen is that dvp == *vpp and > cn_lkflags > is LK_EXCLUSIVE. In other words, this is a dot-dot lookup that > results in the > same vnode. I think that this is only possible if dvp is the root > vnode. > I am not sure if my theory is correct though. > Also, I am not sure if zfs_lookup() should be prepared to handle such > a lookup > or if this kind of lookup should be handled by upper/other layers. > In this case > these would be VFS lookup code and nullfs code. > I don't know if it ever occurs, but the NFS client has a check for if (vp != dvp) vn_lock(dvp...); /* roughly what the code looks like. */ in the ISDOTDOT section of nfs_lookup(). I don't think this check would be harmful? rick > -- > Andriy Gapon > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to > "freebsd-current-unsubscribe@freebsd.org" >