Date: Mon, 29 Jun 2009 14:45:16 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Lawrence Stewart <lstewart@freebsd.org> Cc: freebsd-current@freebsd.org Subject: Re: "filesystem goof: vop_panic[vop_revoke]" panic Message-ID: <20090629114516.GY2884@deviant.kiev.zoral.com.ua> In-Reply-To: <4A48942A.7030307@freebsd.org> References: <4A48942A.7030307@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--FkhOn4hPPRcnTymj
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Mon, Jun 29, 2009 at 11:15:06AM +0100, Lawrence Stewart wrote:
> Hi All,
>=20
> My laptop panicked whilst shutting down yesterday. The shutdown sequence=
=20
> seemed to terminate kde4/X correctly but got wedged prior to completing=
=20
> the rest as seen on the console. Details below...
>=20
> uname -a:
> FreeBSD lstewart-laptop 8.0-CURRENT FreeBSD 8.0-CURRENT #35 r195046: Fri=
=20
> Jun 26 12:28:02 BST 2009=20
> lstewart@lstewart-laptop:/usr/obj/usr/src/sys/LAPTOP amd64
>=20
>=20
>=20
> Backtrace:
>=20
> at /usr/src/sys/kern/subr_kdb.c:534
> #6 0xffffffff8084cb11 in trap (frame=3D0xffffff8058eb76a0) at=20
> /usr/src/sys/amd64/amd64/trap.c:613
>=20
> #7 0xffffffff80832f33 in calltrap () at=20
> /usr/src/sys/amd64/amd64/exception.S:223
>=20
> #8 0xffffffff805a736d in kdb_enter (why=3D0xffffffff80943489 "panic",
> msg=3D0xa <Address 0xa out of bounds>) at cpufunc.h:63
>=20
> #9 0xffffffff8057791b in panic (fmt=3DVariable "fmt" is not available.
> ) at /usr/src/sys/kern/kern_shutdown.c:558
>=20
> #10 0xffffffff805f6108 in vop_panic (ap=3DVariable "ap" is not available.
> ) at /usr/src/sys/kern/vfs_default.c:175
>=20
> #11 0xffffffff8054dee7 in exit1 (td=3D0xffffff00049c9720, rv=3D1) at=20
> vnode_if.h:523
>=20
> #12 0xffffffff8057927f in sigexit (td=3D0xffffff00049c9720, sig=3D0)
> at /usr/src/sys/kern/kern_sig.c:2726
>=20
> #13 0xffffffff80579e7f in postsig (sig=3D1491826128) at=20
> /usr/src/sys/kern/kern_sig.c:2617
>=20
> #14 0xffffffff805b422c in ast (framep=3D0xffffff8058eb7c90) at=20
> /usr/src/sys/kern/subr_trap.c:225
>=20
> #15 0xffffffff80833de9 in doreti_ast () at=20
> /usr/src/sys/amd64/amd64/exception.S:623
>=20
Are you able to reproduce the issue ?
Please try the patch.
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index ae060da..c00b4f4 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -334,10 +334,11 @@ exit1(struct thread *td, int rv)
tty_unlock(tp);
}
=20
- if (ttyvp !=3D NULL && ttyvp->v_type !=3D VBAD) {
+ if (ttyvp !=3D NULL) {
sx_xunlock(&proctree_lock);
- VOP_LOCK(ttyvp, LK_EXCLUSIVE);
- VOP_REVOKE(ttyvp, REVOKEALL);
+ vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY);
+ if (ttyvp->v_type !=3D VBAD)
+ VOP_REVOKE(ttyvp, REVOKEALL);
VOP_UNLOCK(ttyvp, 0);
sx_xlock(&proctree_lock);
}
--FkhOn4hPPRcnTymj
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)
iEYEARECAAYFAkpIqUsACgkQC3+MBN1Mb4jnMwCgp7KSDZtep8g5MLHOtSG9i+9d
cA4AoKJLcCP38l4o3aLihZv19tL8vYVg
=XgLl
-----END PGP SIGNATURE-----
--FkhOn4hPPRcnTymj--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090629114516.GY2884>
