fix(host): the vsync ticker starts once; a full table or a failed ticker or audio start answers 0x2C01 #2151
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2151
Loading…
Reference in a new issue
No description provided.
Delete branch "dazemc/Longshot:fix/vsync-ticker-lock"
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?
Summary
nn::vi::GetDisplayVsyncEventregisters the caller's event in a table of 8 undervsync_lock, but starts the ticker outside the lock:Two guest threads can both see
vsync_thread == NULLand each start a ticker. Every ticker runshos_system_event_signalover the table once per period, so an auto-cleared vsync event fires twice per 16.7 ms and a waiter paced on it runs at double rate. On LinuxCreateThreadispthread_createwith a detached thread, and it returns after the thread may already have run — the window is real, not theoretical.Separately, with 8 events registered the
ifis false, the call returns 0, and the 9th event is never in the table: its waiter blocks forever.What changed (
host/nn_vi.c): the registration and the ticker start are one section undervsync_lock; a full table returns Horizon'sos::ResultOutOfResource(0x2C01, the code the host already uses for a full TLS slot table) and logs one line, instead of a silent success. ACreateThreadthat returns NULL — the thread limit, or no memory — is the same failure by another path: the slot is taken back out of the display's table, the call returns0x2C01, and no event is left in that table with no ticker to signal it. A later call tries the ticker again. The ticker logs its start once (vi: the vsync ticker started), so a game run's log shows it.host/nn_audio.c'sOpenAudioRendererhas the same shape: it initializes the caller's auto-cleared renderer event and starts the audio thread. A NULLCreateThreadnow clearsrenderer_event, the handle andrenderer_running, returns0x2C01, logs it and leavesrenderer_threadNULL so a later call retries; the host holds no renderer event after that, so nothing waits on one nothing signals.One wording limit both paths share:
hos_system_event_initruns before the failure check, so the object-table entry it makes for the guest's event stays inhost/nn_os_sync.c's table, unsignalled. It is not a leak —fresh()finds that key and reinitialises it, so repeated failures add no entries — and a caller that checks its Result never waits on it; only one that ignores the Result blocks, exactly as## Riskssays.Rebase status (2026-11-25, current):
f7af4e26f→d1b245a45ontomain @ 8f7300756701b7c9a278e576bb075ac20e622a32. Stable patch-id4ad9a3c3c4b5d5145ac28abf313cbcdc001312dais unchanged and main's old-base→new-main file intersection with this PR is empty. The evidence already named below (suite, platform, in-game and measurement, as applicable) therefore still stands at the historical heads that produced it. Earlier rebase notes are history; where they say "this head", they mean the evidence commit named beside that run, notd1b245a45.Testing
Rebase (2026-11-25). Rebased onto
origin/mainbe663a08a30fa953420104d3cef6877bed6674a2. Old head437d8eab42f0bb47b67b76ee8d3d01182b1e526c→ new headf7af4e26fc4aaedc439e292b7c87d5216f814cc3.git diff -U0 8aa5ab87..437d8eabandgit diff -U0 be663a08a3..f7af4e26hold the identical changed-line set (379 added/removed lines, 0 differing), so the rebase changed none of this PR's content. Main's new commits do touchhost/nn_vi.c(30 insertions, 13 deletions, in #2286 and #2411), so the suite and the game runs below were taken on the pre-rebase head and do not describe the compiled result at this head. Themise run testbox is unticked pending a suite atf7af4e26fcafter the quiet window; the in-game and Windows runs were at75a2aafd/437d8eaband are kept as the record of that head.The head moved twice without a code change, and the bullets below name the tree each result was taken on. The head is now
f7af4e26fc, which is75a2aafd(treefe2b05c6) plus one comment-only commit:git diff --stat 75a2aafd..437d8eab4is2 files changed, 6 insertions(+), 2 deletions(-), every changed line inside a C comment inhost/nn_vi.candhost/nn_audio.c, so there is no code difference between the head and treefe2b05c6.fe2b05c6is in turn not5db210a3's0b31884e(git diff --shortstat 5db210a3 75a2aafdis243 files changed, 19144 insertions(+), 6305 deletions(-)), so the suite and fixture bullets describe tree0b31884e, not the head, except the windowed run at75a2aafdbelow. The commit subject still sayswaiterand will be reworded at the rebase; the title now names the Result the failure paths answer.At
75a2aafd(treefe2b05c6, the code this head still carries): a windowed in-game run, queue job2151-windowed-75a2aafd-b(ticket176700,--mode shared), 2026-11-24T15:44:41Z–15:46:00Z:state: finished,exit_code: 0,stop_method: quit; log line 30vi: the vsync ticker started, line 163audio: renderer opened, nocould not startand novk: no window; 42.2 s of measured play (presents 1587 → 4719,(4719 - 1587 - 600) / 60) fromkokiri-start;hyprctl clients -jand an externalgrimshot taken during play. Run folder~/.local/share/longshot-dev/runs/control/2151-windowed-75a2aafd-20261124-b/.Tested: at the tree at
b567e2cf(5db210a3); the full suite was taken on basea2dc5385:run_all --strict test_vsync_events test_audio_renderer_start: 2 passed, 0 failed, 0 skipped (0.3 s and 0.1 s; a passing check does not print the fixture's own lines).fix/posix-renderer-thread(a separate branch, no PR yet): PASS —a renderer thread that cannot start: reported failure, event sets 0, attempts 1.origin/main'shost/nn_audio.c: fails onmainfor the reason —FAIL:56 result == 0x2C01, witha renderer thread that cannot start: result 0, handle 0x1, event 0x5000, thread (nil), attempts 1:mainreturns 0 and leaves the event registered.b567e2cf(5db210a3), taken on basea2dc5385: 913 passed / 23 failed / 18 skipped in 815 s (the job's full output is saved at/home/daze/.local/share/longshot-dev/2151-light-job-5db210a3.log),run_all.py --strict --jobs 5insidesystemd-run --user --scope -p MemoryMax=12G -p MemorySwapMax=0with the pinned headers. The base's 911 / 23 / 18 in 635 s is from the 02:58 comment and has no saved log. The 23 failures were compared name by name witha2dc5385's at the time; they are not currentmain's failures:fe1c437c(#2213) fixed 17 of them and says main is back to one (tests/test_dev_packs), and main adds five new checks. The strict suite will be re-run on the rebased head. The two extra passes over the base's 911 are the newtests/test_vsync_events.pyandtests/test_audio_renderer_start.py.b567e2cf(5db210a3): queue job2151-smoke-gpu(gpumode, alone), Linux on this PC, RTX 4070 Ti, NVIDIA 620.70.06, headless, from the repository'skokiri-startsave: title to play after 8 A presses, 30 s of play, screenshot at frame 3515, thenquit— run statefinished, exit code 0,stop_method: quit. The log's line 224 isvi: the vsync ticker startedand line 279 isaudio: renderer opened; there is nocould not startline and no startup hang. (The first attempt, insharedmode, was OOM-killed during first-start shader preparation with another game beside it; this run prepared them and finished.) Run folder:/home/daze/.local/share/longshot-dev/runs/control/2151-smoke-20261122-012558/.The fixture lines the new checks assert (the branch run is above; the audio fixture's line is printed only on a failure):
The block below is a manual run of the C fixture (
tests/vsync_events_test.c) againstmain'shost/nn_vi.c, not the committed Python test's output: onmain,tests/test_vsync_events.pystops at the source check (tests/test_vsync_events.py:64; main starts the ticker athost/nn_vi.c:95, after the release at 93) before it builds the fixture.The checks that cut/read
host/nn_vi.c(test_realtime_rate,test_water_substeps,test_camera_speed,test_fps_stats,test_movie_frame_count,test_scene_format) all passed in that suite run.Tested on Windows (llvm-mingw). At
75a2aafdon a Windows 11 x86-64 box (Acer Nitro AN515-57, i5-11400H, llvm-mingw 20261104 UCRT),nx2\build.py --standalonewithRX_VK_ONLY=1compiled 268 renderer objects of this head and linked them:compiled in 183 s, 0 failed, link 2 s, 6 jobs,lifted code … (0 files)in the log, so no game data was read. Result:C:\Users\daze\longshot-2151\work\sa\build\longshot_vk.dll, 17,704,960 bytes, sha256ea8a7bdbcc05ae80ec24e151cbe2cd21856381a34e1ed1779e05d6c3e1e38d85, PE32+ (0x20B)IMAGE_FILE_MACHINE_AMD64/IMAGE_SUBSYSTEM_WINDOWS_GUI, exportingmkwvk_init,mkwvk_close_asked,mkwvk_crash_closeandmkwvk_crash_page;llvm-stringsfinds75a2aafd (source d2850c1d)in it. The checkout'sgit rev-parse HEADwas75a2aafd8f314419de670e764aa2bcfee0669e5b(.headbeside the log); build logbuild-75a2aafd.log, sha256da665ea0a40ab06d558c8fe908be5d48b8bab0bcb9ff052d8060ea312c37bc02. The two files this PR changes compile as well:host/nn_vi.c→host_nn_vi.obj, 32,415 bytes, sha2562e3fb8d4f89fe572cf38b3af31df1f06c6c6cb1a5548fb1ff99889b950c44b75, andhost/nn_audio.c→host_nn_audio.obj, 170,534 bytes, sha2569710732a4442412873d3645a35afc7321096b25210814bb287b0642230134da6, both COFF machine0x8664, withnx2/build.py's own host flags. That was the renderer DLL link, not the single-object compile the earlier tree had; the whole pack then ran at this head on the same box, windowed:longshot.exe577,531,904 bytes, sha25624ab4560031f2437c57f0db494cc0487181f5f00ad7552517f2d646bdecf0d3b, on the NVIDIA GeForce GTX 1650, driver610.62; the LOW MEMORY dialog was dismissed withWM_CLOSEbefore play. The game window was pid 9556, handle1574064, titleLongshot, rect128,128,1422,886(1294x758),visible=Trueat the in-play, mid-play and end-play checks; play ran from frame 3017 at 29.3 fps to frame 5121 at 33.4 fps, both samples inKokiriForest_Child, 2,104 frames over 64 s of wall time, thenexit_code 0/stop exit, with 0vk: no windowand 0could not startlines. Logruns\win-2151\log.txt(692,237 bytes, sha2563b938ade1f3ab5ed4481f868711e39683ff9e53369b00a0afa2771e0c17ca093) and smoke logsmoke-75a2aafd.log(25,603 bytes, sha2560f6f100b2f13018624b6870660b3091af47137c0c97319c0b6d5a8cd217f5bb4); the screenshots and the game data stayed on that box, since nothing left it.Still to test:
Measurements
Nothing to measure: this fixes a race and a dropped registration, not a frame path; the game run above is a boot/play check of the changed startup path, not a frame measurement.
Risks
A full vsync table, a ticker that cannot start, or an audio renderer that cannot start now reports
0x2C01instead of 0 — a caller that ignores the Result still blocks on its unsignalled event, but the failure is visible in the result and the log, and the failed start takes the display's slot back out ofvsync_eventsor clears the renderer's handle,renderer_eventandrenderer_running. One detail this leaves in place:hos_system_event_initruns before that check, so the object-table entry it made remains inhost/nn_os_sync.c's table, unsignalled;fresh()reuses that key, so repeated failures add nothing. A later call can try again. One ticker instead of two changes only the double-signalling case. No switch; a revert is enough.Checklist
Ready for review
main; the title is a Conventional Commit. — Rebased headd1b245a45is directly onmain @ 8f7300756701b7c9a278e576bb075ac20e622a32; the preserved diff is the single topic described in Summary.2151-windowed-75a2aafd-b(ticket176700,--mode shared), run folder/home/daze/.local/share/longshot-dev/runs/control/2151-windowed-75a2aafd-20261124-b/, 2026-11-24T15:44:41Z–15:46:00Z.state: finished,exit_code: 0,stop_method: quit; log line 2 islongshot v3.2.0-14-g75a2aafd8 (source d2850c1d). Title to play after 5 A presses, 10 s warm-up, then the scripted play inKokiriForest_Child(child, life 12/12):shots/play-start.pngat present 1587 andshots/play-end.pngat present 4719, so 42.2 s of measured play ((4719 - 1587 - 600) / 60); the status lines read frame 1582 → 4727, fps 50.3 → 59.1. It is windowed, not headless: ahyprctl clients -jcaptured during play (saved ashypr-clients-play.jsonin the run folder) has the game's own window{"class": "dev.magicbean.Longshot", "title": "Longshot", "pid": 176708, "at": [966, 562], "size": [948, 512], "mapped": true, "visible": true, "workspace": {"id": 2, "name": "2"}, "fullscreen": 0, "xwayland": false}(Hyprland's logical size at scale 2; the game reports its window1896x1024and a 2560x1440 game picture), and an externalgrimshot of the desktop during play isexternal-play-1.png(3840x2160). The log has novk: no windowline (0 matches) and nocould not startline; line 30 isvi: the vsync ticker startedand line 163 isaudio: renderer opened, with no startup hang. The earlier run at tree0b31884eis superseded for this box by this one at the head.**mise run testpasses (any failure that also fails onmainis named). Suite atf7af4e26fc4aaedc439e292b7c87d5216f814cc3: 835 passed, 2 failed, 8 skipped in 489 s (linux, 5 at once), exit 1; logprrefresh-logs/suite-2151-f7af4e26.log, sha256ddd0f0a08f6dd411dca14a66e46f5802d989ba5f3a631ed0d669955217f6b9e8,.head= that sha. Passes against Amendment 1's CORE ∪ FLAKY plus the base failures of Amendment 2 — CORE/FLAKY: none; base-exempt:tests/test_display_startup_failure.py,tests/test_title_card_strips.py; same 8 skips. base failuretests/test_display_startup_failure.pyexempt: fails identically at the merge-basebe663a08a—display_startup_actual.inc:82:5: error: use of undeclared identifier 'bc_claim'; reproductionprrefresh-logs/base-be663a08a-two-ids.log, sha256a26e89fa21110e64aa11987f7acae1a9d166b3c6e1877e8335aa3c9b0b9ac257. base failuretests/test_title_card_strips.pyexempt: fails identically at the merge-basebe663a08a—ModuleNotFoundError: No module named 'oot_patches'; same reproduction, same sha256. The head predates the main-green fix: its merge-base withbe663a08aand with currentmain7eb53d1a0isbe663a08a, the fix (#2539) is not merged, and7eb53d1a0itself still fails both ids (prrefresh-logs/base-7eb53d1a0-two-ids.log, sha25664e995f08b1ac29ec5d69c0e9f31721eacd1491e89b1a975ea3448b9095390b3), so the exemption is legitimate here and would not be once a head is rebased past #2539.main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here. Both new checks are game-free. Onmain,tests/test_vsync_events.pyfails at its source check,tests/test_vsync_events.py:64(main starts the ticker athost/nn_vi.c:95, after the release at 93), and the audio fixture fails attests/audio_renderer_start_test.c:56,FAIL:56 result == 0x2C01(main returns 0 and leaves event0x5000registered). Both pass at this head's tree.tests/that reads changed source is new and does not weaken an existing check.75a2aafd, not a compile only.nx2\build.py --standalonewithRX_VK_ONLY=1compiled 268 renderer objects and linkedlongshot_vk.dll(compiled in 183 s, 0 failed, link 2 s) from a checkout whosegit rev-parse HEADis75a2aafd8f31…:C:\Users\daze\longshot-2151\work\sa\build\longshot_vk.dll, 17,704,960 bytes, sha256ea8a7bdbcc05ae80ec24e151cbe2cd21856381a34e1ed1779e05d6c3e1e38d85, PE32+IMAGE_FILE_MACHINE_AMD64/IMAGE_SUBSYSTEM_WINDOWS_GUI, exportsmkwvk_init,mkwvk_close_asked,mkwvk_crash_close,mkwvk_crash_page, and the DLL carries75a2aafd (source d2850c1d). The two changed files compile too:host/nn_vi.c→ 32,415-byte andhost/nn_audio.c→ 170,534-byte COFF objects (machine0x8664, sha2562e3fb8d4…and9710732a…). Linux: as above, the pack overa2dc5385compiled both files and linkedlongshot(618,087,944 bytes) in 23 s. Run:longshot.exewith the whole pack on Windows at this head, windowed on the NVIDIA GeForce GTX 1650 (driver610.62) after the LOW MEMORY dialog was dismissed withWM_CLOSE: 577,531,904 bytes, sha25624ab4560031f2437c57f0db494cc0487181f5f00ad7552517f2d646bdecf0d3b, window handle1574064(pid 9556, rect128,128,1422,886, 1294x758,visible=True), play ending at 33.4 fps after 2,104 frames in 64 s inKokiriForest_Child,exit_code 0;runs\win-2151\log.txtandsmoke-75a2aafd.logon that box. The screenshots and game data stayed there.Assisted-by:/Co-Authored-By:trailers. The work was done with an AI coding agent (OpenCode, DeepSeek V4.1 Flash 1017): the two fixtures, the audio fold, the POSIX branch and the Windows COFF check are agent-written, directed and reviewed by the author. Both commits now carryAssisted-by: DeepSeek V4.1 Flash 1017 (opencode-go); no person co-authored, so there is noCo-Authored-By:. The trailer was added by a message-only amend: the tree is unchanged.Ready to merge
@Beanstalkrequest that names this head was posted on 2026-11-22 12:34, BeanBot answered that only a member ofBigBeanscan start it, and no approval has come yet. The by-hand item has not run either, and the rebase and strict suite are still pending. Ticks when those results are in Tested.pr status: Reviews: none); the Beanstalk approval is waiting for a BigBean.main, measured again or a comment says why the numbers still hold. The suite evidence was taken on basea2dc5385; the head has since been rebased onto8aa5ab87at75a2aafd, and then a comment-only commit made it437d8eab4, and the suite has not been re-run on either. The in-game smoke is at tree0b31884e(5db210a3), not at this head's tree (fe2b05c6). The CI status of earlier heads (6dd681be,f00baf93,5db210a3) is not evidence forb567e2cf; re-confirm CI when the head reports. The@Beanstalkand CI asks that nameb567e2cf(12:34 and 22:56) stay as history: the head moved to75a2aafdafter those asks, so their CI results are stale and have not been re-requested.Tested in game: Kokiri Forest (child), pack over
1885234b, 20 s: 90.8 fps median 11.03 ms, 0 cold frames; boots and plays. Arch Linux/Hyprland, RTX 4070 Ti, NVIDIA 620.70.06.fa9f400442936b343728Rebased onto
344deb6c(head936b3437); #2159 also touches host/nn_vi.c and the rebase was clean, test_vsync_events still passes. The in-game run was on1885234b.@Beanstalk Windows: start the game on this branch and confirm
GetDisplayVsyncEventstill runs and the game presents normally — vsync events still delivered, no stall on start. Its fixture is Linux-only, so only the start is asked.Ready otherwise.
@dazemc only members of
BigBeanscan start the farm.One of them can approve this request by reacting 👍 to it or to this comment.This request was for936b343, and the PR has changed since (6dd681b), so a 👍 no longer approves it. Comment@Beanstalkagain to ask for the new commit.fix(host): the display's vsync ticker starts under the table's lock, and a full table is a Resultto WIP: fix(host): the display's vsync ticker starts under the table's lock, and a full table is a ResultBack to WIP for one box: this head's merge base is
344deb6c, andmainhas since moved toa2dc5385with #2171 (9e10f6f7) fixing the game-free checks (~199 test files). The suite numbers here were measured against the oldmain(813/116/18 there, now 911/22/18), so 'mise run test' is unticked until a rebase ontoa2dc5385and a re-run oftests/run_all.py --strict,test_vsync_eventsincluded.The in-game smoke stands: its record (
5bc9f83a, 1816 frames, 90.8 fps, 0 cold frames) matches, and the changed lines ofhost/nn_vi.care identical to the head's.The Ready to merge boxes stay unticked, each with its reason beside it: Windows (fixture is Linux-only) is with the Test Farm, waiting for a BigBean; no review yet; CI's build/test jobs are still pending.
936b3437286dd681bef0Rebased onto
a2dc5385: head is now6dd681be. The rebase was clean — one commit replayed with no conflicts.Full game-free suite, run in the same shape as a clean
a2dc5385baseline (tests/run_all.py --strict --jobs 3,systemd-run --user --scope -p MemoryMax=8G -p MemorySwapMax=0, the pinned headers):a2dc5385: 911 passed / 23 failed / 18 skipped in 635 s6dd681be: 912 / 23 / 18 in 618 sFailing names identical, compared name by name (23); the extra pass is the new
tests/test_vsync_events.py. The one name new ona2dc5385since9e10f6f7istests/test_sim_turf_pools.py: #2174 changed the simulated-turf floor while that old check still asserts a zero floor, so it is stale onmainand red identically here.In-game evidence (Jev: 0.77, likely valid): the smoked
5bc9f83arecord matches, the changed lines inhost/nn_vi.care identical to this head (#2159 touches the same file elsewhere), and no commit in344deb6c..a2dc5385touches it. No new in-game run was made.WIP: fix(host): the display's vsync ticker starts under the table's lock, and a full table is a Resultto fix(host): the display's vsync ticker starts under the table's lock, and a full table is a Result@Beanstalk Windows: start the game on this branch and confirm
GetDisplayVsyncEventstill runs and the game presents normally — vsync events still delivered, no stall on start. Its fixture is Linux-only, so only the start is asked.Head:
6dd681be(rebased ontoa2dc5385).@dazemc only members of
BigBeanscan start the farm.One of them can approve this request by reacting 👍 to it or to this comment.This request was for6dd681b, and the PR has changed since (9cd4714), so a 👍 no longer approves it. Comment@Beanstalkagain to ask for the new commit.9cd4714fdef00baf93a7Description updated for head
f00baf93: the CreateThread NULL path now covers the vsync ticker and nn_audio.c's renderer (event/handle cleared, 0x2C01, retry), with tests/audio_renderer_start_test.c + test_vsync_events' new case; the vsync fixture's InterlockedDecrement stub is in this head. The suite numbers at a2dc5385/6dd681be are not evidence forf00baf93: the targeted fixtures and suite atf00baf93are queued, results to follow.fix(host): the display's vsync ticker starts under the table's lock, and a full table is a Resultto WIP: fix(host): the display's vsync ticker starts under the table's lock, and a full table is a Resultf00baf93a75db210a3e1Marked WIP and unticked the boxes the new head invalidates (in-game test, suite, fix-fails-on-main: reasons beside each). Head is now
5db210a3: the ticker logs its start once ("vi: the vsync ticker started") so the in-game smoke can read it out of the log; that is the only change sincef00baf93. One queued job will run, in order: the two branch fixtures, the POSIX fixture (separate branch), the audio fixture against origin/main (it must fail there for the reason), the full suite at this head (jobs 5, MemoryMax=12G), then dev.py rt and a shared-mode game smoke (kokiri-start save, title to play, 30 s, quit) checking the ticker line, "audio: renderer opened" and no startup hang. Boxes stay unticked until that output is in Tested.Added the host-build checklist row the diff suggests (host/nn_audio.c and host/nn_vi.c): unticked until the queued Linux build and the Windows item land. No code change in this update.
WIP: fix(host): the display's vsync ticker starts under the table's lock, and a full table is a Resultto WIP: fix(host): the vsync ticker starts once; a failed ticker or audio renderer leaves no waiterRe-queued without blocking timing runs: the POSIX fixture, the audio fixture against origin/main and the full suite at
5db210a3now run as one light job in the job queue (dev.py queue run --mode light), outside the machine lock; only dev.py rt and the 30 s game smoke take the lock, after the timing jobs ahead of them (#2154's keys, finalized-2). The description's "queued" wording is corrected accordingly (the lock poller is not a queue job). Title widened to name the nn_audio.c half. Already green at this head: run_all --strict test_vsync_events test_audio_renderer_start, 2 passed.Results at
5db210a3, light job outside the machine lock: POSIX fixture PASS (reported failure, event not set, one attempt); audio fixture against origin/main fails for the reason (FAIL:56 result == 0x2C01, result 0, event 0x5000 still registered) and passes here; full suite 913 passed / 23 failed / 18 skipped in 815 s with --jobs 5 under MemoryMax=12G, the 23 names identical to main's. Ticked the suite and fix-fails-on-main boxes from that output. Still unticked: in-game smoke (running under the machine lock after the timing jobs, including #2154) and the host-build box's Windows half. Title and wording already correct.The first in-game smoke at
5db210a3did not reach the title: the system OOM killer killed the shared queue job during first-start shader preparation (start-up 36499/38809, 38809 programs, 6.2G peak + 3.8G swap) while another shared game ran. That is machine pressure, not a code result; the run's log shows the host up to device init only, so nothing is ticked. Retrying alone in the queue's gpu mode with a 900 s readiness timeout, under the machine lock after the timing jobs (#2154 is ahead).Correction: the smoke retry is now a real queue ticket, not a lock poller — job 2151-smoke-gpu, mode gpu (no other game beside it), readiness timeout 900 s, waiting for the GPU behind #2154's shared probe; queue status shows it. The 913/23/18 suite output is saved at /home/daze/.local/share/longshot-dev/2151-light-job-5db210a3.log and the body names it. The Windows COFF check for host/nn_vi.c and host/nn_audio.c is job 2151-wincoff (light), waiting on the queue's memory admission; the host-build box stays unticked until it compiles.
Windows half of the host-build box done: host/nn_vi.c and host/nn_audio.c compile as x86_64-w64-mingw32 COFF objects (machine 0x8664, 33 KB and 170 KB) with llvm-mingw 20261104's clang 23.1.5. The first attempt used #2180's shortened flag list and failed on nn_vi.c's early rx_option call (implicit declaration); the real host flags from nx2/build.py add -Wno-everything, and both compile with them. Objects at /home/daze/.local/share/longshot-dev/2151-wincoff/. Box ticked. Smoke 2151-smoke-gpu still waits for the GPU.
In-game smoke passed at
5db210a3(job 2151-smoke-gpu, gpu mode alone): title to play after 8 presses, 30 s of play, screenshot at frame 3515, quit with exit 0. Log line 224 'vi: the vsync ticker started', line 279 'audio: renderer opened'; no could-not-start line and no startup hang. Ticked the in-game box; the earlier OOM was the shared-mode first-start shader preparation with another game beside it, not the change. With the suite, the fixtures and the Windows COFF objects, every Ready-for-review and When-it-applies box is ticked.WIP: fix(host): the vsync ticker starts once; a failed ticker or audio renderer leaves no waiterto fix(host): the vsync ticker starts once; a failed ticker or audio renderer leaves no waiterThe Checklist has no
### When it appliessection: theA fixbox (the newtests/test_vsync_events.pyandtests/test_audio_renderer_start.pyfail onmainand pass here), theHost code builds on Windowsbox (Testing is a COFF compile of the two changed host files; the full Windows link is not made), and theAI assistance recordedbox are absent. The five Ready-for-review boxes are settled at5db210a3; please add the section, and mark the Windows build box partial/CI if the full link has not run.5db210a3e1b567e2cf61WIA and AI boxes added; the AI is backed by the
Assisted-by:trailer inb567e2cf. TheHost code builds on Windowsbox is still [x] on a COFF compile only, with the full link not made by your own note — untick it or mark it partial/CI. The Tested/suite boxes still say5db210a3; the head isb567e2cf(the trailer amend, tree unchanged) — say that there too or name the new head.@Beanstalk Windows: start the game on this branch and confirm
GetDisplayVsyncEventstill runs and the game presents normally — vsync events still delivered, no stall on start. This is a fresh request: the earlier one was for6dd681be, and the head is nowb567e2cf; the fixture is Linux-only, so this start/present check is the Windows half.@dazemc only members of
BigBeanscan start the farm.One of them can approve this request by reacting 👍 to it or to this comment.This request was forb567e2c, and the PR has changed since (2836e29), so a 👍 no longer approves it. Comment@Beanstalkagain to ask for the new commit.Head
b567e2cfis still ready and waits only on fork CI: itspull_requestjobs are "Blocked by required conditions" and the PR has noci: approvedlabel. No earlier fork-CI ask names this head.@HumanBean: please approve this head's fork CI runs (the Actions jobs, and the
ci: approvedlabel for the fork project) and review #2151 — the vsync ticker starting once, a failed ticker or audio renderer leaving no waiter.Evidence is in the thread: the suite at
5db210a3(913/23/18, the baseline's names) and the in-game smoke at5db210a3;b567e2cfis a trailer amend with the same tree.Read-only audit of
b567e2cf, box by box. The fix reads correctly: the registration and the ticker start are one section undervsync_lock(host/nn_vi.c:90-119), a full table and a NULLCreateThreadanswer0x2C01and take the registration back (host/nn_vi.c:91-115), and the audio renderer clears its event, handle andrenderer_runningand leavesrenderer_threadNULL (host/nn_audio.c:1648-1662). The two new checks are real and game-free (tests/test_vsync_events.py:59-74,tests/test_audio_renderer_start.py:33-35). The gaps below are base and evidence, not the fix.Per-box
maina2dc5385;origin/mainis 13 commits ahead. The title is Conventional and the scope is one theme, but the base claim is false at this head.git diff a2dc5385 origin/main -- host/nn_vi.c host/nn_audio.cis empty, so the fix is not invalidated; the suite claim is.v3.1.1-2-g5db210a3;b567e2cfand5db210a3both have tree0b31884e; log lines 224 and 279 are exactly the claimed lines; statefinished, exit 0,quit. Say "the tree atb567e2cf(5db210a3)" or re-run at the commit.mise run testmain913/23/18is in the saved log and the tree matches; the base911/23/18is from the 02:58 comment. Butfe1c437c(#2213) fixed 17 of the 23 names (test_close_waits_for_save,test_compile_zero_byte,test_damaged_rom_files,test_draw_stream_visibility,test_fs_save_commit,test_fsr_uniform_ownership,test_guest_copies,test_hold_toggle,test_lower_atomg_cas,test_menu_i18n,test_menu_keys,test_menu_slider_ends,test_pads_after_menu,test_recording_admission,test_sim_turf_pools,test_vibration_menu,nx2/test_import_windows) and says main is back to one failing check (test_dev_packs); main also adds 5 test files. The head's 23 failures are mostly the stale base, so "the same names main fails" is not true at current main. Rebase and reruntests/run_all.py --strictat the new base.5bc9f83a1816/90.8 vs 1851/92.6 is one run at a superseded commit; drop it or label it as not attributable.third_partymain, passes heretests/test_vsync_events.py:64because main's start is athost/nn_vi.c:95, after the release at 93; the audio fixture fails attests/audio_renderer_start_test.c:56(the job log'sFAIL:56). Note: the body's "main: two tickers..." output is a manual fixture run; the committed Python test on main fails at the source check and never reaches it.longshot(618,087,944 bytes) and ran the suite. #2141's box is the precedent, but the 11:02 review asked "untick it or mark it partial/CI"; the box is still[x]. Mark it partial/CI or cite #2141 in the box.Assisted-by: DeepSeek V4.1 Flash 1017 (opencode-go); the head is a message-only amend (both trees0b31884e).gpu/vk/switches.deforgpu/vk/menu/; no user-visible setting. The template says delete N/A boxes.pr checksis 10 pending/blocked, 2 passed.Claims to fix or settle
mainfails" — false at current main (#2213;git show -s fe1c437c,git diff --name-status a2dc5385 origin/main -- tests/). Settle with a rebase and onemise run test.b567e2cf" for the game run — the manifest's version is5db210a3; the tree is equal. Say "the tree" or re-run.0x2C01still waits on an unsignalled event, and the Risks says so. "Leaves no registered event" is the accurate claim.tests/test_vsync_events.pyprints on main (it stops at the source check). Label it a manual fixture run.Nothing here asks for a code change: the fix and its tests stand. The next step is a rebase onto current main and a fresh strict suite at the new head, then the suite box can be re-ticked with the actual names.
fix(host): the vsync ticker starts once; a failed ticker or audio renderer leaves no waiterto fix(host): the vsync ticker starts once; a failed ticker or audio renderer leaves no registered eventfix(host): the vsync ticker starts once; a failed ticker or audio renderer leaves no registered eventto WIP: fix(host): the vsync ticker starts once; a failed ticker or audio renderer leaves no registered eventBack to WIP after the audit (#issuecomment-75408). Body-only: the head is still
b567e2cf, nothing pushed.a2dc5385, 13 commits behindorigin/main(21d5bdf9); a rebase is pending.host/nn_vi.candhost/nn_audio.care untouched on main (git diff a2dc5385 origin/main -- host/nn_vi.c host/nn_audio.cis empty), so the fix itself is unaffected.913 / 23 / 18 in 815 sis taken on basea2dc5385(saved log2151-light-job-5db210a3.log); the911/23/18baseline has no saved log, only the 02:58 comment. #2213 (fe1c437c) fixed 17 of the 23 and says main is back to one (test_dev_packs), so the box is unticked until the rebase and a fresh strict run.0b31884e,5db210a3), not at theb567e2cfcommit object; the tree is identical.nn_vi.obj33,169 B,nn_audio.obj169,901 B, machine0x8664), no link; the box is partial, as the 11:02 review asked.leaves no registered event; the5bc9f83afps numbers are dropped as not attributable; the two-ticker block is labelled a manual C-fixture run, while the committed test's main failure is the source check attests/test_vsync_events.py:64.The CI and Test Farm asks that name
b567e2cfstay valid and are not re-asked here.b567e2cf612836e29e252836e29e2575a2aafd8f@HumanBean — fork CI for head
75a2aafd, please.What it is: the vsync ticker starts once under
vsync_lock, and a ticker or audio renderer that cannot start returns0x2C01and leaves no event registered.Asked: approve this head's fork CI runs, and a review when you have the time.
Evidence: the saved suite log
/home/daze/.local/share/longshot-dev/2151-light-job-5db210a3.log(913/23/18, taken on basea2dc5385) and the2151-smoke-20261122-012558run.Still WIP — suites land one at a time, so this is not a merge request.
Windows testing dropped by the human 2026-11-24: the Host-code-builds-on-Windows box stays unticked, so this PR stays WIP. No link and no Test Farm request are planned.
WIP: fix(host): the vsync ticker starts once; a failed ticker or audio renderer leaves no registered eventto fix(host): the vsync ticker starts once; a failed ticker or audio renderer leaves no registered eventfix(host): the vsync ticker starts once; a failed ticker or audio renderer leaves no registered eventto fix(host): the vsync ticker starts once; a full table or a failed ticker or audio start answers 0x2C01437d8eab42f7af4e26fcfix(host): the vsync ticker starts once; a full table or a failed ticker or audio start answers 0x2C01to WIP: fix(host): the vsync ticker starts once; a full table or a failed ticker or audio start answers 0x2C01Suite at
f7af4e26fc4aaedc439e292b7c87d5216f814cc3(logprrefresh-logs/suite-2151-f7af4e26.log, sha256ddd0f0a08f6dd411dca14a66e46f5802d989ba5f3a631ed0d669955217f6b9e8,.head= that sha, exit 1): 835 passed, 2 failed, 8 skipped in 489 s (linux, 5 at once).The two failing ids are outside the 19 CORE and 5 FLAKY ids of the suite-comparison rule, so the
mise run testbox cannot be ticked at this head:tests/test_display_startup_failure.py—display_startup_actual.inc:82:5: error: use of undeclared identifier 'bc_claim'tests/test_title_card_strips.py—ModuleNotFoundError: No module named 'oot_patches'Neither is caused by this PR. Both fail identically on
mainbe663a08a30fa953420104d3cef6877bed6674a2in a clean worktree, same two exception lines (2 checks, 0 skipped); #2532 already records theoot_patchesone as failing on currentmain. The header reads 837 checks against the rule baseline's 961 because main's #2411 moved the game's own tests out oftests/.Marked work in progress until the suite rule's treatment of ids that fail identically on the head's base is settled.
Description: Testing names the machine instead of a distribution; no other change.
WIP: fix(host): the vsync ticker starts once; a full table or a failed ticker or audio start answers 0x2C01to fix(host): the vsync ticker starts once; a full table or a failed ticker or audio start answers 0x2C01f7af4e26fcd1b245a457Rebased
f7af4e26ftod1b245a45on main8f7300756; patch-id unchanged and intersection empty. Existing suite, Linux and Windows evidence stands; stale owed-rebase bullet removed.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.