From owner-freebsd-geom@FreeBSD.ORG Tue Feb 3 08:21:06 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB45616A4CE; Tue, 3 Feb 2004 08:21:06 -0800 (PST) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 62D7643D1F; Tue, 3 Feb 2004 08:21:05 -0800 (PST) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id D15033ABB72; Tue, 3 Feb 2004 17:22:53 +0100 (CET) Date: Tue, 3 Feb 2004 17:22:53 +0100 From: Pawel Jakub Dawidek To: Lukas Ertl Message-ID: <20040203162253.GV4200@garage.freebsd.pl> References: <20040203164816.X616@korben.in.tern> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qa1NXTiqN6KSzHv0" Content-Disposition: inline In-Reply-To: <20040203164816.X616@korben.in.tern> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 4.8-RELEASE-p13 i386 X-URL: http://garage.freebsd.pl User-Agent: Mutt/1.5.1i cc: freebsd-geom@FreeBSD.org Subject: Re: vinum and GEOM deadlock situation X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2004 16:21:07 -0000 --qa1NXTiqN6KSzHv0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 03, 2004 at 04:56:23PM +0100, Lukas Ertl wrote: +> I'm running into a deadlock situation with the following scenario: +>=20 +> Have a vinum RAID5 with several disks mounted, pull out one of the disks, +> shortly thereafter all I/O hangs. +>=20 +> I managed to identify the deadlock, but couldn't come up with a fix yet. +>=20 +> Let's see. Here's the backtrace of the vinum process: [...] Yes, the deadlock is obvious. Your thread is holding the topology lock while calling g_waitfor_event(). g_waitfor_event() is trying to grap topology lock from g_event thread, but your thread is holing it and waiting for g_waitfor_event() to finish. As you can see, there is a : /* g_topology_assert_not(); */ in g_waitfor_event(), because you can't call it while holding the topology lock. We should really find a way to implement g_topology_assert_not(). The problem here is, that dp->d_close() is called with the topology lock and d_close() is calling disk_destroy() and there topology lock should not be holded. --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --qa1NXTiqN6KSzHv0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQFAH8rdForvXbEpPzQRAsisAKCZDQSU+pkqx1tnI+qy11+/UDBYbwCg477A cKm5zub9FTlHy5VHPP8whus= =tCZO -----END PGP SIGNATURE----- --qa1NXTiqN6KSzHv0--