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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Mon, Jun 29, 2009 at 11:15:06AM +0100, Lawrence Stewart wrote:
> Hi All,
>
> My laptop panicked whilst shutting down yesterday. The shutdown sequence
> seemed to terminate kde4/X correctly but got wedged prior to completing
> the rest as seen on the console. Details below...
>
> uname -a:
> FreeBSD lstewart-laptop 8.0-CURRENT FreeBSD 8.0-CURRENT #35 r195046: Fri
> Jun 26 12:28:02 BST 2009
> lstewart@lstewart-laptop:/usr/obj/usr/src/sys/LAPTOP amd64
>
>
>
> Backtrace:
>
> at /usr/src/sys/kern/subr_kdb.c:534
> #6 0xffffffff8084cb11 in trap (frame=0xffffff8058eb76a0) at
> /usr/src/sys/amd64/amd64/trap.c:613
>
> #7 0xffffffff80832f33 in calltrap () at
> /usr/src/sys/amd64/amd64/exception.S:223
>
> #8 0xffffffff805a736d in kdb_enter (why=0xffffffff80943489 "panic",
> msg=0xa <Address 0xa out of bounds>) at cpufunc.h:63
>
> #9 0xffffffff8057791b in panic (fmt=Variable "fmt" is not available.
> ) at /usr/src/sys/kern/kern_shutdown.c:558
>
> #10 0xffffffff805f6108 in vop_panic (ap=Variable "ap" is not available.
> ) at /usr/src/sys/kern/vfs_default.c:175
>
> #11 0xffffffff8054dee7 in exit1 (td=0xffffff00049c9720, rv=1) at
> vnode_if.h:523
>
> #12 0xffffffff8057927f in sigexit (td=0xffffff00049c9720, sig=0)
> at /usr/src/sys/kern/kern_sig.c:2726
>
> #13 0xffffffff80579e7f in postsig (sig=1491826128) at
> /usr/src/sys/kern/kern_sig.c:2617
>
> #14 0xffffffff805b422c in ast (framep=0xffffff8058eb7c90) at
> /usr/src/sys/kern/subr_trap.c:225
>
> #15 0xffffffff80833de9 in doreti_ast () at
> /usr/src/sys/amd64/amd64/exception.S:623
>
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);
}
- if (ttyvp != NULL && ttyvp->v_type != VBAD) {
+ if (ttyvp != 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 != VBAD)
+ VOP_REVOKE(ttyvp, REVOKEALL);
VOP_UNLOCK(ttyvp, 0);
sx_xlock(&proctree_lock);
}
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)
iEYEARECAAYFAkpIqUsACgkQC3+MBN1Mb4jnMwCgp7KSDZtep8g5MLHOtSG9i+9d
cA4AoKJLcCP38l4o3aLihZv19tL8vYVg
=XgLl
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090629114516.GY2884>
