Date: Thu, 8 Jul 2004 20:19:09 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: geom@freebsd.org Subject: Re: Current GEOM problems. Message-ID: <20040708181909.GT12007@darkness.comp.waw.pl> In-Reply-To: <3838.1089306943@critter.freebsd.dk> References: <20040707012904.GP12007@darkness.comp.waw.pl> <3838.1089306943@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
--s1V7GiNVmT/EiLBY Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 08, 2004 at 07:15:43PM +0200, Poul-Henning Kamp wrote: +> >2. Every class which use geom_slice cannot be unload when it has geoms +> > (actually providers), because g_slice_destroy_geom() calls +> > g_slice_spoiled() and g_slice_spoiled() calls g_wither_geom(). +> > If there are providers, geom will not be imediately destroyed, +> > but orphan event will be send, so next time when g_slice_destroy_geo= m() +> > will be called for the same geom it will panic, because gp->softc is +> > NULL. +>=20 +>=20 +> can you try this untested patch ? Nope, it doesn't work. I'll try to explain the problem more precise. When g_wither_geom() is called from g_unload_class() via destroy_geom method AND provider exists on this geom we can choose: panic or deadlock, because: - g_unload_class() is called from the event queue in blocking mode. - g_wither_geom() calls g_orphan_provider(). - g_orphan_provider() sends event, but the event queue is blocked, so provider can't be destroyed, so geom can't be withered. - g_unload_class() tries to destroy this geom in loop, but it can't be definitely destroyed. The simplest solution which cames to my mind is to skip geoms that are marked as beeing withered in g_unload_class(). BTW. You reproduce this panic by doing: # glabel create foo <some_provider> # glabel unload --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --s1V7GiNVmT/EiLBY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA7ZAdForvXbEpPzQRAiT+AJ9y1vfC5vHxoT6XTQqFwmfYS6qevgCfYa6h QSIOvqz82AvoJ6kYcPKHXTc= =b//M -----END PGP SIGNATURE----- --s1V7GiNVmT/EiLBY--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040708181909.GT12007>