panic/lock on 9.3-RELEASE with nullfs/nfs/zfs combination

Konstantin Belousov kostikbel at gmail.com
Sat Jul 26 11:48:46 UTC 2014


On Sat, Jul 26, 2014 at 12:19:30PM +0200, Harald Schmalzbauer wrote:
> vnode vnode 0xfffffe006cb86bd0: 0xfffffe006cb86bd0: tag null, type VDIR
> tag null, type VDIR
> usecount 1, writecount 0, refcount 1 mountedhere 0
> usecount 1, writecount 0, refcount 1 mountedhere 0
> flags (VV_ROOT|VI_ACTIVE)
> flags (VV_ROOT|VI_ACTIVE)
> v_object 0xfffffe006c8d30e8 ref 0 pages 0 cleanbuf 0 dirtybuf 0
> v_object 0xfffffe006c8d30e8 ref 0 pages 0 cleanbuf 0 dirtybuf 0
> lock type zfs: EXCL by thread 0xfffffe0033498920 (pid 1668)
> lock type zfs: EXCL by thread 0xfffffe0033498920 (pid 1668)
> vp=0xfffffe006cb86bd0, lowervp=0xfffffe001dbc53f0
> vp=0xfffffe006cb86bd0, lowervp=0xfffffe001dbc53f0
> 

It is useful, but still requires more work to get to the issue. From the
data you posted, I see that the problem was already reported sometime
this winter. We did not come to any conclusion that time.

Please, do the following. First, apply this debugging patch and obtain
the same data as you did right now. Hopefully, the assert below would
trigger.

diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c
index 70402e3..bc9772c 100644
--- a/sys/fs/nullfs/null_vnops.c
+++ b/sys/fs/nullfs/null_vnops.c
@@ -372,6 +372,10 @@ null_lookup(struct vop_lookup_args *ap)
 	 */
 	ldvp = NULLVPTOLOWERVP(dvp);
 	vp = lvp = NULL;
+	KASSERT((ldvp->v_vflag & VV_ROOT) == 0 ||
+	    ((dvp->v_vflag & VV_ROOT) != 0 && (flags & ISDOTDOT) == 0),
+	    ("ldvp %p fl %#x dvp %p fl %#x flags %#x", ldvp, ldvp->v_vflag,
+	     dvp, dvp->v_vflag, flags));
 	error = VOP_LOOKUP(ldvp, &lvp, cnp);
 	if (error == EJUSTRETURN && (flags & ISLASTCN) &&
 	    (dvp->v_mount->mnt_flag & MNT_RDONLY) &&

After that, you could try the patch which I posted at winter, but which
was not tested. I do not know whether it is of any help, and I do need
the debugging information with the patch above before I can make any
conclusions.

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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20140726/3d3411cb/attachment.sig>


More information about the freebsd-stable mailing list