[core] Deadlock between `Device::temp_suspected` and `CommandBuffer::data`
Closed this issue · 0 comments
jimblandy commented
Two threads can deadlock as follows:
- The first thread calls
Global::command_encoder_drop
, which locksCommandBuffer::data
while callingDevice::untrack
, which then locksDevice::temp_suspected
. - The second thread calls
Queue::submit
, which locksDevice::temp_suspected
and thenCommandBuffer::data
.
The lock around temp_suspected
should never need to be held for a long time. This is just a simple allocation reuse.