vinum and GEOM deadlock situation

Pawel Jakub Dawidek pjd at FreeBSD.org
Tue Feb 3 08:21:07 PST 2004


On Tue, Feb 03, 2004 at 04:56:23PM +0100, Lukas Ertl wrote:
+> I'm running into a deadlock situation with the following scenario:
+> 
+> Have a vinum RAID5 with several disks mounted, pull out one of the disks,
+> shortly thereafter all I/O hangs.
+> 
+> I managed to identify the deadlock, but couldn't come up with a fix yet.
+> 
+> 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.

-- 
Pawel Jakub Dawidek                       http://www.FreeBSD.org
pjd at FreeBSD.org                           http://garage.freebsd.pl
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20040203/c378487e/attachment-0001.bin


More information about the freebsd-geom mailing list