Date: Wed, 25 Sep 2013 11:06:33 +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: <20130925080633.GY41229@kib.kiev.ua> In-Reply-To: <20130925095805.2072f0cc@mr129166> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <kostikbel@gmail.com> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130925080633.GY41229>