Repository navigation
Ocarina of Time's intermittent GPU hangs measured: 0.03-0.27 per 1,000 frames, against 5.00 in the run macOS stopped, lining up with mesh pipelines built while the game ran - #1756
Conversation
…0.27 per 1,000 frames over six runs, each recovering on its own, against 5.00 in the one run macOS stopped (GPU access revoked, 52 submissions ignored, launcher exit 70), which lines up with task and mesh pipelines built while the game ran, 47.5 against 6.7 per 1,000 frames and all 57 before the first hang; the failed command buffer is mesh-enriched (19 of 172 shaders against 520 of 42,851 in the profile) and holds the light-tile triple of the open remainder of PR seedds#1575 (correlation only: no same-scene buffer that did not hang was measured; memory ruled out) Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
An M2 Max data point for these hangs: the same task shader is in the failed buffer, and here the burst stopped the game twice, the second time about 10 minutes into play. Machine: MacBook Pro M2 Max (38-core GPU), macOS 26.6.2, Xcode 27.2 (Metal 32023.922). Profile
* I reverted All errors are Same task shader as yours. Task All 59 task/mesh pipeline builds of each run came before its first hang, and none after, the same pattern as your burst run. As in your run, the failed submission was Run 1 also changed the window size right before the hang ( Not tested yet: whether |
|
Base M1 data on the prediction that archiving mesh pipelines cuts the hang exposure (MacBook Pro M1, 16 GB, macOS 26.6.2; OoT v131072; local branch of open PRs on an older main). Measured: pipelines built by |
…, and the burst's correlation with pipelines built in game is a coincidence of the first minutes: with 56 served from a Metal 4 archive, none compiled in game and no frame over 1 s from a mesh build, a hang still came at frame 4,591, and the same before-the-first-hang pattern was reproduced on an M2 Max (measured by others in PR seedds#1756; ending the command buffer before each a5288d0a6c4971fd draw walked clean 4 of 4 times instead, issue seedds#1326). The runs are also marked as predating 04419bc, so they sat at the dynamic resolution's floor Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
My prediction in this PR is wrong, and the correlation it rested on is a coincidence. Thanks for measuring it. @ycarogabriel-lgtm tested the one testable claim I put in the description — that archiving the mesh pipelines would cut the hang exposure — and it does not hold. With 56 mesh pipelines served from a Metal 4 archive, none compiled in game, no draws dropped and no frame over 1 s from a mesh build, a hang still came at frame 4,591; an earlier session hung at 174 s after a single in-game build. One run each, but both point the same way, and the same conclusion was already on #1605: a freshly built pipeline is not the trigger. So the part of this PR that stands is the rate measurement and the revocation threshold. The part that does not is the inference I drew from it:
The fourth row is worth keeping on the record precisely because it reproduces. @T-Damer saw it on an M2 Max — all 59 task/mesh builds of each run before the first hang, none after — and I saw it on an M1 Max. Three machines, same pattern, and it is still not the cause. It looks like both the builds and the first hang simply cluster in the minutes when a scene is first entered. Anyone else matching that pattern should not read it as a lead; I did, and it cost a round of measurement. What does look causal is the task shader, not the pipeline lifecycle. Two corrections pushed to the branch, so the note in the repo does not carry the refuted claim:
Happy to rerun anything on the M1 Max (32 GB, macOS 27.0.1) on current main, including with the command-buffer split, if a particular measurement would help. 🤖 Generated with Claude Code |
shaders.md's mesh stage memory entry closes with "This does not fix the intermittent GPU hangs seen in buffers with these meshes; those are a separate open issue." This adds measurements of those hangs to Ocarina of Time's note: how often they come, what makes one of them stop the game, and what the burst lines up with.MacBook Pro M1 Max 32 GB, macOS 27.0.1 (26A434), chains
3ee52af3ca18and094f939bfef9, profile0400486024DEC000v131072, Kokiri Forest and the village floor, windowed.The rate, and the threshold
bd979ced3ee52af3ca18bd979ced, longer3ee52af3ca18DM_NVN_TBDR=13ee52af3ca18094f939bfef9094f939bfef9A hang on its own is survivable and the host recovers, as the reference says: five of six runs lost one to three command buffers and exited 0. The sixth took 6 hangs in about 1,200 frames, roughly twenty times the rate, and that crossed what macOS tolerates:
The host then did exactly what A GPU whose access macOS revoked stops the game prescribes. The 231 error lines are not a loop: 12 are the hangs themselves, 52 are submissions already in flight coming back
SubmissionsIgnoredwhile it wound down, and the repeatedframe 1469is the frame counter standing still because no GPU work runs any more. So the interesting number is not the exit but the hang rate: isolated hangs are invisible, a burst is fatal.What the burst lines up with
Task and mesh pipelines built while the game ran, against a clean run on the same build:
task / mesh pipeline:buildsAnd the failed command buffer is mesh-enriched. Of its 172 distinct shaders, resolved against the profile's
shader_map.tsv:Mesh and task are 11 % of the buffer against 1.3 % of the profile. Among them is the light-tile triple named in the mesh stage memory entry itself — task
a5288d0a6c4971fd, meshesd4171cf9adf0504bande8c667282ba7bd9b, fragmentea1bf96b72e72476:What this is not
Correlation only. A command buffer holds whatever the scene drew, so the stage counts are compared against the wrong baseline: the fair one is the mesh share of a command buffer from the same scene that did not hang, and I did not capture one. The blame ranking the host prints (
game shaders by failed/ran) does not discriminate either — after three failures the top entries are ordinaryNin_Ounce_NVN2model pixel shaders at 3/101 to 3/371, which is what a heavy outdoor buffer contains.Not a regression. The hangs are present on plain
mainwith none of my changes, at the same rate.Not memory. The clean run held 15,300 MB resident and 12,387 MB GPU-allocated with
headroom to the system memory limit nonefor 9,600 frames and survived; the burst run died at 13,974 MB.A testable prediction
Mesh pipelines are built with
newRenderPipelineStateWithMeshDescriptorand so bypass the pipeline archive (nvn_geometry.inc), which is #1583's point. If the correlation above is causal, archiving them would cut the hang exposure as well as the build cost — a prewarmed scene would not be building 47 pipelines per 1,000 frames while it draws. Untested; I am posting the measurements rather than the conclusion.🤖 Generated with Claude Code