Date: Mon, 23 Sep 2013 23:31:41 +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: <20130923203141.GV41229@kib.kiev.ua> In-Reply-To: <20130923153708.45c3be3d@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>
next in thread | previous in thread | raw e-mail | index | archive | help
--tqL8xdl27knXeD23 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 23, 2013 at 03:37:08PM +0200, Patrick Lamaiziere wrote: > Le Fri, 20 Sep 2013 15:17:05 +0200, > Patrick Lamaiziere <patfbsd@davenulle.org> a ?crit : >=20 > > Le Thu, 12 Sep 2013 10:36:43 +0300, > > Konstantin Belousov <kostikbel@gmail.com> a ?crit : > >=20 > > Hello, > >=20 > > > Might be, your issue is that some filesystems do not care about > > > proper locking mode for the fifos. UFS carefully disables shared > > > locking for VFIFO, but it seems ZFS is not. I can propose the > > > following band-aid, which could help you. > > >=20 > > > I have no idea is it the same issue as the kqueue panic. > > >=20 > > > diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c > > > index c53030a..00bd998 100644 > > > --- a/sys/kern/vfs_vnops.c > > > +++ b/sys/kern/vfs_vnops.c > > > @@ -267,6 +267,8 @@ vn_open_vnode(struct vnode *vp, int fmode, > > > struct ucred *cred, return (error); > > > } > > > } > > > + if (vp->v_type =3D=3D VFIFO && VOP_ISLOCKED(vp) !=3D > > > LK_EXCLUSIVE) > > > + vn_lock(vp, LK_UPGRADE | LK_RETRY); > > > if ((error =3D VOP_OPEN(vp, fmode, cred, td, fp)) !=3D 0) > > > return (error); > > > =20 > > > @@ -358,7 +360,7 @@ vn_close(vp, flags, file_cred, td) > > > struct mount *mp; > > > int error, lock_flags; > > > =20 > > > - if (!(flags & FWRITE) && vp->v_mount !=3D NULL && > > > + if (vp->v_type !=3D VFIFO && !(flags & FWRITE) && > > > vp->v_mount !=3D NULL && vp->v_mount->mnt_kern_flag & > > > MNTK_EXTENDED_SHARED) lock_flags =3D LK_SHARED; > > > else > >=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 p= oudriere). >=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 For start, please load the core into kgdb and for frame 8 p *kn Also, please follow http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kernel= debug-deadlocks.html to recompile kernel with the debugging options and try to recreate the pani= c. --tqL8xdl27knXeD23 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSQKUsAAoJEJDCuSvBvK1BwPYP/0agnpAChZUykUahx+8Jfut4 A/WVnPNrKQlAxL879/JMxdtt0rcA8oBFn/B7nWCFrC7m9lhihcqm5LqCrm5VgMon xySzk/0tpikX4ucRijXX0M+1jcJbpdcsIjUx616qeg6t9VDoW5fj6J8SGzySiPcn 2OCcSpzBj69jDdDOGE24gTA7jg+SaL5XVT3g1f640bk01MuML5t/lnHdsmF+F34K mZdI9sWl2S+UzbfgqX/FqBOp6emvgr38HJcOEw39xsjytPrvddi6B0P4StkQCUcK mZFBJBZC0nBKEsjj2fW3g73eMlvQWIYbwYGePIGkaLmC+aQFUpaw50XGc2QpxF4l pyP0xmnl3o2ffSGWF++gH8ZcmQPnXOGqUbrArnDztmHjTKqUGNtzyhowUbJWICe4 4c9iTarFkCYA5tsJZf+UlC+V1myBT7FQ3X1QCELmR1LeGESW3cC+NiwAlu2Sbymk pQtTXSEGeqViRWHoG4fzeO8F1sRXfaZypKjq8pn43OepdY8xfOraDTQlcOqUh9Zs xUe+oSAh8vZrazb0GFImue1oJyADTWR683m4hXEFNpA7QNiB4xxFkC1BJErE2ZWA N3Lex9y2muA6TCk2YeWB+TJxyHcWkMQSbMBojJ+Nvk+KI5qTzUCRIOUBWj7nulgb EePHiXqTz2+sxkmH0kx2 =6unz -----END PGP SIGNATURE----- --tqL8xdl27knXeD23--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130923203141.GV41229>