From owner-freebsd-current@FreeBSD.ORG Mon Feb 4 12:06:38 2013 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 26C648EF; Mon, 4 Feb 2013 12:06:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 492BF16DD; Mon, 4 Feb 2013 12:06:36 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA19592; Mon, 04 Feb 2013 14:06:32 +0200 (EET) (envelope-from avg@FreeBSD.org) Message-ID: <510FA448.8020204@FreeBSD.org> Date: Mon, 04 Feb 2013 14:06:32 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130113 Thunderbird/17.0.2 MIME-Version: 1.0 To: Sergey Kandaurov Subject: Re: panic: LK_RETRY set with incompatible flags References: <510E9877.5000701@FreeBSD.org> <1515954355.2640466.1359940065810.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , Rick Macklem , FreeBSD Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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, 04 Feb 2013 12:06:38 -0000 on 04/02/2013 13:49 Sergey Kandaurov said the following: > Hi, Rick! Here is the requested info regarding witness, and a bit more. > The triggered KASSERT is now different though. It's exactly the same problem though :-) Do you have a crashdump? If yes, please print **vpp. > Full witness is at http://people.freebsd.org/~pluknet/witness-zfs-20130204.txt > > shared lock of (lockmgr) zfs @ > /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c:1452 > while exclusively locked from > /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c:1747 > panic: share->excl > cpuid = 2 > KDB: enter: panic > [ thread pid 812 tid 100884 ] > Stopped at kdb_enter+0x3e: movq $0,kdb_why > > The 1st line is at zfs_lookup(): > if (error == 0 && (nm[0] != '.' || nm[1] != '\0')) { > int ltype = 0; > > if (cnp->cn_flags & ISDOTDOT) { > ltype = VOP_ISLOCKED(dvp); > VOP_UNLOCK(dvp, 0); > } > ZFS_EXIT(zfsvfs); > error = zfs_vnode_lock(*vpp, cnp->cn_lkflags); > if (cnp->cn_flags & ISDOTDOT) > ==> vn_lock(dvp, ltype | LK_RETRY); > if (error != 0) { > VN_RELE(*vpp); > *vpp = NULL; > return (error); > } > } else { > ZFS_EXIT(zfsvfs); > } > > The 2nd line is at zfs_vnode_lock(): > int > zfs_vnode_lock(vnode_t *vp, int flags) > { > int error; > > ASSERT(vp != NULL); > > error = vn_lock(vp, flags); > return (error); > } > > db> show locks > exclusive lockmgr zfs (zfs) r = 0 (0xfffffe00a1b44240) locked @ > /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c:1747 > db> show alllocks > Process 812 (nfsd) thread 0xfffffe00a1198000 (100884) > exclusive lockmgr zfs (zfs) r = 0 (0xfffffe00a1b44240) locked @ > /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c:1747 > Process 750 (syslogd) thread 0xfffffe0015a4c480 (100706) > exclusive lockmgr ufs (ufs) r = 0 (0xfffffe00a1962d50) locked @ > /usr/src/sys/kern/vfs_syscalls.c:3433 > Process 12 (intr) thread 0xfffffe0006813000 (100033) > exclusive sleep mutex AAC I/O lock (AAC I/O lock) r = 0 > (0xffffff8001bfb210) locked @ /usr/src/sys/dev/aac/aac.c:827 > > db> show lock 0xfffffe00a1b44240 > class: lockmgr > name: zfs > state: XLOCK: 0xfffffe00a1198000 (tid 100884, pid 812, "nfsd") > waiters: none > spinners: none > > As KASSERT is different: > > db> bt > Tracing pid 812 tid 100884 td 0xfffffe00a1198000 > kdb_enter() at kdb_enter+0x3e/frame 0xffffff848e6bfd60 > vpanic() at vpanic+0x147/frame 0xffffff848e6bfda0 > kassert_panic() at kassert_panic+0x136/frame 0xffffff848e6bfe10 > witness_checkorder() at witness_checkorder+0x289/frame 0xffffff848e6bfe90 > __lockmgr_args() at __lockmgr_args+0x43e/frame 0xffffff848e6bffc0 > vop_stdlock() at vop_stdlock+0x3c/frame 0xffffff848e6bffe0 > VOP_LOCK1_APV() at VOP_LOCK1_APV+0xd0/frame 0xffffff848e6c0000 > _vn_lock() at _vn_lock+0xab/frame 0xffffff848e6c0070 > zfs_lookup() at zfs_lookup+0x392/frame 0xffffff848e6c0100 > zfs_freebsd_lookup() at zfs_freebsd_lookup+0x6d/frame 0xffffff848e6c0240 > VOP_CACHEDLOOKUP_APV() at VOP_CACHEDLOOKUP_APV+0xc2/frame 0xffffff848e6c0260 > vfs_cache_lookup() at vfs_cache_lookup+0xcf/frame 0xffffff848e6c02b0 > VOP_LOOKUP_APV() at VOP_LOOKUP_APV+0xc2/frame 0xffffff848e6c02d0 > lookup() at lookup+0x548/frame 0xffffff848e6c0350 > nfsvno_namei() at nfsvno_namei+0x1a5/frame 0xffffff848e6c0400 > nfsrvd_lookup() at nfsrvd_lookup+0x13a/frame 0xffffff848e6c06b0 > nfsrvd_dorpc() at nfsrvd_dorpc+0xca5/frame 0xffffff848e6c08a0 > nfssvc_program() at nfssvc_program+0x482/frame 0xffffff848e6c0a00 > svc_run_internal() at svc_run_internal+0x1e9/frame 0xffffff848e6c0ba0 > svc_thread_start() at svc_thread_start+0xb/frame 0xffffff848e6c0bb0 > fork_exit() at fork_exit+0x84/frame 0xffffff848e6c0bf0 > fork_trampoline() at fork_trampoline+0xe/frame 0xffffff848e6c0bf0 > --- trap 0xc, rip = 0x800883b7a, rsp = 0x7fffffffd6c8, rbp = 0x7fffffffd970 --- > -- Andriy Gapon