Skip to content

Reference: a residency commit that does not return freezes the game, then the iPhone (Mario Kart World, open) - #2098

Open
oliverames wants to merge 2 commits into
seedds:mainfrom
oliverames:ref-residency-commit-freeze
Open

oliverames wants to merge 2 commits into
seedds:mainfrom
oliverames:ref-residency-commit-freeze

Conversation

@oliverames

@oliverames oliverames commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What and why

A finding with no fix yet, written up so the next person who sees it can find it in the symptom index.

On my iPhone Duo, Mario Kart World 1.8.0 froze 2 to 3 seconds into a race: the last frame stayed on screen, the overlay read 0 fps, the process stayed alive, and the log had no [RED] line and no GPU error. Every thread was waiting and none was spinning. Fifteen minutes later the phone restarted itself.

It happened a second time an hour later on the same build, at the title's demo with no button pressed, with the same thread state. Both came during a scene load, so it needs neither driving nor input.

What the game's own state dump and the phone's stack report show:

  • The replay thread was in the kernel inside [MTLResidencySet commit] (iokit_user_client_trap ← res_commit ← pool_res ← mtl_gpu_addr ← bind_vbufs ← draw_), and it never came back. pool_res runs with g_mu held by its caller, and res_commit holds g_res_mu across the call.
  • The GPU's completion queue was waiting for a mutex in post_complete, so no fence completed after that (main fence submitted 206262 / completed 206256) and everything that waits for a fence waited for good.
  • Ending the app didn't end the process. The system's stack report, 15 minutes after the freeze, still has it with one thread left (NVN queue replay) in an uninterruptible kernel wait with a read-write lock held, and a kernel thread blocked on it. The phone was at 7.2 GB wired and 34 MB free.

So the hang is on the kernel's side and the cause isn't known past that. It wasn't the GPU stopping (a fixed compute dispatch on its own queue kept completing every second) and it wasn't the game's own memory (4.2 GB of an 8.2 GB limit, the same as in the run before).

The PR adds the entry to docs/reference/rendering.md, next to the other residency commit entries, with what was ruled out, what the host could change (the game makes about five commits a frame in a race), and what to collect from the phone if it happens again. The game note links it under Open.

It may be related to the hangs that take WindowServer down on a Mac (#1326, #1605), but I haven't checked that and the entry doesn't claim it.

Checked

Docs

  • The finding is in its docs/reference/rendering.md entry and the game note, and python3 dm/tools/docs_symptoms.py was run.
  • A chain tool changed: dmsh_chain.py --header was run and dm/gfx/nvn/dmsh_chain.h is part of the change. Not applicable.
  • No game files, keys or data extracted from a game in the change or the attachments.

Updated 2026-11-10 with the second occurrence. On Nov 12 main 0c23e0b59 was merged in (head 5a78847e); only the game note's list conflicted.

…me on an iPhone, and the phone restarts some minutes later (Mario Kart World 1.8.0, iOS 27.3 beta); open

On an iPhone 19,4 the picture stopped 2 to 3 s into a race, 184 s after launch, with the overlay at 0 fps, the process alive, no [RED] line and no GPU error. Every thread waited and none spun. The state dump has the replay thread in iokit_user_client_trap under res_commit (pool_res, with g_mu held by its caller and g_res_mu across the call) and the GPU's completion queue waiting for a mutex in post_complete, with the main fence at submitted 206262 / completed 206256.

Ending the app did not end the process. The system's stack report 15 minutes later still has it with one thread, NVN queue replay, in an uninterruptible kernel wait with a read-write lock held and a kernel thread blocked on it, and the phone at 7.2 GB wired and 34 MB free. The phone then restarted itself.

It happened twice in four runs of one build (main 04811a6 with PRs seedds#1709, seedds#1695, seedds#1262, seedds#1599 and seedds#1713 merged): in that race, and an hour later at the title's demo with no button pressed, 353 s after launch, with the same thread state. Both came in a scene load (1,840 allocations added to the residency set in 678 commits in the 300 frames before the second). With main's 6f50de0 and 12a44e0 added, four races did not freeze, which is too few to say it is gone. The game makes about five residency commits a frame in a race. No fix: the entry says what was ruled out, what the host could change, and what to collect from the phone (SIGALRM for the host's dump, then systemCrashLogs). The game note links it under Open.
@oliverames
oliverames force-pushed the ref-residency-commit-freeze branch from 4b09e85 to 9539cb8 Compare November 10, 2026 13:01
Conflicts: dm/games/0400C3F00006E000/README.md (kept both sides' bullets).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation game: 0400C3F00006E000 A game profile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant