Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Aug 2009 14:03:36 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Lucius Windschuh <lwindschuh@googlemail.com>
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: Linuxolator panic: Lock (rw) Name Cache exclusively locked
Message-ID:  <20090806110335.GP1884@deviant.kiev.zoral.com.ua>
In-Reply-To: <90a5caac0908051556j27e721e2m25a949ade16848c1@mail.gmail.com>
References:  <90a5caac0908051556j27e721e2m25a949ade16848c1@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--BMxRdHzs7E+6Z52G
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Aug 06, 2009 at 12:56:08AM +0200, Lucius Windschuh wrote:
> Hi.
> I tried to install CA Wily Introscope 8.1, an enterprise application
> performance monitoring framework, on FreeBSD.
> It is Java-based and works, if installed.
> Unfortunately, the installer panics my machine reproducably when it
> exits after the installation:
> panic: Lock (rw) Name Cache exclusively locked @
> /usr/src/sys/kern/vfs_cache.c:589
>=20
> I'm using -CURRENT r196074 (i386) at the moment.
> Kernel config: http://sites.google.com/site/lwfreebsd/Home/files/kernelco=
nfig-CURRENT.txt?attredirects=3D0
>=20
> I have a kernel dump for further analysis (the installation archive
> may not be published, I suppose):
>=20
> $ kgdb ... vmcore.12
> (kgdb) bt
> #0  doadump () at pcpu.h:246
> #1  0xc063cd1e in boot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c=
:419
> #2  0xc063cff2 in panic (fmt=3DVariable "fmt" is not available.
> ) at /usr/src/sys/kern/kern_shutdown.c:575
> #3  0xc067e515 in witness_assert (lock=3D0xc0b160fc, flags=3DVariable
> "flags" is not available.
> )
>     at /usr/src/sys/kern/subr_witness.c:2235
> #4  0xc063a1d5 in _rw_assert (rw=3D0xc0b160fc, what=3DVariable "what" is
> not available.
> )
>     at /usr/src/sys/kern/kern_rwlock.c:1020
> #5  0xc063a80b in _rw_runlock (rw=3D0xc0b160fc,
>     file=3D0xc0905c58 "/usr/src/sys/kern/vfs_cache.c", line=3D589)
>     at /usr/src/sys/kern/kern_rwlock.c:526
> #6  0xc06b8297 in cache_lookup (dvp=3D0xc733c218, vpp=3D0xf63fcc70, cnp=
=3D0xf63fcc00)
>     at /usr/src/sys/kern/vfs_cache.c:589
> #7  0xc06b837d in vfs_cache_lookup (ap=3D0xf63fcc48)
>     at /usr/src/sys/kern/vfs_cache.c:881
> #8  0xc08a79c2 in VOP_LOOKUP_APV (vop=3D0xc65ec880, a=3D0xf63fcc48)
>     at vnode_if.c:123
> #9  0xc0de7547 in linux_getcwd (td=3D0xc718e240, args=3D0xf63fccf8)
>     at vnode_if.h:54
> #10 0xc0898567 in syscall (frame=3D0xf63fcd38)
>     at /usr/src/sys/i386/i386/trap.c:1073
> #11 0xc087b8c0 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception=
.s:261
> #12 0x00000033 in ?? ()
> Previous frame inner to this frame (corrupt stack?)
>=20
> Panicing the kernel with getcwd() is strange. :-D

Please try this patch.

diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index f21f4af..7854803 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -416,7 +416,8 @@ retry_wlocked:
 				if (dvp->v_cache_dd->nc_flag & NCF_ISDOTDOT)
 					cache_zap(dvp->v_cache_dd);
 				dvp->v_cache_dd =3D NULL;
-				goto unlock;
+				CACHE_WUNLOCK();
+				return (0);
 			}
 			if (dvp->v_cache_dd->nc_flag & NCF_ISDOTDOT)
 				*vpp =3D dvp->v_cache_dd->nc_vp;

--BMxRdHzs7E+6Z52G
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEUEARECAAYFAkp6uIcACgkQC3+MBN1Mb4gorwCWPw1LbrJBwMnOQiZJd9Ss1VnB
QQCgsir2ffZbF/ZcnPebe/UPQJHQaUg=
=gRqg
-----END PGP SIGNATURE-----

--BMxRdHzs7E+6Z52G--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090806110335.GP1884>