From 9bd38c7994046f5efe5e53fbed296bdea185b655 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Sun, 8 Nov 2026 00:59:11 -0800 Subject: [PATCH] Bump RUNTIME_VERSION to 1876: the queue-switch check's round holds its queues through its gate's signal holds: the 5080's device_recovery hang was a deadlock between the queue-switch check and a drain (Device::drain_queues, under the queue's lock, in vkQueueWaitIdle). The check's round submitted two batches waiting on a gate as two separate uses of the queue, and signalled the gate only after the second. A drain taken between the two uses waited for batch 1, batch 1 for the gate, and the second submission for the drain's lock. A round now takes its VkQueues' locks in index order before its first submission and lets them go after the gate's signal, so every submission on a free queue completes without host work. Evidence (holds, RTX 5080, entry recovery-fix-1): negative control (each submission its own use again) hung 2 of 2, the stacks showing the drain in vkQueueWaitIdle under SlotHold::with and the check thread blocked in QueueSlot::hold at the round's second submission; with the fix the new test a_drain_beside_the_queue_switch_check_s_round_completes passed 60/60 (4 at once), and the 6 device_recovery tests, 4 copies at once, 216 runs, no hang (a_loss_holds_the_hang_s_queue_until_the_recovery and work_that_completed_before_a_failed_wait_completes 36/36 each; the race test failed only on its pre-edde5779b1 base). The natural hang reproduced in round 7e9acd5e73's 5080 part rt2 (a_loss_holds..., 943 s). M3 7419: 101/101 across relay, recovery, queue-share, teardown and submit-check tests. The check runs on neither lavapipe nor MoltenVK. Pending: lint at this commit (development's leg). --- crates/metal2vulkan-validation/runtime-sources.sha256 | 2 +- crates/metal2vulkan/src/cache/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/metal2vulkan-validation/runtime-sources.sha256 b/crates/metal2vulkan-validation/runtime-sources.sha256 index e7f4e6ce0..ab9ec37eb 100644 --- a/crates/metal2vulkan-validation/runtime-sources.sha256 +++ b/crates/metal2vulkan-validation/runtime-sources.sha256 @@ -1 +1 @@ -089a68cba00329d03c53f7291bccf327e94bff2c3d10a62ebf2ecef77396ebad +84d26347d37f6d95ca6951b995ddc288f139ec48fc5c47bbe8e5862fe4053c80 diff --git a/crates/metal2vulkan/src/cache/mod.rs b/crates/metal2vulkan/src/cache/mod.rs index 5d70e9ef8..f04a656ef 100644 --- a/crates/metal2vulkan/src/cache/mod.rs +++ b/crates/metal2vulkan/src/cache/mod.rs @@ -93,7 +93,7 @@ pub const ARTIFACT_FORMAT_VERSION: u32 = 493; /// changes no behaviour, and then updates that hash alone with the commit saying why, or changes /// behaviour and also bumps this version. The commit that bumps it says what changed; this comment /// keeps no history. -pub const RUNTIME_VERSION: u32 = 1875; +pub const RUNTIME_VERSION: u32 = 1876; /// The digest of the sources this build of the crate was compiled from: SHA-256, as lowercase hex, /// of the manifest, the build script, and exactly the files the crate roots' module tree compiles