From owner-freebsd-stable@FreeBSD.ORG Wed Sep 25 08:06:39 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 A5D81534 for ; Wed, 25 Sep 2013 08:06:39 +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 44B512026 for ; Wed, 25 Sep 2013 08:06:39 +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 r8P86XXb007069; Wed, 25 Sep 2013 11:06:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r8P86XXb007069 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r8P86Xgl007068; Wed, 25 Sep 2013 11:06:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 25 Sep 2013 11:06:33 +0300 From: Konstantin Belousov To: Patrick Lamaiziere Subject: Re: Possible kqueue related issue on STABLE/RC. Message-ID: <20130925080633.GY41229@kib.kiev.ua> References: <20130920151705.33aae120@mr129166> <20130923153708.45c3be3d@mr129166> <20130923203141.GV41229@kib.kiev.ua> <20130924094427.0f4b902a@mr129166> <20130924082909.GH41229@kib.kiev.ua> <20130924114738.60c700c9@mr129166> <20130924121434.GI41229@kib.kiev.ua> <20130924174517.GB14220@funkthat.com> <20130924212127.GQ41229@kib.kiev.ua> <20130925095805.2072f0cc@mr129166> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zxscdqhVGwTkkwBg" Content-Disposition: inline In-Reply-To: <20130925095805.2072f0cc@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: Wed, 25 Sep 2013 08:06:39 -0000 --zxscdqhVGwTkkwBg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 25, 2013 at 09:58:05AM +0200, Patrick Lamaiziere wrote: > Le Wed, 25 Sep 2013 00:21:27 +0300, > Konstantin Belousov a ?crit : >=20 > Hello, >=20 > > On Tue, Sep 24, 2013 at 10:45:17AM -0700, John-Mark Gurney wrote: > > > I'd like to understand why you think protecting these functions w/ > > > the _DETACHED check is correct... In kern_event.c, all calls to > > > f_detach are followed by knote_drop which will ensure that the knote > > > is removed and free, so no more f_event calls will be called on that > > > knote.. > >=20 > > My current belief is that what happens is a glitch in the > > kqueue_register(). After a new knote is created and attached, the kq > > lock is dropped and then f_event() is called. If the vnode is > > reclaimed or possible freed meantime, f_event() seems to dereference > > freed memory, since kn_hook points to freed vnode. > >=20 > > The issue as I see it is that vnode lifecycle is detached from the > > knote lifecycle. Might be, only the second patch, which acquires a > > hold reference on the vnode for each knote, is really needed. But > > before going into any conclusions, I want to see the testing results. >=20 > Testing looks good with your latest patch. I was able to run a complete > poudriere bulk (870 packages). I'm running another bulk to see. >=20 > If you have other patches to test just ask, I have not updated my > packages because there was a change to make gvfsd to ignore some > poudriere activity. So I guess it will be harder to see this > problem. Very good, thank you. Could you, please, test with the only patch http://people.freebsd.org/~kib/misc/vnode_filter.1.patch applied ? I wonder would it be enough. --zxscdqhVGwTkkwBg Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSQpmIAAoJEJDCuSvBvK1BroEQAJq1jhs+/606PQa8aoeXNStV TWDgiA6kWQEQryBfmwPkaYa3lmZCgN+7PAtMMrWk5S8zIJJmZbBj5IZg5++c6bR/ 2A1OTUB8opiH3PA+HqEpXJ3/e99tNw5D3O6VaMV92I1Qgt5MxuAk6mZFz0k+EQIJ 8Fls+Il3CxstmpzEkBRQfcOiqBmpenoiGUHBe60YRpmCXaUI8VWkI6TbayGbvmEI QdhOke64xs7mDi5Repb2fZqYBn5ARMppuIdgMkwLt/0SiVSEzyct6rjDAZsXGLtD hhfGNqVPYPI/zcVxeUJZyvCeC0NbQtupSFlf/IplP/717VAhB/cYWoUX76MdmO49 BWJ7Lji+UP9RRyuz0CzdjZSv6b1Kw3ES8rVC+gNhTbuje1acFvwOl6ZOeVASlzht Jv68HQlHCpg80CL0MHEf6NA/rrZtWjQOz3kw6Yn72g61TqbLE292zuRtjkzkjYFL PPnO/K1sL0k/nv96gUNDYKj1JDQtTlpk0CvouJYYdR3vklCgOY33ytInhy8nP54M BMi31ZWTogRIbfAMrmFITNYzmvOaTP83hXhP/5sb2+ioV5HJ6hyXDPBGh6Nfcjen Af+obcHOqws8hNdmFNU1GNwESQyxnyd1rUmYfxo3I7oBTfKnKf/WW21/7hyY7cAB J6KvaTyTO1RsPUNmXfx8 =MOOh -----END PGP SIGNATURE----- --zxscdqhVGwTkkwBg--