On Fri, 2018-09-28 at 08:54 -0600, Jens Axboe wrote: +AD4 +- for (z +AD0 zb+ADs z +ADw ze+ADs z+-+-) +AHs +AD4 +- pthread+AF8-mutex+AF8-lock(+ACY-z-+AD4-mutex)+ADs +AD4 +- swd +-+AD0 z-+AD4-wp - z-+AD4-start+ADs +AD4 +- +AH0 +AD4 +- pthread+AF8-mutex+AF8-lock(+ACY-f-+AD4-zbd+AF8-info-+AD4-mutex)+ADs +AD4 +AD4 Can 'z' ever end up being f-+AD4-zbd+AF8-info? That would surely explain the +AD4 deadlock. Hi Jens, f-+AD4-zbd+AF8-info and z have a different type so unless something very weird is going on +ACY-z-+AD4-mutex can't be identical to +ACY-f-+AD4-zbd+AF8-info-+AD4-mutex. What I think is going on is traditional lock inversion: check+AF8-swd() triggers lock inversion if it is called while any of the z-+AD4-mutex objects are held. One such mutex is held where Damien tried to restore the calls of this function. I will submit a patch that inserts these calls elsewhere. Bart.