Date: Tue, 24 Sep 2013 11:29:09 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Patrick Lamaiziere <patfbsd@davenulle.org> Cc: freebsd-stable@freebsd.org Subject: Re: Possible kqueue related issue on STABLE/RC. Message-ID: <20130924082909.GH41229@kib.kiev.ua> In-Reply-To: <20130924094427.0f4b902a@mr129166> References: <alpine.BSF.2.00.1309111705460.89324@olgeni.olgeni> <20130911171913.GG41229@kib.kiev.ua> <alpine.BSF.2.00.1309112316160.2547@olgeni.olgeni> <20130912073643.GM41229@kib.kiev.ua> <20130920151705.33aae120@mr129166> <20130923153708.45c3be3d@mr129166> <20130923203141.GV41229@kib.kiev.ua> <20130924094427.0f4b902a@mr129166>
next in thread | previous in thread | raw e-mail | index | archive | help
--I+bMzLstCROLYLmh Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 24, 2013 at 09:44:27AM +0200, Patrick Lamaiziere wrote: > Le Mon, 23 Sep 2013 23:31:41 +0300, > Konstantin Belousov <kostikbel@gmail.com> a ?crit : >=20 > Hello, >=20 > ... >=20 >=20 > > > Ok This has been mfced to 9.2-STABLE. But I still see this panic > > > with 9-2/STABLE of today (Revision=9A: 255811). This may be better > > > because before the box paniced within minutes and now within hours > > > (still using poudriere). > > >=20 > > > panic: > > > fault code =3D supervisor read data, page not present > > > instruction pointer =3D 0x20:0xffffffff808ebfcd > > > stack pointer =3D 0x28:0xffffff824c2e0630 > > > frame pointer =3D 0x28:0xffffff824c2e06a0 > > > code segment =3D base 0x0, limit 0xfffff, type 0x1b > > > =3D DPL 0, pres 1, long 1, def32 0, gran 1 > > > processor eflags =3D interrupt enabled, resume, IOPL =3D 0 > > > current process =3D 54243 (gvfsd-trash) > > > trap number =3D 12 > > > panic: page fault > > > cpuid =3D 2 > > > KDB: stack backtrace: > > > #0 0xffffffff80939ad6 at kdb_backtrace+0x66 > > > #1 0xffffffff808ffacd at panic+0x1cd > > > #2 0xffffffff80cdfbe9 at trap_fatal+0x289 > > > #3 0xffffffff80cdff4f at trap_pfault+0x20f > > > #4 0xffffffff80ce0504 at trap+0x344 > > > #5 0xffffffff80cc9b43 at calltrap+0x8 > > > #6 0xffffffff8099d043 at filt_vfsvnode+0xf3 > > > #7 0xffffffff808c4793 at kqueue_register+0x3e3 > > > #8 0xffffffff808c4de8 at kern_kevent+0x108 > > > #9 0xffffffff808c5950 at sys_kevent+0x90 > > > #10 0xffffffff80cdf3a8 at amd64_syscall+0x5d8 > > > #11 0xffffffff80cc9e27 at Xfast_syscall+0xf7 > > >=20 > > > Full core.txt :=20 > > > http://user.lamaiziere.net/patrick/public/vfs_vnode-core.txt.0 > >=20 > > For start, please load the core into kgdb and for > > frame 8 > > p *kn >=20 > (kgdb) frame 8 > #8 0xffffffff8099d043 in filt_vfsvnode (kn=3D0xfffffe0147a7f000, hint=3D= 0) > at /usr/src/sys/kern/vfs_subr.c:4600 > 4600 VI_LOCK(vp); > (kgdb) p *kn > $1 =3D {kn_link =3D {sle_next =3D 0x0}, kn_selnext =3D {sle_next =3D 0x0}= ,=20 > kn_knlist =3D 0x0, kn_tqe =3D {tqe_next =3D 0x0, tqe_prev =3D 0x0},=20 > kn_kq =3D 0xfffffe01079a6200, kn_kevent =3D {ident =3D 62, filter =3D -= 4,=20 > flags =3D 32784, fflags =3D 0, data =3D 0, udata =3D 0x0}, kn_status = =3D 24,=20 > kn_sfflags =3D 47, kn_sdata =3D 0, kn_ptr =3D {p_fp =3D 0xfffffe016949e= 190,=20 > p_proc =3D 0xfffffe016949e190, p_aio =3D 0xfffffe016949e190,=20 > p_lio =3D 0xfffffe016949e190}, kn_fop =3D 0xffffffff812fd440,=20 > kn_hook =3D 0xfffffe0119d0b1f8, kn_hookid =3D 0} =46rom the kgdb, also please do p *(struct vnode *)0xfffffe0119d0b1f8 >=20 >=20 > > Also, please follow > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/ke= rneldebug-deadlocks.html > > to recompile kernel with the debugging options and try to recreate > > the panic. >=20 > It's building. Please try the following. diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index aa165a0..5715f35 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -4421,10 +4421,14 @@ filt_vfsdetach(struct knote *kn) static int filt_vfsread(struct knote *kn, long hint) { - struct vnode *vp =3D (struct vnode *)kn->kn_hook; + struct vnode *vp; struct vattr va; int res; =20 + if ((kn->kn_status & KN_DETACHED) !=3D 0) + return (0); + vp =3D (struct vnode *)kn->kn_hook; + /* * filesystem is gone, so set the EOF flag and schedule * the knote for deletion. @@ -4450,8 +4454,11 @@ filt_vfsread(struct knote *kn, long hint) static int filt_vfswrite(struct knote *kn, long hint) { - struct vnode *vp =3D (struct vnode *)kn->kn_hook; + struct vnode *vp; =20 + if ((kn->kn_status & KN_DETACHED) !=3D 0) + return (0); + vp =3D (struct vnode *)kn->kn_hook; VI_LOCK(vp); =20 /* @@ -4469,9 +4476,12 @@ filt_vfswrite(struct knote *kn, long hint) static int filt_vfsvnode(struct knote *kn, long hint) { - struct vnode *vp =3D (struct vnode *)kn->kn_hook; + struct vnode *vp; int res; =20 + if ((kn->kn_status & KN_DETACHED) !=3D 0) + return (0); + vp =3D (struct vnode *)kn->kn_hook; VI_LOCK(vp); if (kn->kn_sfflags & hint) kn->kn_fflags |=3D hint; --I+bMzLstCROLYLmh Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSQU1VAAoJEJDCuSvBvK1BAacQAKci+a9PoDBfh+yAsEhqLK0I 5/qXLqv9yjqRPnDYuHoBpMuO7V67pon5UhOc0AqkWQg491sYE2+UGg8Or/+v5O89 twQhhOPmJgvoRNTKyL+tbVDHf1i0XqyR5AccClktpqgJ0JFv2XDIuCc+3dP6WwIm uD0nV8DrzZsP4v+fVJRSi1ggvHrFiBFcYnL89YUdFwJ1ueom2I1XOf5oDuUkFA/P wDELqq57e/gQPDMZEw4Mi0YlXDzUn9dF4NyW8wop05ChnJTBrCxuZ28Q+YJihPbu 4KV/fCpGoXD5DzMqjtiLRiEemvIworlWZcLJESLETct1svr6g3EQ134Qf99JQAlG fEm3KjBlinOHnUqTmSAi7yOVroOc9WTDIX1vID6kPnLR93VMHe+d0oP4YwxcXEo7 FovrGbyGvPd4Kg8yGr3yTWO/KFHJjWjQTseXJcr6ZauhfU2j8Dr+5sTkE2ABHhDY qdgfFd42DFnwipvarmiS+l++ZcEFA3aUVPBib+HeLK2jd9M6DAO5Bya8n97yYY9u SF3Rpb26D0I1PxLfFwYqKT/kr8OtQZaNqrKSHyqOruTO4T1Bxq7CZyKMGrdIt9p4 DcKq2ZWfEp9bIgvHZ3QqJNYpbijiAkwwhDfUtQohyQqAQ5pxJSwUbC7s4ppJyt/n jIWGsUH6BSIE6mnCTLr2 =V4Uu -----END PGP SIGNATURE----- --I+bMzLstCROLYLmh--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130924082909.GH41229>