Re: panic: LK_RETRY set with incompatible flags (0x200400) or an error occured (11)
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-unsubscr...@freebsd.org" > ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: panic: LK_RETRY set with incompatible flags (0x200400) or an error occured (11)
On Sat, Feb 15, 2014 at 02:12:40PM +0200, 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. > So, is VV_ROOT flag set on the corresponding ZFS vnode ? Just in case, you could try the following change, but I doubt that it would have any effect. Nullfs root vnode is cached so its VV_ROOT flag should not be lost. Also, I never seen similar issue with UFS. diff --git a/sys/fs/nullfs/null_subr.c b/sys/fs/nullfs/null_subr.c index fa6c4af..3f74579 100644 --- a/sys/fs/nullfs/null_subr.c +++ b/sys/fs/nullfs/null_subr.c @@ -251,6 +251,7 @@ null_nodeget(mp, lowervp, vpp) vp->v_type = lowervp->v_type; vp->v_data = xp; vp->v_vnlock = lowervp->v_vnlock; + vp->v_vflag = lowervp->v_vflag & VV_ROOT; error = insmntque1(vp, mp, null_insmntque_dtr, xp); if (error != 0) return (error); pgpGV_ACJdjqr.pgp Description: PGP signature
[head tinderbox] failure on powerpc/powerpc
TB --- 2014-02-15 16:53:05 - tinderbox 2.20 running on freebsd-current.sentex.ca TB --- 2014-02-15 16:53:05 - FreeBSD freebsd-current.sentex.ca 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #0: Mon Mar 26 13:54:12 EDT 2012 d...@freebsd-current.sentex.ca:/usr/obj/usr/src/sys/GENERIC amd64 TB --- 2014-02-15 16:53:05 - starting HEAD tinderbox run for powerpc/powerpc TB --- 2014-02-15 16:53:05 - cleaning the object tree TB --- 2014-02-15 16:53:41 - /usr/local/bin/svn stat /src TB --- 2014-02-15 16:53:44 - At svn revision 261916 TB --- 2014-02-15 16:53:45 - building world TB --- 2014-02-15 16:53:45 - CROSS_BUILD_TESTING=YES TB --- 2014-02-15 16:53:45 - MAKEOBJDIRPREFIX=/obj TB --- 2014-02-15 16:53:45 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2014-02-15 16:53:45 - SRCCONF=/dev/null TB --- 2014-02-15 16:53:45 - TARGET=powerpc TB --- 2014-02-15 16:53:45 - TARGET_ARCH=powerpc TB --- 2014-02-15 16:53:45 - TZ=UTC TB --- 2014-02-15 16:53:45 - __MAKE_CONF=/dev/null TB --- 2014-02-15 16:53:45 - cd /src TB --- 2014-02-15 16:53:45 - /usr/bin/make -B buildworld >>> Building an up-to-date make(1) >>> World build started on Sat Feb 15 16:53:52 UTC 2014 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything [...] ===> sbin/pfctl (all) cc -O2 -pipe -Wall -Wmissing-prototypes -Wno-uninitialized -Wstrict-prototypes -DENABLE_ALTQ -I/src/sbin/pfctl -DWITH_INET6 -DWITH_INET -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c /src/sbin/pfctl/pfctl.c cc1: warnings being treated as errors /src/sbin/pfctl/pfctl.c: In function 'pfctl_print_rule_counters': /src/sbin/pfctl/pfctl.c:800: warning: cast from pointer to integer of different size /src/sbin/pfctl/pfctl.c:805: warning: cast from pointer to integer of different size /src/sbin/pfctl/pfctl.c: In function 'pfctl_show_rules': /src/sbin/pfctl/pfctl.c:918: warning: cast from pointer to integer of different size *** Error code 1 Stop. bmake[3]: stopped in /src/sbin/pfctl *** Error code 1 Stop. bmake[2]: stopped in /src/sbin *** Error code 1 Stop. bmake[1]: stopped in /src *** Error code 1 Stop. bmake: stopped in /src *** Error code 1 Stop in /src. TB --- 2014-02-15 19:16:05 - WARNING: /usr/bin/make returned exit code 1 TB --- 2014-02-15 19:16:05 - ERROR: failed to build world TB --- 2014-02-15 19:16:05 - 7234.96 user 1006.22 system 8580.30 real http://tinderbox.freebsd.org/tinderbox-head-build-HEAD-powerpc-powerpc.full ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
[head tinderbox] failure on mips/mips
TB --- 2014-02-15 16:01:58 - tinderbox 2.20 running on freebsd-current.sentex.ca TB --- 2014-02-15 16:01:58 - FreeBSD freebsd-current.sentex.ca 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #0: Mon Mar 26 13:54:12 EDT 2012 d...@freebsd-current.sentex.ca:/usr/obj/usr/src/sys/GENERIC amd64 TB --- 2014-02-15 16:01:58 - starting HEAD tinderbox run for mips/mips TB --- 2014-02-15 16:01:58 - cleaning the object tree TB --- 2014-02-15 16:02:56 - /usr/local/bin/svn stat /src TB --- 2014-02-15 16:03:00 - At svn revision 261916 TB --- 2014-02-15 16:03:01 - building world TB --- 2014-02-15 16:03:01 - CROSS_BUILD_TESTING=YES TB --- 2014-02-15 16:03:01 - MAKEOBJDIRPREFIX=/obj TB --- 2014-02-15 16:03:01 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2014-02-15 16:03:01 - SRCCONF=/dev/null TB --- 2014-02-15 16:03:01 - TARGET=mips TB --- 2014-02-15 16:03:01 - TARGET_ARCH=mips TB --- 2014-02-15 16:03:01 - TZ=UTC TB --- 2014-02-15 16:03:01 - __MAKE_CONF=/dev/null TB --- 2014-02-15 16:03:01 - cd /src TB --- 2014-02-15 16:03:01 - /usr/bin/make -B buildworld >>> Building an up-to-date make(1) >>> World build started on Sat Feb 15 16:03:08 UTC 2014 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything [...] ===> sbin/pfctl (all) cc -O -pipe -G0 -Wall -Wmissing-prototypes -Wno-uninitialized -Wstrict-prototypes -DENABLE_ALTQ -I/src/sbin/pfctl -DWITH_INET6 -DWITH_INET -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c /src/sbin/pfctl/pfctl.c cc1: warnings being treated as errors /src/sbin/pfctl/pfctl.c: In function 'pfctl_print_rule_counters': /src/sbin/pfctl/pfctl.c:800: warning: cast from pointer to integer of different size /src/sbin/pfctl/pfctl.c:805: warning: cast from pointer to integer of different size /src/sbin/pfctl/pfctl.c: In function 'pfctl_show_rules': /src/sbin/pfctl/pfctl.c:918: warning: cast from pointer to integer of different size *** Error code 1 Stop. bmake[3]: stopped in /src/sbin/pfctl *** Error code 1 Stop. bmake[2]: stopped in /src/sbin *** Error code 1 Stop. bmake[1]: stopped in /src *** Error code 1 Stop. bmake: stopped in /src *** Error code 1 Stop in /src. TB --- 2014-02-15 16:53:05 - WARNING: /usr/bin/make returned exit code 1 TB --- 2014-02-15 16:53:05 - ERROR: failed to build world TB --- 2014-02-15 16:53:05 - 2220.23 user 569.09 system 3066.86 real http://tinderbox.freebsd.org/tinderbox-head-build-HEAD-mips-mips.full ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: panic: LK_RETRY set with incompatible flags (0x200400) or an error occured (11)
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. -- Andriy Gapon ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
[head tinderbox] failure on powerpc/powerpc
TB --- 2014-02-15 09:00:25 - tinderbox 2.20 running on freebsd-current.sentex.ca TB --- 2014-02-15 09:00:25 - FreeBSD freebsd-current.sentex.ca 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #0: Mon Mar 26 13:54:12 EDT 2012 d...@freebsd-current.sentex.ca:/usr/obj/usr/src/sys/GENERIC amd64 TB --- 2014-02-15 09:00:25 - starting HEAD tinderbox run for powerpc/powerpc TB --- 2014-02-15 09:00:25 - cleaning the object tree TB --- 2014-02-15 09:01:05 - /usr/local/bin/svn stat /src TB --- 2014-02-15 09:01:08 - At svn revision 261908 TB --- 2014-02-15 09:01:09 - building world TB --- 2014-02-15 09:01:09 - CROSS_BUILD_TESTING=YES TB --- 2014-02-15 09:01:09 - MAKEOBJDIRPREFIX=/obj TB --- 2014-02-15 09:01:09 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2014-02-15 09:01:09 - SRCCONF=/dev/null TB --- 2014-02-15 09:01:09 - TARGET=powerpc TB --- 2014-02-15 09:01:09 - TARGET_ARCH=powerpc TB --- 2014-02-15 09:01:09 - TZ=UTC TB --- 2014-02-15 09:01:09 - __MAKE_CONF=/dev/null TB --- 2014-02-15 09:01:09 - cd /src TB --- 2014-02-15 09:01:09 - /usr/bin/make -B buildworld >>> Building an up-to-date make(1) >>> World build started on Sat Feb 15 09:01:16 UTC 2014 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything [...] ===> sbin/pfctl (all) cc -O2 -pipe -Wall -Wmissing-prototypes -Wno-uninitialized -Wstrict-prototypes -DENABLE_ALTQ -I/src/sbin/pfctl -DWITH_INET6 -DWITH_INET -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c /src/sbin/pfctl/pfctl.c cc1: warnings being treated as errors /src/sbin/pfctl/pfctl.c: In function 'pfctl_print_rule_counters': /src/sbin/pfctl/pfctl.c:800: warning: cast from pointer to integer of different size /src/sbin/pfctl/pfctl.c:805: warning: cast from pointer to integer of different size /src/sbin/pfctl/pfctl.c: In function 'pfctl_show_rules': /src/sbin/pfctl/pfctl.c:918: warning: cast from pointer to integer of different size *** Error code 1 Stop. bmake[3]: stopped in /src/sbin/pfctl *** Error code 1 Stop. bmake[2]: stopped in /src/sbin *** Error code 1 Stop. bmake[1]: stopped in /src *** Error code 1 Stop. bmake: stopped in /src *** Error code 1 Stop in /src. TB --- 2014-02-15 11:25:07 - WARNING: /usr/bin/make returned exit code 1 TB --- 2014-02-15 11:25:07 - ERROR: failed to build world TB --- 2014-02-15 11:25:07 - 7230.30 user 1002.46 system 8681.35 real http://tinderbox.freebsd.org/tinderbox-head-build-HEAD-powerpc-powerpc.full ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
[head tinderbox] failure on mips/mips
TB --- 2014-02-15 08:03:55 - tinderbox 2.20 running on freebsd-current.sentex.ca TB --- 2014-02-15 08:03:55 - FreeBSD freebsd-current.sentex.ca 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #0: Mon Mar 26 13:54:12 EDT 2012 d...@freebsd-current.sentex.ca:/usr/obj/usr/src/sys/GENERIC amd64 TB --- 2014-02-15 08:03:55 - starting HEAD tinderbox run for mips/mips TB --- 2014-02-15 08:03:55 - cleaning the object tree TB --- 2014-02-15 08:06:54 - /usr/local/bin/svn stat /src TB --- 2014-02-15 08:06:58 - At svn revision 261908 TB --- 2014-02-15 08:06:59 - building world TB --- 2014-02-15 08:06:59 - CROSS_BUILD_TESTING=YES TB --- 2014-02-15 08:06:59 - MAKEOBJDIRPREFIX=/obj TB --- 2014-02-15 08:06:59 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2014-02-15 08:06:59 - SRCCONF=/dev/null TB --- 2014-02-15 08:06:59 - TARGET=mips TB --- 2014-02-15 08:06:59 - TARGET_ARCH=mips TB --- 2014-02-15 08:06:59 - TZ=UTC TB --- 2014-02-15 08:06:59 - __MAKE_CONF=/dev/null TB --- 2014-02-15 08:06:59 - cd /src TB --- 2014-02-15 08:06:59 - /usr/bin/make -B buildworld >>> Building an up-to-date make(1) >>> World build started on Sat Feb 15 08:07:09 UTC 2014 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything [...] ===> sbin/pfctl (all) cc -O -pipe -G0 -Wall -Wmissing-prototypes -Wno-uninitialized -Wstrict-prototypes -DENABLE_ALTQ -I/src/sbin/pfctl -DWITH_INET6 -DWITH_INET -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c /src/sbin/pfctl/pfctl.c cc1: warnings being treated as errors /src/sbin/pfctl/pfctl.c: In function 'pfctl_print_rule_counters': /src/sbin/pfctl/pfctl.c:800: warning: cast from pointer to integer of different size /src/sbin/pfctl/pfctl.c:805: warning: cast from pointer to integer of different size /src/sbin/pfctl/pfctl.c: In function 'pfctl_show_rules': /src/sbin/pfctl/pfctl.c:918: warning: cast from pointer to integer of different size *** Error code 1 Stop. bmake[3]: stopped in /src/sbin/pfctl *** Error code 1 Stop. bmake[2]: stopped in /src/sbin *** Error code 1 Stop. bmake[1]: stopped in /src *** Error code 1 Stop. bmake: stopped in /src *** Error code 1 Stop in /src. TB --- 2014-02-15 09:00:25 - WARNING: /usr/bin/make returned exit code 1 TB --- 2014-02-15 09:00:25 - ERROR: failed to build world TB --- 2014-02-15 09:00:25 - 2218.59 user 565.62 system 3390.23 real http://tinderbox.freebsd.org/tinderbox-head-build-HEAD-mips-mips.full ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"