From owner-freebsd-stable@FreeBSD.ORG Mon Sep 23 20:31:48 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7842D73A for ; Mon, 23 Sep 2013 20:31:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EFE6927DA for ; Mon, 23 Sep 2013 20:31:47 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r8NKVgTd096733; Mon, 23 Sep 2013 23:31:42 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r8NKVgTd096733 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r8NKVfhw096732; Mon, 23 Sep 2013 23:31:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 23 Sep 2013 23:31:41 +0300 From: Konstantin Belousov To: Patrick Lamaiziere Subject: Re: Possible kqueue related issue on STABLE/RC. Message-ID: <20130923203141.GV41229@kib.kiev.ua> References: <20130911171913.GG41229@kib.kiev.ua> <20130912073643.GM41229@kib.kiev.ua> <20130920151705.33aae120@mr129166> <20130923153708.45c3be3d@mr129166> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tqL8xdl27knXeD23" Content-Disposition: inline In-Reply-To: <20130923153708.45c3be3d@mr129166> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 20:31:48 -0000 --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 a ?crit : >=20 > > Le Thu, 12 Sep 2013 10:36:43 +0300, > > Konstantin Belousov 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--