Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Feb 2010 10:35:57 +0100
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        freebsd-hackers@freebsd.org
Cc:        kib@freebsd.org, Alexander Motin <mav@freebsd.org>, FreeBSD-Current <freebsd-current@freebsd.org>, Pawel Jakub Dawidek <pjd@freebsd.org>, freebsd-geom@freebsd.org
Subject:   Re: Deadlock between GEOM and devfs device destroy and process exit.
Message-ID:  <201002011035.57862.hselasky@c2i.net>
In-Reply-To: <20100201092334.GB1743@garage.freebsd.pl>
References:  <4B636812.8060403@FreeBSD.org> <20100130114451.GB1660@garage.freebsd.pl> <20100201092334.GB1743@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 01 February 2010 10:23:34 Pawel Jakub Dawidek wrote:
> 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?
> 

Are you sure there are no races or leftover resources that can be accessed by 
the callbacks of the device being destroyed?

--HPS



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