[core] Deadlock involving three locks
jimblandy opened this issue · 0 comments
jimblandy commented
The analysis in #5586 together with the lock ranks added in #5539 suggest that a deadlock could occur in the following circumstances:
- One thread holds a lock on
CommandBuffer::data
taken inGlobal::command_encoder_drop
while lockingDevice::life_tracker
at the end ofDevice::untrack
. - A second thread holds a lock on
Device::life_tracker
taken inDevice::maintain
while lockingDevice::temp_suspected
in that same function. - A third thread holds a lock on
Device::temp_suspected
taken inGlobal::queue_submit
while lockingCommandBuffer::data
in any of several places:CommandBuffer::drop
CommandBuffer::is_finished
CommandBuffer::extract_baked_commands
- later in
Global::queue_submit
itself