Repository navigation
Conversation
Drawable callbacks, queue-drop paths and timing readers accessed the sequence number and timestamp fields of shared rings without synchronization. A reader could combine different generations, and a delayed callback could replace a newer wrap. Publish and read each record under a private mutex and reject older generations. Keep all helpers free of renderer/queue lock acquisition; the public timing signatures and unknown/drop sentinels are unchanged. Add a portable four-writer/four-reader fixture with 48,000 paired publications, normal and ThreadSanitizer targets, and a CPU-only CI step. Both ten-check runs pass. Removing just the synchronization reports a TSan data race. The standalone Mac host builds, focused LLVM 23.1.5 analysis has no new findings against the unchanged upstream baseline, and six documentation tests pass. No rendering or pacing policy changes are included. This proves history synchronization, not a frame-rate gain or the cause of a gameplay artifact. Co-authored-by: Adam Kratch <70729875+akratch@users.noreply.github.com>
Keep the per-game evidence discoverable without duplicating the mechanism. Runtime code and synthetic fixtures are unchanged from the checked head. Co-authored-by: Adam Kratch <70729875+akratch@users.noreply.github.com>
kingbumi31
pushed a commit
to kingbumi31/no-lag-kart
that referenced
this pull request
Nov 15, 2026
…herent snapshots (seedds) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JcmewFJDrDUooyBk9ygMAv
kingbumi31
pushed a commit
to kingbumi31/no-lag-kart
that referenced
this pull request
Nov 15, 2026
seedds#2182, seedds#2225, seedds#2194, seedds#2273 (mkw/sets.tsv) Each corrects wrong behaviour on code this game runs and brings a test that fails without it or a measurement; none changes the shader chain. Built on this Mac with 58 warnings as upstream; t_fstep passes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JcmewFJDrDUooyBk9ygMAv
kingbumi31
pushed a commit
to kingbumi31/no-lag-kart
that referenced
this pull request
Nov 15, 2026
… pull requests taken on 2026-11-12, the switch table's missing rows The profile's pso_manifest.tsv was the two-line placeholder, so a packed app started with no list: 116 long frames in its first 75 s at the title on this Mac, each new pipeline looked up in the bundled archive on the submit thread. It is now mkw/pso/pso_manifest_merged_180.tsv: 15,062 rows (6,827 shaders, 8,002 render pipelines, 222 compute pipelines, 11 task / mesh pipelines), the nine lists found online on 2026-11-11 with azmasm/switch2mac's at 25ceb457 (71 rows more, 2 of them new here) and the list of the app's own first start (5,549 rows, 12 new). No other source had moved on 2026-11-12 (Thijs2004/nxnative-mkw b1c5e4e5, MenAtCafe/mkw-neo cfa62ddc, cheemu21/plumber-racer-2 843170ac, pahorema/kartnative 47f2d1d5, pull request seedds#2097 1a4fd59). mkw/test/prep_probe.sh on the merged list with this Mac's archive: 15,062 lines in 1.20 s, 1 pipeline compiled, no crash. Pull requests of seedds/nxnative taken in the three commits before this one's parent: seedds#2408 (d82324f, a sparse mapping starts a new texture ID epoch only when it is new), seedds#2328 (65690e0, mtl_pool_del reads the open flag before g_fence) and seedds#2348 (55773c7, the display link off in fullscreen on a fixed-rate screen whose presents keep turning late). seedds#2348's presented handler reads its tick through nvn_link_history_get here: this tree has PR seedds#2194's snapshots where the pull request reads g_link_ring. Their effect on this game, and what was looked at and left out (seedds#2341), is in the game's README. docs/env_switches.tsv: rows with their meaning for DM_PSO_WHOLE, DM_NVN_IND_SPLIT and DM_NVN_VCONV_KEEP (upstream's text), which the table lacked, so test_env_switches passes. mkw/env-m2pro-16gb.txt: the comment of the pad says what one player draws at it now. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JcmewFJDrDUooyBk9ygMAv
kingbumi31
added a commit
to kingbumi31/no-lag-kart
that referenced
this pull request
Nov 15, 2026
…herent snapshots (seedds) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JcmewFJDrDUooyBk9ygMAv
kingbumi31
added a commit
to kingbumi31/no-lag-kart
that referenced
this pull request
Nov 15, 2026
seedds#2182, seedds#2225, seedds#2194, seedds#2273 (mkw/sets.tsv) Each corrects wrong behaviour on code this game runs and brings a test that fails without it or a measurement; none changes the shader chain. Built on this Mac with 58 warnings as upstream; t_fstep passes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JcmewFJDrDUooyBk9ygMAv
kingbumi31
added a commit
to kingbumi31/no-lag-kart
that referenced
this pull request
Nov 15, 2026
… pull requests taken on 2026-11-12, the switch table's missing rows The profile's pso_manifest.tsv was the two-line placeholder, so a packed app started with no list: 116 long frames in its first 75 s at the title on this Mac, each new pipeline looked up in the bundled archive on the submit thread. It is now mkw/pso/pso_manifest_merged_180.tsv: 15,062 rows (6,827 shaders, 8,002 render pipelines, 222 compute pipelines, 11 task / mesh pipelines), the nine lists found online on 2026-11-11 with azmasm/switch2mac's at 25ceb457 (71 rows more, 2 of them new here) and the list of the app's own first start (5,549 rows, 12 new). No other source had moved on 2026-11-12 (Thijs2004/nxnative-mkw b1c5e4e5, MenAtCafe/mkw-neo cfa62ddc, cheemu21/plumber-racer-2 843170ac, pahorema/kartnative 47f2d1d5, pull request seedds#2097 1a4fd59). mkw/test/prep_probe.sh on the merged list with this Mac's archive: 15,062 lines in 1.20 s, 1 pipeline compiled, no crash. Pull requests of seedds/nxnative taken in the three commits before this one's parent: seedds#2408 (d82324f, a sparse mapping starts a new texture ID epoch only when it is new), seedds#2328 (65690e0, mtl_pool_del reads the open flag before g_fence) and seedds#2348 (55773c7, the display link off in fullscreen on a fixed-rate screen whose presents keep turning late). seedds#2348's presented handler reads its tick through nvn_link_history_get here: this tree has PR seedds#2194's snapshots where the pull request reads g_link_ring. Their effect on this game, and what was looked at and left out (seedds#2341), is in the game's README. docs/env_switches.tsv: rows with their meaning for DM_PSO_WHOLE, DM_NVN_IND_SPLIT and DM_NVN_VCONV_KEEP (upstream's text), which the table lacked, so test_env_switches passes. mkw/env-m2pro-16gb.txt: the comment of the pad says what one player draws at it now. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JcmewFJDrDUooyBk9ygMAv
kingbumi31
added a commit
to kingbumi31/no-lag-kart
that referenced
this pull request
Nov 15, 2026
…herent snapshots (seedds) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JcmewFJDrDUooyBk9ygMAv
kingbumi31
added a commit
to kingbumi31/no-lag-kart
that referenced
this pull request
Nov 15, 2026
seedds#2182, seedds#2225, seedds#2194, seedds#2273 (mkw/sets.tsv) Each corrects wrong behaviour on code this game runs and brings a test that fails without it or a measurement; none changes the shader chain. Built on this Mac with 58 warnings as upstream; t_fstep passes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JcmewFJDrDUooyBk9ygMAv
kingbumi31
added a commit
to kingbumi31/no-lag-kart
that referenced
this pull request
Nov 15, 2026
… pull requests taken on 2026-11-12, the switch table's missing rows The profile's pso_manifest.tsv was the two-line placeholder, so a packed app started with no list: 116 long frames in its first 75 s at the title on this Mac, each new pipeline looked up in the bundled archive on the submit thread. It is now mkw/pso/pso_manifest_merged_180.tsv: 15,062 rows (6,827 shaders, 8,002 render pipelines, 222 compute pipelines, 11 task / mesh pipelines), the nine lists found online on 2026-11-11 with azmasm/switch2mac's at 25ceb457 (71 rows more, 2 of them new here) and the list of the app's own first start (5,549 rows, 12 new). No other source had moved on 2026-11-12 (Thijs2004/nxnative-mkw b1c5e4e5, MenAtCafe/mkw-neo cfa62ddc, cheemu21/plumber-racer-2 843170ac, pahorema/kartnative 47f2d1d5, pull request seedds#2097 1a4fd59). mkw/test/prep_probe.sh on the merged list with this Mac's archive: 15,062 lines in 1.20 s, 1 pipeline compiled, no crash. Pull requests of seedds/nxnative taken in the three commits before this one's parent: seedds#2408 (d82324f, a sparse mapping starts a new texture ID epoch only when it is new), seedds#2328 (65690e0, mtl_pool_del reads the open flag before g_fence) and seedds#2348 (55773c7, the display link off in fullscreen on a fixed-rate screen whose presents keep turning late). seedds#2348's presented handler reads its tick through nvn_link_history_get here: this tree has PR seedds#2194's snapshots where the pull request reads g_link_ring. Their effect on this game, and what was looked at and left out (seedds#2341), is in the game's README. docs/env_switches.tsv: rows with their meaning for DM_PSO_WHOLE, DM_NVN_IND_SPLIT and DM_NVN_VCONV_KEEP (upstream's text), which the table lacked, so test_env_switches passes. mkw/env-m2pro-16gb.txt: the comment of the pad says what one player draws at it now. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JcmewFJDrDUooyBk9ygMAv
seedds
added a commit
that referenced
this pull request
Nov 22, 2026
…snapshots (PR #2194) Drawable callbacks, queue-drop paths, and timing readers (hle_nvn.c, hle_vi.c) accessed g_pres and g_link_ring without synchronization, creating a data race, torn-read risk across sequence/timestamp fields, and stale-wrap overwrite risk. Publish and read both history rings under a private leaf mutex in nvn_present_history.h, rejecting older wrapped generations and ignoring ticket 0. Add CPU-only normal and ThreadSanitizer tests (t_present_history, present-history-tsan) and run them in CI. Co-authored-by: Adam Kratch <70729875+akratch@users.noreply.github.com>
Owner
|
Thanks @akratch for finding this race and putting together the helper and ThreadSanitizer test! This landed on
Checked: |
Aznracer
pushed a commit
to Aznracer/Mighty-Green-Kokiri-Kid
that referenced
this pull request
Nov 25, 2026
…snapshots (PR seedds#2194) Drawable callbacks, queue-drop paths, and timing readers (hle_nvn.c, hle_vi.c) accessed g_pres and g_link_ring without synchronization, creating a data race, torn-read risk across sequence/timestamp fields, and stale-wrap overwrite risk. Publish and read both history rings under a private leaf mutex in nvn_present_history.h, rejecting older wrapped generations and ignoring ticket 0. Add CPU-only normal and ThreadSanitizer tests (t_present_history, present-history-tsan) and run them in CI. Co-authored-by: Adam Kratch <70729875+akratch@users.noreply.github.com> (cherry picked from commit 7ff0aef)
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.
Drawable callbacks and queue-drop paths write presentation history while guest timing readers inspect it. The sequence number and timing payload were unsynchronized fields, so a reader could observe a torn record; a delayed callback could also replace a newer wrapped generation.
Publish and read each presentation/link descriptor under one private mutex, and reject older wrapped generations. Helpers acquire no renderer or queue locks while holding that mutex. Public timing signatures and the unknown/drop sentinels stay unchanged; no rendering or pacing policy changes.
The portable fixture checks coherent snapshots, missing/wrapped generations and concurrent readers/writers over 48,000 paired publications. All ten checks pass normally and under ThreadSanitizer. Removing only synchronization from the helper produces a TSan race. A CPU-only CI step runs the normal and sanitizer fixtures.
Each change is based on immutable upstream
e45694b7. The standalone Mac host builds, six documentation tests pass, and focused LLVM 23.1.5 analysis reports zero new findings with the upstream baseline unchanged. No exact-head game run or iOS gameplay test is claimed. The mechanism was also exercised in a separate OOT Mac integration; that is not a substitute for standalone-head gameplay.Impact manifests name Breath of the Wild, Pokémon Scarlet and Tears of the Kingdom as affected; Hades is unaffected and profiles without usage manifests remain unknown. Those games were not run here. No game assets or captures are included.