Open sagudev opened 1 month ago
One thread tries to acquire lock on https://github.com/gfx-rs/wgpu/blob/fa48562229ae9effe10696e74249304f1fb9a3f0/wgpu-core/src/resource.rs#L646 while other already acquired it: https://github.com/gfx-rs/wgpu/blob/fa48562229ae9effe10696e74249304f1fb9a3f0/wgpu-core/src/device/resource.rs#L335 this second thread tries to acquire: https://github.com/gfx-rs/wgpu/blob/fa48562229ae9effe10696e74249304f1fb9a3f0/wgpu-core/src/device/resource.rs#L359 that is already acquired by https://github.com/gfx-rs/wgpu/blob/fa48562229ae9effe10696e74249304f1fb9a3f0/wgpu-core/src/device/queue.rs#L1162 and later passed on to https://github.com/gfx-rs/wgpu/blob/fa48562229ae9effe10696e74249304f1fb9a3f0/wgpu-core/src/device/queue.rs#L1494
Description Deadlock between
poll_all_devices
(whiledeferred_resource_destruction
on bind group destroy) andqueue_submit
(whiledevice.maintain
):Repro steps Similar to https://github.com/gfx-rs/wgpu/issues/5687, but this one is way harder to reproduce (happens more rarely). Using servo: https://github.com/servo/servo/pull/32266/commits/258406ddbdef5cf526a5a7f83e0fb7871470ec73 and running
https://gpuweb.github.io/cts/standalone/?runnow=1&q=webgpu:api,operation,compute,basic:*
.Expected vs observed behavior Expected no deadlock.
Platform wgpu-core on trunk (d0a5e48aa7e84683114c3870051cc414ae92ac03)