From owner-freebsd-stable@FreeBSD.ORG Sat Jul 26 11:48:46 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B7456C5 for ; Sat, 26 Jul 2014 11:48:46 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A765A23DC for ; Sat, 26 Jul 2014 11:48:45 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s6QBmdmK029711 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 26 Jul 2014 14:48:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s6QBmdmK029711 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s6QBmdS3029710; Sat, 26 Jul 2014 14:48:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 26 Jul 2014 14:48:39 +0300 From: Konstantin Belousov To: Harald Schmalzbauer Subject: Re: panic/lock on 9.3-RELEASE with nullfs/nfs/zfs combination Message-ID: <20140726114839.GF93733@kib.kiev.ua> References: <53D12973.3010805@omnilan.de> <20140724165917.GT93733@kib.kiev.ua> <53D1503B.2030200@omnilan.de> <20140724193048.GU93733@kib.kiev.ua> <53D2006C.7090207@omnilan.de> <20140725151448.GY93733@kib.kiev.ua> <53D380B2.2080700@omnilan.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lmwYJyD+fGI+a3sE" Content-Disposition: inline In-Reply-To: <53D380B2.2080700@omnilan.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: FreeBSD Stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jul 2014 11:48:46 -0000 --lmwYJyD+fGI+a3sE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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=3D0xfffffe006cb86bd0, lowervp=3D0xfffffe001dbc53f0 > vp=3D0xfffffe006cb86bd0, lowervp=3D0xfffffe001dbc53f0 >=20 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 =3D NULLVPTOLOWERVP(dvp); vp =3D lvp =3D NULL; + KASSERT((ldvp->v_vflag & VV_ROOT) =3D=3D 0 || + ((dvp->v_vflag & VV_ROOT) !=3D 0 && (flags & ISDOTDOT) =3D=3D 0), + ("ldvp %p fl %#x dvp %p fl %#x flags %#x", ldvp, ldvp->v_vflag, + dvp, dvp->v_vflag, flags)); error =3D VOP_LOOKUP(ldvp, &lvp, cnp); if (error =3D=3D 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 =3D lowervp->v_type; vp->v_data =3D xp; vp->v_vnlock =3D lowervp->v_vnlock; + vp->v_vflag =3D lowervp->v_vflag & VV_ROOT; error =3D insmntque1(vp, mp, null_insmntque_dtr, xp); if (error !=3D 0) return (error); --lmwYJyD+fGI+a3sE Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJT05WXAAoJEJDCuSvBvK1BeogP/jNVZIb8Bz6mf5ec2OimQBMZ H3bTLf+KHW1eR6F9CHLLafgmoiIf4Pa735Uer8BEruxvbwKOF13yqnRTMk2UEyNG bPe1uIV/+KAMfHgdPFUUo/46Tav9xCLAYbYPBBthTl+4pW5ZoG7h6IKF9zEQZQy4 7qOLAp5tZjFMT2zCKpT105vXYs3mgEZHKIotLzT/SmTD6ddpDH7oYBSrRmtRe1LD wGmMplA2SWiMi7/kFHafQbMhDS7fQXZ0JJJnQbYO1SgSFm5eBh/eCfzGNh48RJCr PJ4Br8v3N0Hw1p8FMzFoZ4nk7e4pz0d/WPV3jh/JPJwb1rQFCRa37e9zeWsqIdQm pp+dGFOVcFGQByAlC9Q6+U0l2DKEMp7BiBN+F2YAlYE+sgzh2fZr+Gj24pl6nVC7 ZTj3gZOwIP5cw0SwWQAQUIob3Lj8zkh0nk5tCUJCpUh1kHSc9ySAnvgBI+CWU4no lLrUE1Zk4XX/xhmP4gDP6Nl0KnjLvVc1L699r0/O0+S1iHbC4ny/vd13fkwhM7Wa M49jn3WpF4n7FC7hX/XReT8HU8TnLmotrfQdBUHiiJGBpVOCRYJQ2osmQuBbGOqL UIDoyIGJJ7cklfchLsR86QwRKfb6NYQ57OABfkgX62UHkwlVi4FfqJ61A+Ub+cXE Rj/qIdlxxN1WuxMz74KP =MPp0 -----END PGP SIGNATURE----- --lmwYJyD+fGI+a3sE--