panic: Stray timeout

Andriy Gapon avg at FreeBSD.org
Sun Aug 30 19:10:13 UTC 2015


On 30/08/2015 19:16, Konstantin Belousov wrote:
> This is strange, I do not think that could be a right explanation of this
> issue.  The taskqueue callout is initialized with the mutex, which means
> that the callout_stop() caller
> - must own the mutex;
> - is synchronous with the callout.
> In other words, callout cannot be running when taskqueue_cancel_timeout()
> calls callout_stop(), it only can be dequeued but the callout function
> is not yet called.  If callout_stop() is performed meantime, between
> dropping callout_cpu lock, and locking the mutex, it must be not run.

Thank you for the explanation.  I am not familiar with the code and I
misinterpreted the manual page and thought that callout_stop() might be unable
to stop the callout even if it was initialized with the mutex.  I see my mistake
now.

-- 
Andriy Gapon


More information about the freebsd-current mailing list