[bug] Unsignaled CrossQueueBarrier: a refused submission loses its fence signals and bottom-of-pipe value writes #80
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AeroUp on 2026-11-26T13:44:12Z.
Labels:
bug,urgent— written here because this account has no label permission on the repository.Summary
When a pass cannot be encoded,
submit_passes(crates/victory-metal/src/gfx.rs) returns beforecb.commit(). The entire submission is dropped — itsencodeSignalEventcalls for the title's fences and its bottom-of-pipe value writes.native/title.rsthen logsa piece of title work was refusedand consumes the held item, so nothing replays those writes.The title detects exactly that and dies: its crash log has
Unsignaled CrossQueueBarrier, and the log shows a queue held on a memory value that never arrives:cmp 7isD3D12_COMPARISON_FUNC_GREATER_EQUAL,ref 0x749≈ the frame number: this is the per-frame cross-queue semaphore the four compute queues wait on at the start of each list.Two contributing shapes
0 colour [], depth None) — D3D12 makes that a no-op; Metal cannot create an encoder without an attachment, so it was refused. It should be skipped.Proposal
PR #78: the command buffer always commits (signals and value writes go out), the failing pass is dropped and named, passes after it still run, and an empty draw pass is skipped as the no-op it is. The error now carries the attachments' sizes and formats so a future
no render encodersays what Metal disliked.Not claimed
This removes a demonstrated way the barrier write is lost. Whether a cross-queue cycle can also deadlock (two queues each waiting on the other) is not proven either way;
hold.rs's safety valve logs it but does not break it.Update: a live sample during the stall
Sampling the process while it is stalled (not after) shows the title's main thread blocked in
with every other title thread parked on
Event::wait/Semaphore::wait, and no host frame running (nothing invictory_gpu,glueor Metal). So the frame is not lost in our encoder and the GPU is not behind: every command buffer completes. The main thread waits for a semaphore a producer thread should release, and that producer is parked on a GPU event.Two variants are seen across runs:
work held for a wait that does not holdnames the address (0x18437f990,GREATER_EQUAL, ref = frame). Our value-write trace shows the title does record the write (value 3649), so the fill is either never submitted or its queue is itself parked. Breaking the wait after 2 s makes the frame run with inputs that are not ready and the title reads0x7c007c00…garbage.VICTORY_TRACE_HOLD=1now logs each value write's list pointer and each submission's queue and list pointers, so the two cases can be told apart from one run.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T15:56:43Z.
Status: PR #78 keeps the refused pass's fence signals and bottom-of-pipe writes. It has changes requested and is not merged. Related to the story-load investigation in #15, though GPU compute writes are now ruled out as the cause of the prologue crash. Needed: updated #78.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T17:13:23Z.
Fixed on our side in c3de092e (branch
fix/prologue-crash): a command buffer the GPU fails still signals its fences, order event and value writes, from the CPU, so the title never waits on a barrier that will never come. It lands on main once the prologue runs confirm it.VICTORY_TRACE_GPU_FAILS=1(2a42dc73) names failed, slow and in-flight command buffers.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T18:10:25Z.
This is on main now: a failed GPU command buffer still signals its fences, so the title no longer waits on a barrier that never comes. Please report here if you still see
Unsignaled CrossQueueBarrieron current main.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AeroUp on 2026-11-26T18:24:44Z.
Still there on a branch that has your failed-command-buffer fix merged (
ce35cbc, viaMerge upstream/main5ea0504), M3 Pro 18 GB,--console series-s:Unsignaled CrossQueueBarrier: 252fa538(same id as the first report), frame 1721, 3m38s in; the unhandled fault is still0xc0000005 at image+0x55e56f8.metal: command buffer failedline and nopaid ... fence signals ... on the CPUline in the whole run, so nothing took the recovery path.fence 0x…: completed 1790, requested 1790 (7.2s ago), no held queues, no command buffer in flight. So the value the barrier waits for is not a fence value any more.VICTORY_TRACE_HOLD=1the last one before an earlier stall wasa bottom-of-pipe value write list=0x… at=0x18437f9e8 value=3286 bytes=8, and that list never appears in anya submission ... pointers=[…]line. Those 8 bytes are written as eight 1-byteCmd::Fills, so they ride the piece's blit passes; a piece that is refused before submission still loses them.So on our side the remaining hole is the piece path, not the completion path: a fill whose piece never reaches
submit_passes(or a list that is never executed) still loses the write silently. If your prologue runs show the same, the next fix is probably to hold value writes outside the piece (a queue-level tail that is always committed), the way the fence signals are.I will report back after testing whether forcing every list with a value write to be submitted changes it.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T22:52:56Z.
@AeroUp Thanks. Could you retry on current main (
49b5521b)? Command buffers lost to GPU timeouts now still pay their fence signals, and on 18 GB please tryVICTORY_METAL_RESIDENCY_SETS=heap. IfUnsignaled CrossQueueBarrierstill shows up, please attach the log.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T05:39:18Z.
Has anyone seen the unsignaled CrossQueueBarrier on current main? The fix landed some time ago and the last report was from an older branch. If nobody sees it in the next few days this will be closed.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-27T16:21:55Z.
/claim
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-27T16:22:07Z.
Claimed by @AnastasisKon. Open a draft pull request with
Refs #80in its description within 24 hours, or the claim expires.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T12:48:18Z.
/release - done: the fix is on
main(branchvibe/cross-queue-barrier-2b74cc:pay a refused submission's value writes on the CPU, then only the lost passes'), and docs/ROADMAP.md already lists it under the 26-27 November fixes: "Failed command buffers now still signal their fences". The claim was stale.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-28T12:48:27Z.
Released. This issue is free to claim.