In the process of developing #5539, we identified at least one deadlock in wgpu-core, and I suspect there are others. We should fix these deadlocks, updating lock::rank as we go, and enable the lock::ranked run-time validation by default in debug builds (#5937).
The presence of deadlocks means that no cycle-free ranking of locks exists that won't cause panics in our current tests and examples. This means that the ranking defined in lock::rank must either remain incomplete, or we should change the implementation to permit ranking cycles for the time being. The latter option is unappealing, so we plan to land #5539 with an incomplete ranking, meaning that enabling the validate-locks feature will cause panics for now.
Issues for specific deadlocks:
In the process of developing #5539, we identified at least one deadlock in
wgpu-core, and I suspect there are others. We should fix these deadlocks, updatinglock::rankas we go, and enable thelock::rankedrun-time validation by default in debug builds (#5937).The presence of deadlocks means that no cycle-free ranking of locks exists that won't cause panics in our current tests and examples. This means that the ranking defined in
lock::rankmust either remain incomplete, or we should change the implementation to permit ranking cycles for the time being. The latter option is unappealing, so we plan to land #5539 with an incomplete ranking, meaning that enabling thevalidate-locksfeature will cause panics for now.Issues for specific deadlocks:
adapter_request_deviceanddevice_poll#5807poll_all_devicesandqueue_submit#5695Device::temp_suspectedandCommandBuffer::data#5647