Repository navigation
Conversation
Open
1 task done
1 task done
Amost-
force-pushed
the
pr/gpu-watchdog
branch
from
November 7, 2026 12:43
c313cdc to
0694d7e
Compare
3 tasks done
…stuck pipelines Hyrule Warriors: Age of Imprisonment froze the GPU in its first outpost mission while a special attack filled the screen; the allocator wait of the next submission had no timeout, so the host hung in silence. Every blocking GPU wait now runs in 2 s slices, and after DM_NVN_GPU_WATCHDOG seconds (5 by default) with work in flight a [RED] line names the frame, counts and pipelines of the submission the GPU is stuck on, from a per-submission record of its vertex/fragment pairs and compute shaders, and points at DM_NVN_SKIP_FS to play on. The cause is open: the shaders' light-list loops run in the first battle at 1x and 2x with an empty list and never hang (game README, "GPU hang in a battle"). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> (cherry picked from commit 7083aa2)
…n record is printed in the command-buffer error path too When macOS aborts a command buffer that ran too long (Ocarina of Time, issue seedds#1326), the fence completes with an error and g_done moves on, so the hang watchdog, which needs a fence that never completes, does not fire. The feedback handlers now print the same record for a submission that had a failure of its own: once its last command buffer has come back, once per fence, for the first 16 fences. A failed segment leaves a mark for the last handler to print. A segment whose handler runs after the last one prints the record itself. The record is now kept per command buffer of the submission, a pair once in each, so a failed segment lists every pipeline it ran. Pairs are in the order they first ran, each marked with the render pass it began in (counted from the submission's first, whose DM_NVN_PASSDUMP number the header gives). Victims and refused submissions are left out, through the filter cbs_feedback already used. The record holds up to 48 pairs and only counts the rest. Its text is built by one formatter that stays inside its buffer; the watchdog uses it too. Main's shader lists name each game shader once per failed command buffer and rank them across failures. This line shows, for the one failed submission, which vertex shader drew with which fragment shader, its compute shaders and the host's builtins, in order, with the failed command buffer marked. t_gpu_watchdog checks the record, its text, both handler orders, once per fence, victims and the watchdog's single report. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Amost-
force-pushed
the
pr/gpu-watchdog
branch
from
November 11, 2026 10:14
0694d7e to
67516f8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A diagnostic for the freeze of issue #1223's kind, split out of #405 so it can land on its own.
When a shader never ends, no command buffer completes, no feedback handler runs, and every CPU wait for the GPU blocks for good: the host froze silently with its render thread in a wait with no timeout. Metal cannot abort GPU work, so the watchdog only tells. A wait that sees no submission complete for
DM_NVN_GPU_WATCHDOGseconds (5 by default, 0 off) while submissions are in flight logs one[RED] GPU watchdogline per stuck fence, naming the pipelines of the oldest submission in flight and the two after it, from a record of the distinct vertex/fragment pairs each submission drew and the compute shaders it dispatched. The line names what to pass toDM_NVN_SKIP_FSto play on without the looping draw.Found on Hyrule Warriors: Age of Imprisonment: the Mac froze in the first outpost mission while a special attack filled the screen, GPU at 100 % for minutes; two pixel shaders loop over a light list whose count comes from a texture. The game README section records the evidence. Host builds; C ratchet unchanged against main.
🤖 Generated with Claude Code