Re: Kernel crashes from turnstile_broadcast (/usr/src/sys/kern/subr_turnstile.c:837)

From: Mateusz Guzik <mjguzik_at_gmail.com>
Date: Thu, 22 Sep 2016 17:13:29 +0200
On Thu, Sep 22, 2016 at 03:01:41PM +0200, Mateusz Guzik wrote:
> On Thu, Sep 22, 2016 at 08:48:29PM +0800, Ben Woods wrote:
> > #13 0xffffffff80b4d91c in turnstile_broadcast (ts=0x0, queue=1) at
> > /usr/src/sys/kern/subr_turnstile.c:837
> > #14 0xffffffff80ae5e1f in __rw_wunlock_hard (c=0xfffff803f886d960,
> > tid=<value optimized out>, file=<value optimized out>, line=<value
> > optimized out>)
> >     at /usr/src/sys/kern/kern_rwlock.c:1027
> 
> can you please:
> f 14
> x/xg c
> 

After a quick look I think this is a race within the facility itself.

It can set the RW_LOCK_WRITE_SPINNER flag, which will trigger the
wunlock_hard path which expects a blocked thread. But by that time the
contending thread is not necessarily on the turnstile yet, and it may
not even go there in the first place.

I'll investigate more tomorrow.

-- 
Mateusz Guzik <mjguzik gmail.com>
Received on Thu Sep 22 2016 - 13:13:34 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:08 UTC