Host failures quote the error that broke the list #4574
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4574
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4573"
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?
@frametrace on GitHub · 2026-11-30 22:56 UTC · original
frametrace:fix/failure-quotes-last-error→main· +281 −9 · 2 files · 3 commits · openWith
VICTORY_D3D12_DEBUG=1(diagnostics builds),fail()adds a debug-layer message to a host GPU failure, so the report names the bad command. Two things made that quote unreliable.Close, after whatever earlier submissions raised. In one run (RTX 5090, hardware RT), a list failed onCopyTextureRegion BC3_TYPELESS -> BC7_TYPELESS(id 874; see #2914 / #3043), but the failure quoted an earlier root-view state error thatExecuteCommandListsraises (id 538), of which that run logged 52,187.log_messages()in the relay and landing paths). In another run, one of them took the copy errors 0.25 ms afterClosefailed and beforefail()asked, and the failure quoted nothing.What changes:
ID3D12InfoQueue1::RegisterMessageCallback, on the raising thread), in one record per id (current burst count, last text, time raised). A drain counts the queue and then clears it, so an error raised in between was seen by nobody; the callback closes that window, and stamps errors when raised rather than when drained. WhereID3D12InfoQueue1is missing, every drain notes its errors instead, whichever thread drained them, and the log says so.ID3D12CommandList::…/ID3D12GraphicsCommandList…) within 2 s. Execute-time errors come after a list closed, so they can't be why it didn't.host::failure_quote, with 6 unit tests (a flood of execute-time errors after the copy; a drain by another thread beforefail()asks; an old error; bursts; the callback's severity cut; a missing or invalid-UTF-8 message). The callback makes no D3D12 calls and runs undercatch_unwind.log_messages()is unchanged. Nothing changes without the debug layer.Tested on main (v2026.11.30.03, without #3043, so the copy failure still happens), diagnostics build, debug layer on, hardware RT. The run failed 2.6 min into the prologue, and
crashes.logreads:That run was with the previous wording of the last part ("id 538 x42436"). The final wording is covered by the unit tests.
What it guarantees: with the callback, errors are captured at emission; without it, only the errors a drain read. Errors the queue's filters deny are not seen either way. In both cases the quote is the newest record-time error, not a proven link to the failing list: it can belong to another thread's list.
Callback check (after review): RTX 5090, driver 616.92, the same setup. The callback registered, and 3 of 3 runs that failed quoted the copy (BC3 -> BC7 twice, BC3 -> BC6H once), and in the two runs checked, the "like it" count matched the id-874 messages the drains logged. The fallback path has only the unit tests, and nothing ran on Windows 10.
Relation to #3488: #3488 names a failed
Close's command without the debug layer, by replaying what was recorded. This PR only fixes which debug-layer messagefail()quotes, for any kind of host failure. They don't overlap in code.🤖 Generated with Claude Code
@tyr0nsur on GitHub · 2026-12-01 01:31 UTC · original
I ran the four
failure_quoteunit tests from7851d0c4on native Windows and all passed. One capture window remains before selection: this drain reads only the count sampled byGetNumStoredMessagesand then clears the entire info queue. If a recording error arrives after that count is read but before this clear,SEEN_ERRORSnever sees it. Saving messages from every drain helps with an already-consumed message, and still leaves this arrival window. ClearStoredMessages contractThis is from the code path and API contract. The local machine does not expose the D3D12 debug interface, so I did not reproduce the live queue timing. Could the guarantee in the description be scoped to messages read by a drain, or could an InfoQueue callback capture the error at emission?
@frametrace on GitHub · 2026-12-01 04:30 UTC · original
Thanks for running the tests and for spotting the gap. You're right:
drain_messagesreadsGetNumStoredMessages, thenClearStoredMessagesdrops anything raised in between, so a record-time error from another thread could be lost.I took the callback route (
3421dbc8,a5f198dc):VICTORY_D3D12_DEBUG, the host registersID3D12InfoQueue1::RegisterMessageCallback. It notes each error intoSEEN_ERRORSon the raising thread as it's emitted, and the drains then only log.ID3D12InfoQueue1isn't available, the drains note errors as before, and the log says so.catch_unwind, so a panic can't unwind into the layer. It's a plain function with unit tests (severity cut, missing text, invalid UTF-8).Live check: RTX 5090, driver 616.92, Windows 11, diagnostics build,
VICTORY_D3D12_DEBUG=1, hardware RT, on .03 (which still hits the BC3→BC7 copy without #3043).ID3D12CommandList::CopyTextureRegion ... BC3_TYPELESS ... BC7_TYPELESS (id 874, 7 like it). The drains logged exactly 7 id-874 messages before the failure, so the callback saw what the drains saw.crashes.log. Its play log lost the final line to an unrelated log-flush issue.a5f198dc: the callback registered, and the run failed the same way. The quote wasCopyTextureRegion ... BC3_TYPELESS ... BC6H_TYPELESS (id 874, 8 like it); other errors still being raised: id 538 (122548 without a 2 s pause), and the play log has exactly 8 id-874 messages. BC6H this time, the same copy family as #2914.Limits:
ID3D12InfoQueue1is missing.I've updated the description to match: with the callback, errors are captured at emission; without it, only errors a drain read; in both cases the quote is the newest record-time error, not a proven link to the failing list.
a5f198dcdftod64753fe5dView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.