Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Aug 2005 10:59:24 -0400
From:      John Baldwin <jhb@FreeBSD.org>
To:        Sam Leffler <sam@freebsd.org>
Cc:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   Re: PERFORCE change 81809 for review
Message-ID:  <200508111059.25135.jhb@FreeBSD.org>
In-Reply-To: <200508102238.j7AMc1rt070595@repoman.freebsd.org>
References:  <200508102238.j7AMc1rt070595@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 10 August 2005 06:38 pm, Sam Leffler wrote:
> http://perforce.freebsd.org/chv.cgi?CH=81809
>
> Change 81809 by sam@sam_ebb on 2005/08/10 22:37:39
>
> 	Bandaid deadlock: on tx timeout we're in the callout callback
> 	when we clock the state machine, but this results in a call
> 	to callout_drain which blocks because the callout is active.
> 	Workaround for now is to use callout_stop which won't block
> 	but this potentially leaves us open to a race.

If you use callout_init_mtx() instead then I think it closes the race for you 
as softclock will block on your mutex before trying to run the callout and it 
will not run it if you cancel the callout before you drop your lock.

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



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