Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Feb 2004 17:22:53 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Lukas Ertl <le@FreeBSD.org>
Cc:        freebsd-geom@FreeBSD.org
Subject:   Re: vinum and GEOM deadlock situation
Message-ID:  <20040203162253.GV4200@garage.freebsd.pl>
In-Reply-To: <20040203164816.X616@korben.in.tern>
References:  <20040203164816.X616@korben.in.tern>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040203162253.GV4200>