Deadlock between GEOM and devfs device destroy and process exit.

Pawel Jakub Dawidek pjd at FreeBSD.org
Mon Feb 1 09:23:59 UTC 2010


On Sat, Jan 30, 2010 at 12:44:51PM +0100, Pawel Jakub Dawidek wrote:
> Maybe I'll add how I understand what's going on:
> 
> GEOM calls destroy_dev() while holding the topology lock.
> 
> Destroy_dev() wants to destroy device, but can't because there are
> threads that still have it open.
> 
> The threads can't close it, because to close it they need the topology
> lock.
> 
> The deadlock is quite obvious, IMHO.

Guys, changing destroy_dev() to destroy_dev_sched() in geom_dev.c fixes
the problem for me (at least it makes race window so small that I can't
reproduce it). Is there anyone who isn't happy with such a change?

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
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-current/attachments/20100201/fdab5739/attachment.pgp


More information about the freebsd-current mailing list