[Tester report] M5 Max 128 GB, Series X: the arm64 recompiled title boots, loads and encodes every draw, but nothing reaches the window #446

Closed
opened 2026-11-27 19:52:09 +00:00 by xarvel-temp · 7 comments
xarvel-temp commented 2026-11-27 19:52:09 +00:00 (Migrated from github.com)
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by xarvel-temp on 2026-11-27T19:52:09Z.


Mac

Apple M5 Max, 128 GB, macOS 27.2.1 (26B131). Metal Shader Converter 4.0.0 (the installed default), console=series-x (chosen automatically), no VICTORY_* variables set.

Commit

b998bb6

How far did it get?

Something visible on screen

What happened

A DirectStorage status entry never completes, and the title spins on it. This looks like the mechanism behind the "intermittent opening audio over a black picture" reports, and it happens here with 128 GB of RAM, which should rule out memory pressure as the cause.

The warning repeats 126 times, every 5,000 polls, on the same entry:

dstorage: a status entry is still pending index=0 polls=630000 staged=380091
  state=["lane 6: unsubmitted 0 held 0 reads 0 statuses 1 running 1 failures 0 capacity 4159"]

Lane 6 holds one status with running 1 and failures 0 for the rest of the run: nothing is unsubmitted or held, and nothing failed, so this reads as a lost completion rather than an I/O error or a queue that ran dry.

DirectStorage itself keeps working the whole time — 80 files opened, 3,390 to 4,444 requests per ~5.5 s window at 46.7 to 88.5 MB/s, staging_waits=0, busy_workers 0.20 to 0.46. So throughput is healthy and one request is stuck.

What that looks like from outside:

  • frame presented frame=2048 draws=30600 drawn=0 dispatches=1023 — 30,600 draws recorded, zero drawn. The window showed only artefacts, never the boot movie or the menus.
  • Audio was intermittent: the mixer ran for 299 s and the device never fell back to silence (spatial stream activations: 2), which fits streams that already hold data continuing while no new data arrives.
  • No GPU errors, no unhandled exception and no watchdog line. The run ended cleanly when stopped, last frame 2892.

Since run-native.sh presses Enter for you until 80 s, no input of mine was involved.

For comparison on the same machine and the same game files, the Wine route (ScarlettMac Runtime Preview, perf recipe) does reach the world and renders it at a median of 3.4 fps, so the game files themselves load and run.

Shader refusals

313 refusals in the run. Grouped by reason, over half are cross-lane or lane-mask cases:

Reason Count
a lane-mask join of an untracked mask (data) 24
barycentrics read directly 13
a cross-lane operation between host waves in divergent code 12
a lane-mask join of an untracked mask (a value the translation could not make) 11
a descriptor's address or format read as data (buffer base address) 5
a lane mask holding lanes elsewhere, written by a scalar instruction of the other width 5
a hardware SGPR input 5
fragment inputs mismatching mesh shader outputs 4
a descriptor's dword (format and type) read as data 3
ds_append or ds_consume in a console wave the host splits 3

One other warning, once: typed buffer view offset is not aligned for MTLTextureTypeTextureBuffer; falling back to raw buffer.

Log

The scrubbed log from tools/macos/tester-report.sh is attached as a comment below (216 KB gzipped). Happy to run further tests on this machine, including with extra switches, if that would help narrow the stuck lane down.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:6653531626 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/446). Originally posted by [xarvel-temp](https://github.com/xarvel-temp) on 2026-11-27T19:52:09Z. --- ### Mac Apple M5 Max, 128 GB, macOS 27.2.1 (26B131). Metal Shader Converter 4.0.0 (the installed default), `console=series-x` (chosen automatically), no `VICTORY_*` variables set. ### Commit `b998bb6` ### How far did it get? Something visible on screen ### What happened **A DirectStorage status entry never completes, and the title spins on it.** This looks like the mechanism behind the "intermittent opening audio over a black picture" reports, and it happens here with 128 GB of RAM, which should rule out memory pressure as the cause. The warning repeats 126 times, every 5,000 polls, on the same entry: ``` dstorage: a status entry is still pending index=0 polls=630000 staged=380091 state=["lane 6: unsubmitted 0 held 0 reads 0 statuses 1 running 1 failures 0 capacity 4159"] ``` Lane 6 holds one status with `running 1` and `failures 0` for the rest of the run: nothing is unsubmitted or held, and nothing failed, so this reads as a lost completion rather than an I/O error or a queue that ran dry. DirectStorage itself keeps working the whole time — 80 files opened, 3,390 to 4,444 requests per ~5.5 s window at 46.7 to 88.5 MB/s, `staging_waits=0`, `busy_workers` 0.20 to 0.46. So throughput is healthy and one request is stuck. What that looks like from outside: - `frame presented frame=2048 draws=30600 drawn=0 dispatches=1023` — 30,600 draws recorded, **zero drawn**. The window showed only artefacts, never the boot movie or the menus. - Audio was intermittent: the mixer ran for 299 s and the device never fell back to silence (`spatial stream activations: 2`), which fits streams that already hold data continuing while no new data arrives. - No GPU errors, no unhandled exception and no watchdog line. The run ended cleanly when stopped, last frame 2892. Since `run-native.sh` presses Enter for you until 80 s, no input of mine was involved. For comparison on the same machine and the same game files, the Wine route (ScarlettMac Runtime Preview, perf recipe) does reach the world and renders it at a median of 3.4 fps, so the game files themselves load and run. ### Shader refusals 313 refusals in the run. Grouped by reason, over half are cross-lane or lane-mask cases: | Reason | Count | | --- | ---: | | a lane-mask join of an untracked mask (data) | 24 | | barycentrics read directly | 13 | | a cross-lane operation between host waves in divergent code | 12 | | a lane-mask join of an untracked mask (a value the translation could not make) | 11 | | a descriptor's address or format read as data (buffer base address) | 5 | | a lane mask holding lanes elsewhere, written by a scalar instruction of the other width | 5 | | a hardware SGPR input | 5 | | fragment inputs mismatching mesh shader outputs | 4 | | a descriptor's dword (format and type) read as data | 3 | | `ds_append` or `ds_consume` in a console wave the host splits | 3 | One other warning, once: `typed buffer view offset is not aligned for MTLTextureTypeTextureBuffer; falling back to raw buffer`. ### Log The scrubbed log from `tools/macos/tester-report.sh` is attached as a comment below (216 KB gzipped). Happy to run further tests on this machine, including with extra switches, if that would help narrow the stuck lane down.
lautarocherro commented 2026-11-27 20:19:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by lautarocherro on 2026-11-27T20:19:05Z.


/claim

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7227385265 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/446#issuecomment-7227385265). Originally posted by [lautarocherro](https://github.com/lautarocherro) on 2026-11-27T20:19:05Z. --- /claim
github-actions[bot] commented 2026-11-27 20:19:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-27T20:19:16Z.


Claimed by @lautarocherro. Open a draft pull request with Refs #446 in its description within 24 hours, or the claim expires.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7227388117 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/446#issuecomment-7227388117). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-27T20:19:16Z. --- Claimed by @lautarocherro. Open a draft pull request with `Refs #446` in its description within 24 hours, or the claim expires.
xarvel-temp commented 2026-11-27 20:50:15 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by xarvel-temp on 2026-11-27T20:50:15Z.


Follow-up with a thread sample, which narrows this a long way, plus the same stall on an arm64 host.

It is not architecture-specific

I built the recompiled-title route from #115 (native/arm64-run, HEAD 4aae306): victory-recomp lift-split over the exe (440,157 functions, 440,156 lifted, 1 stubbed, 279 units) and over all 16 title DLLs, each image built as its own dylib with the documented flags, and victory built for aarch64-apple-darwin. That part works: the exe maps at its preferred base 0x140000000, every title DLL binds with missing=0 through victory_hle::title::arm64, the Metal backend comes up, shaders translate ahead on 8 threads, audio plays (WASAPI: render client released frames in the last second frames=47040), and frames advance to 1307 with pipelines binding.

And the identical DirectStorage stall appears, on the same status entry pattern: a status entry is still pending index=0 polls=7285000. So this is not Rosetta, not the x86-64 host path, and not the lifted code.

The sample: every worker is idle, so nothing is stuck in execute

sample on the running process, 3 s, 102 threads. All 18 dstorage workers are present and all 18 are in the same place:

Thread_...: dstorage 0
  thread_start -> _pthread_start -> std::sys::thread::unix::Thread::new::thread_start
    -> victory_hle::modules::dstorage::work + 232
      -> _pthread_cond_wait + 980
        -> __psynch_cvwait + 8

Not one worker is inside execute, read_into, inflate or bcpack::decode. In work() that stack means lanes.start() returned None and the worker is parked on scheduler.work.

So my first guess — a worker wedged in a decoder or a read — is wrong, and so is a dead worker: all 18 are alive.

The invariant that looks broken

With every worker parked, start() returning None means no lane has a queued read. But the state printed alongside the stall shows staged is not zero: across the warnings it reads 407,024 then 89,677, 134,670, 24,010, 80,257, 73,298, 70,143 and settles at 61,495 and 61,183 bytes, against a 32 MiB staging buffer.

self.staged is only raised in Lanes::start and only lowered in Lanes::finish. If every job that started has finished, it must be zero. A non-zero staged with no worker executing therefore says a job was started and never finished — which also leaves its seq in lane.running, and flush() gates on exactly self.running.first():

if waiting.into_iter().chain(self.running.first().copied()).any(|s| s < seq) { return; }

so the status behind it can never be written.

I could not find the path that loses a job: work() calls finish unconditionally after execute, there is no panic anywhere in the log (and work() has no catch_unwind), and finish only skips running.remove when self.lanes.get_mut(&job.lane) is None, i.e. the lane is gone. You know these invariants; what I can offer is that the inconsistency is real and reproducible.

Why it is unrecoverable rather than merely a lost read

flush() is driven only by finish() (and by submit_as, which does call it). Once a lane holds a running entry that will never complete and the title stops submitting to that lane, nothing will ever call flush() again, so the status stays pending for the rest of the process — here 7.28 million polls. Two cheap guards would make this a lost texture instead of a dead run: a catch_unwind around execute so a failure still reaches finish, and re-running flush() from the status poll path (or a per-lane watchdog) so a lane that has become eligible is written even with no further completions.

Context on the effect

On the x86-64 host the frame reports read draws=30600 drawn=0; on the arm64 host frame=1024 draws=3556 drawn=0 dispatches=513 dispatched=0. In both, draws are recorded and none are drawn, which fits the title waiting on a load that never completes.

Happy to run anything on this machine: it is an M5 Max with 128 GB, so memory pressure is not in play, and both host architectures reproduce it within a minute of reaching the world.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7227887485 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/446#issuecomment-7227887485). Originally posted by [xarvel-temp](https://github.com/xarvel-temp) on 2026-11-27T20:50:15Z. --- Follow-up with a thread sample, which narrows this a long way, plus the same stall on an **arm64** host. ### It is not architecture-specific I built the recompiled-title route from #115 (`native/arm64-run`, HEAD `4aae306`): `victory-recomp lift-split` over the exe (440,157 functions, 440,156 lifted, 1 stubbed, 279 units) and over all 16 title DLLs, each image built as its own dylib with the documented flags, and `victory` built for `aarch64-apple-darwin`. That part works: the exe maps at its preferred base `0x140000000`, every title DLL binds with `missing=0` through `victory_hle::title::arm64`, the Metal backend comes up, shaders translate ahead on 8 threads, audio plays (`WASAPI: render client released frames in the last second frames=47040`), and frames advance to 1307 with pipelines binding. **And the identical DirectStorage stall appears, on the same status entry pattern**: `a status entry is still pending index=0 polls=7285000`. So this is not Rosetta, not the x86-64 host path, and not the lifted code. ### The sample: every worker is idle, so nothing is stuck in `execute` `sample` on the running process, 3 s, 102 threads. All **18** `dstorage` workers are present and **all 18 are in the same place**: ``` Thread_...: dstorage 0 thread_start -> _pthread_start -> std::sys::thread::unix::Thread::new::thread_start -> victory_hle::modules::dstorage::work + 232 -> _pthread_cond_wait + 980 -> __psynch_cvwait + 8 ``` Not one worker is inside `execute`, `read_into`, `inflate` or `bcpack::decode`. In `work()` that stack means `lanes.start()` returned `None` and the worker is parked on `scheduler.work`. So my first guess — a worker wedged in a decoder or a read — is wrong, and so is a dead worker: all 18 are alive. ### The invariant that looks broken With every worker parked, `start()` returning `None` means no lane has a queued read. But the state printed alongside the stall shows **`staged` is not zero**: across the warnings it reads 407,024 then 89,677, 134,670, 24,010, 80,257, 73,298, 70,143 and settles at 61,495 and 61,183 bytes, against a 32 MiB staging buffer. `self.staged` is only raised in `Lanes::start` and only lowered in `Lanes::finish`. If every job that started has finished, it must be zero. A non-zero `staged` with no worker executing therefore says a job was started and never finished — which also leaves its `seq` in `lane.running`, and `flush()` gates on exactly `self.running.first()`: ```rust if waiting.into_iter().chain(self.running.first().copied()).any(|s| s < seq) { return; } ``` so the status behind it can never be written. I could not find the path that loses a job: `work()` calls `finish` unconditionally after `execute`, there is no panic anywhere in the log (and `work()` has no `catch_unwind`), and `finish` only skips `running.remove` when `self.lanes.get_mut(&job.lane)` is `None`, i.e. the lane is gone. You know these invariants; what I can offer is that the inconsistency is real and reproducible. ### Why it is unrecoverable rather than merely a lost read `flush()` is driven only by `finish()` (and by `submit_as`, which does call it). Once a lane holds a `running` entry that will never complete and the title stops submitting to that lane, nothing will ever call `flush()` again, so the status stays pending for the rest of the process — here 7.28 million polls. Two cheap guards would make this a lost texture instead of a dead run: a `catch_unwind` around `execute` so a failure still reaches `finish`, and re-running `flush()` from the status poll path (or a per-lane watchdog) so a lane that has become eligible is written even with no further completions. ### Context on the effect On the x86-64 host the frame reports read `draws=30600 drawn=0`; on the arm64 host `frame=1024 draws=3556 drawn=0 dispatches=513 dispatched=0`. In both, draws are recorded and none are drawn, which fits the title waiting on a load that never completes. Happy to run anything on this machine: it is an M5 Max with 128 GB, so memory pressure is not in play, and both host architectures reproduce it within a minute of reaching the world.
xarvel-temp commented 2026-11-27 20:58:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by xarvel-temp on 2026-11-27T20:58:16Z.


One more datum that I think closes this, and it corrects my previous comment: there is no leaked job. The lane goes completely idle with the status still pending.

I added a temporary watchdog to scheduler() that walks the lanes every two seconds, and separately sampled the still pending warnings across a run. Printed every 40th warning, staged and the lane's running count:

polls 5000        staged 200426   running 10
polls 205000      staged 692814   running 18
polls 1005000     staged 756045   running 18
polls 1405000     staged 160912   running 3
polls 1605000     staged 0        running 0     <-- lane idle, status still pending
polls 1805000     staged 42470    running 1
polls 2005000     staged 3269481  running 1
polls 2605000     staged 5630     running 2

running simply tracks load between 0 and 18, and staged returns to 0, so my earlier reading of a non-zero staged as a lost job was wrong — I was sampling a busy moment.

The line that matters is staged 0 running 0. At that point the lane's state was reads 0 statuses 1 running 0 with no staging held, so in

if waiting.into_iter().chain(self.running.first().copied()).any(|s| s < seq) { return; }

there was nothing below the status's sequence number: the gate was open. The status was eligible and was not written.

That leaves one explanation: nothing called flush() at that moment. Its only drivers are Lanes::finish and Lanes::submit_as, and both are absent exactly in this state — the lane has no running job left to finish, and the title has not submitted to it again. A status entry that becomes eligible while a lane falls quiet is therefore never written, and because the title then polls it forever (7.28 M polls in the earlier run, 3.45 M here), the run is over.

This also explains why it survives every environment change: it is a scheduling-order bug, not an I/O, decoder, memory-pressure or architecture problem. It reproduces identically on the x86-64 host and on the arm64 recompiled-title host from #115, on a 128 GB Mac with swap untouched.

A fix would be to give flush() a third driver — running it from the status poll path, or from a small per-lane watchdog — so that a lane which has become eligible is written even when no completion or submission follows.

Caveat on my own instrumentation: the watchdog I added also force-runs flush() for every lane when it reports, and it produced no output during the run even though statuses was non-empty throughout, so I cannot claim to have verified that a forced flush releases the entry. The evidence above is from the project's own log_pending warnings, which I did not change. The patch is a local diagnostic only and I am not proposing it as-is; if you would like it cleaned up behind the existing VICTORY_DSTORAGE_LOG variable instead, say so and I will send it.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7228010268 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/446#issuecomment-7228010268). Originally posted by [xarvel-temp](https://github.com/xarvel-temp) on 2026-11-27T20:58:16Z. --- One more datum that I think closes this, and it corrects my previous comment: **there is no leaked job. The lane goes completely idle with the status still pending.** I added a temporary watchdog to `scheduler()` that walks the lanes every two seconds, and separately sampled the `still pending` warnings across a run. Printed every 40th warning, `staged` and the lane's `running` count: ``` polls 5000 staged 200426 running 10 polls 205000 staged 692814 running 18 polls 1005000 staged 756045 running 18 polls 1405000 staged 160912 running 3 polls 1605000 staged 0 running 0 <-- lane idle, status still pending polls 1805000 staged 42470 running 1 polls 2005000 staged 3269481 running 1 polls 2605000 staged 5630 running 2 ``` `running` simply tracks load between 0 and 18, and `staged` returns to 0, so my earlier reading of a non-zero `staged` as a lost job was wrong — I was sampling a busy moment. **The line that matters is `staged 0 running 0`.** At that point the lane's state was `reads 0 statuses 1 running 0` with no staging held, so in ```rust if waiting.into_iter().chain(self.running.first().copied()).any(|s| s < seq) { return; } ``` there was nothing below the status's sequence number: the gate was open. The status was eligible and was not written. That leaves one explanation: **nothing called `flush()` at that moment.** Its only drivers are `Lanes::finish` and `Lanes::submit_as`, and both are absent exactly in this state — the lane has no running job left to finish, and the title has not submitted to it again. A status entry that becomes eligible while a lane falls quiet is therefore never written, and because the title then polls it forever (7.28 M polls in the earlier run, 3.45 M here), the run is over. This also explains why it survives every environment change: it is a scheduling-order bug, not an I/O, decoder, memory-pressure or architecture problem. It reproduces identically on the x86-64 host and on the arm64 recompiled-title host from #115, on a 128 GB Mac with swap untouched. A fix would be to give `flush()` a third driver — running it from the status poll path, or from a small per-lane watchdog — so that a lane which has become eligible is written even when no completion or submission follows. Caveat on my own instrumentation: the watchdog I added also force-runs `flush()` for every lane when it reports, and it produced **no** output during the run even though `statuses` was non-empty throughout, so I cannot claim to have verified that a forced flush releases the entry. The evidence above is from the project's own `log_pending` warnings, which I did not change. The patch is a local diagnostic only and I am not proposing it as-is; if you would like it cleaned up behind the existing `VICTORY_DSTORAGE_LOG` variable instead, say so and I will send it.
xarvel-temp commented 2026-11-27 21:04:40 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by xarvel-temp on 2026-11-27T21:04:40Z.


Please disregard my diagnosis above: I misread the diagnostic, and there is no DirectStorage hang here. Sorry for the noise.

is_complete counts with a single process-wide static:

static POLLS: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(0);
let n = POLLS.fetch_add(1, Ordering::Relaxed) + 1;
if n.is_multiple_of(5000) { log_pending(this, index, n); }

So polls=7285000 is not one entry polled 7.28 M times. It is the total number of pending polls in the process since start, across every entry. With the title polling in a Sleep(1) loop, a few hundred thousand a minute is simply what loading looks like. I read it as a per-entry wait, and everything I built on top of that was wrong.

What settled it: I added the entry's own location to log_pending, which prints whether any lane holds the exact (array, index) being polled. Over one run:

entry_is="lane 16: queued at seq 4203"
entry_is="lane 16: queued at seq 5101"
entry_is="lane 16: queued at seq 8575"
entry_is="lane 16: queued at seq 8721"
entry_is="lane 16: queued at seq 8754"

Same array, same index=0, different sequence numbers. The entries are being written and the title is queuing new ones; the queue is making progress, not stuck. Lane 16 shows reads 2 running 2 at those moments, i.e. ordinary in-flight work below the entry's sequence number, which is exactly when flush is supposed to wait.

Corrections to my two earlier comments:

  • The staged 0 running 0 sample I treated as "the gate is open but nobody flushes" was a snapshot of a different lane: log_pending prints every lane with entries() > 0, not the one that owns the polled entry. With the entry's location printed, it is always on a lane that does have work below it.
  • There is no leaked job and no lost finish; running and staged just track load.
  • I also tried two speculative changes, and neither fired, which is consistent with nothing being wedged: flushing every lane from the poll path, and writing pending status entries in close_lane instead of clearing them. The second may still be worth having as a defensive measure — a queue closed with entries pending would leave a poller waiting — but it never triggered here, so I have no evidence it happens in practice and I am not proposing it on this issue.

The real open item from my report stands, and it is the one in the title's second half: frame=2048 draws=9522 drawn=0 dispatches=1616 dispatched=0 on the arm64 host, with native draws so far frame=2048 recorded=13470 encoded=13470 no_pipeline=0 no_texture=0. Draws are recorded and encoded with no pipeline or texture misses, and the queue still reports none drawn, and nothing reaches the window. That is where I should have been looking, and I will open a separate issue for it rather than leave it mixed in with a wrong diagnosis here.

One small thing that would have saved me several hours, if you think it is worth a line: either make that counter per entry, or reword the comment, since "a request polled this long is stuck" reads as a per-request count.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7228111070 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/446#issuecomment-7228111070). Originally posted by [xarvel-temp](https://github.com/xarvel-temp) on 2026-11-27T21:04:40Z. --- **Please disregard my diagnosis above: I misread the diagnostic, and there is no DirectStorage hang here. Sorry for the noise.** `is_complete` counts with a single process-wide static: ```rust static POLLS: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(0); let n = POLLS.fetch_add(1, Ordering::Relaxed) + 1; if n.is_multiple_of(5000) { log_pending(this, index, n); } ``` So `polls=7285000` is not one entry polled 7.28 M times. It is the total number of pending polls in the process since start, across every entry. With the title polling in a `Sleep(1)` loop, a few hundred thousand a minute is simply what loading looks like. I read it as a per-entry wait, and everything I built on top of that was wrong. What settled it: I added the entry's own location to `log_pending`, which prints whether any lane holds the exact `(array, index)` being polled. Over one run: ``` entry_is="lane 16: queued at seq 4203" entry_is="lane 16: queued at seq 5101" entry_is="lane 16: queued at seq 8575" entry_is="lane 16: queued at seq 8721" entry_is="lane 16: queued at seq 8754" ``` Same array, same `index=0`, **different sequence numbers**. The entries are being written and the title is queuing new ones; the queue is making progress, not stuck. Lane 16 shows `reads 2 running 2` at those moments, i.e. ordinary in-flight work below the entry's sequence number, which is exactly when `flush` is supposed to wait. Corrections to my two earlier comments: - The `staged 0 running 0` sample I treated as "the gate is open but nobody flushes" was a snapshot of a *different* lane: `log_pending` prints every lane with `entries() > 0`, not the one that owns the polled entry. With the entry's location printed, it is always on a lane that does have work below it. - There is no leaked job and no lost `finish`; `running` and `staged` just track load. - I also tried two speculative changes, and **neither fired**, which is consistent with nothing being wedged: flushing every lane from the poll path, and writing pending status entries in `close_lane` instead of clearing them. The second may still be worth having as a defensive measure — a queue closed with entries pending would leave a poller waiting — but it never triggered here, so I have no evidence it happens in practice and I am not proposing it on this issue. The real open item from my report stands, and it is the one in the title's second half: **`frame=2048 draws=9522 drawn=0 dispatches=1616 dispatched=0`** on the arm64 host, with `native draws so far frame=2048 recorded=13470 encoded=13470 no_pipeline=0 no_texture=0`. Draws are recorded and encoded with no pipeline or texture misses, and the queue still reports none drawn, and nothing reaches the window. That is where I should have been looking, and I will open a separate issue for it rather than leave it mixed in with a wrong diagnosis here. One small thing that would have saved me several hours, if you think it is worth a line: either make that counter per entry, or reword the comment, since "a request polled this long is stuck" reads as a per-request count.
xarvel-temp commented 2026-11-27 21:05:33 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by xarvel-temp on 2026-11-27T21:05:33Z.


Retracting the other half of my original report as well, and I have retitled the issue accordingly.

drawn and dispatched in the frame presented line are not counters on this host:

#[cfg(windows)]
let (drawn, dispatched) = { /* real counters via crate::draw::drawn() */ };
#[cfg(not(windows))]
let (drawn, dispatched) = (0, 0);

So draws=9522 drawn=0 on macOS is a placeholder, not a symptom, and my original title ("30,600 draws, 0 drawn") asserted something that cannot happen otherwise. The native path's own accounting is the line that means something, and it is clean:

native draws so far frame=2048 recorded=13470 encoded=13470 no_pipeline=0 no_texture=0
  mesh=0 mesh_indirect=0 indirect=0 texture_copies=0

Everything recorded is encoded, with no pipeline or texture misses.

So, stripped of my two misreadings, what this report actually contains is a positive result plus one open observation:

Positive, and the part I think is worth keeping: the recompiled-title route from #115 works end to end on an M5 Max with 128 GB. victory-recomp lift-split over the exe gives 440,157 functions with 440,156 lifted and 1 stubbed in 279 units (1.6 GB of C, about 25 minutes to compile at -O2 on 18 cores), all 16 title DLLs lift and build, victory builds for aarch64-apple-darwin without changes, the exe maps at its preferred base 0x140000000, every image binds with missing=0, Metal comes up, shaders translate ahead on 8 threads, DirectStorage reads at 46–89 MB/s, audio runs steadily (46,000–47,000 frames a second through CoreAudio, never falling back to silence), and frames advance past 2,000 with pipelines binding and every draw encoded. No GPU errors, no watchdog line, no unhandled exception.

Open: with all of that, the window does not show the game — on the earlier x86-64 host run it showed artefacts over intermittent audio, and on the arm64 runs nothing recognisable. Given the project already tracks a dark and broken world (#15, #258), this may be nothing new, in which case feel free to close this: a second data point on 128 GB with the arm64 route is all it is.

Happy to run anything specific. The machine reproduces in about a minute, both host architectures are built and ready, and memory pressure is not a factor at 128 GB.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7228125133 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/446#issuecomment-7228125133). Originally posted by [xarvel-temp](https://github.com/xarvel-temp) on 2026-11-27T21:05:33Z. --- Retracting the other half of my original report as well, and I have retitled the issue accordingly. `drawn` and `dispatched` in the `frame presented` line are not counters on this host: ```rust #[cfg(windows)] let (drawn, dispatched) = { /* real counters via crate::draw::drawn() */ }; #[cfg(not(windows))] let (drawn, dispatched) = (0, 0); ``` So `draws=9522 drawn=0` on macOS is a placeholder, not a symptom, and my original title ("30,600 draws, 0 drawn") asserted something that cannot happen otherwise. The native path's own accounting is the line that means something, and it is clean: ``` native draws so far frame=2048 recorded=13470 encoded=13470 no_pipeline=0 no_texture=0 mesh=0 mesh_indirect=0 indirect=0 texture_copies=0 ``` Everything recorded is encoded, with no pipeline or texture misses. So, stripped of my two misreadings, what this report actually contains is a **positive** result plus one open observation: **Positive, and the part I think is worth keeping:** the recompiled-title route from #115 works end to end on an M5 Max with 128 GB. `victory-recomp lift-split` over the exe gives 440,157 functions with 440,156 lifted and 1 stubbed in 279 units (1.6 GB of C, about 25 minutes to compile at `-O2` on 18 cores), all 16 title DLLs lift and build, `victory` builds for `aarch64-apple-darwin` without changes, the exe maps at its preferred base `0x140000000`, every image binds with `missing=0`, Metal comes up, shaders translate ahead on 8 threads, DirectStorage reads at 46–89 MB/s, audio runs steadily (46,000–47,000 frames a second through CoreAudio, never falling back to silence), and frames advance past 2,000 with pipelines binding and every draw encoded. No GPU errors, no watchdog line, no unhandled exception. **Open:** with all of that, the window does not show the game — on the earlier x86-64 host run it showed artefacts over intermittent audio, and on the arm64 runs nothing recognisable. Given the project already tracks a dark and broken world (#15, #258), this may be nothing new, in which case feel free to close this: a second data point on 128 GB with the arm64 route is all it is. Happy to run anything specific. The machine reproduces in about a minute, both host architectures are built and ready, and memory pressure is not a factor at 128 GB.
LakshanSivakumar commented 2026-11-28 00:36:42 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-28T00:36:42Z.


Thanks for coming back and correcting this. Since both claims are withdrawn I am closing it. If you get new numbers, please open a fresh report.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7231049861 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/446#issuecomment-7231049861). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-28T00:36:42Z. --- Thanks for coming back and correcting this. Since both claims are withdrawn I am closing it. If you get new numbers, please open a fresh report.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
LakshanSivakumar/Native-Victory-macOS#446
No description provided.