Repository navigation
Windows boot: LEONIDA_DEVICE_FAULT=2 by default, so a boot on NVIDIA reads the precompiled compute journal (BOOT-DEVICE-FAULT-2) - #2599
Conversation
…reads the compute journal gta6rt --precompile-pipelines wrote (1 with LEONIDA_AFTERMATH=1) boot.ps1 set LEONIDA_DEVICE_FAULT=1 when the shell had not set it. On NVIDIA, 1 also enables VK_NV_device_diagnostics_config (d3d12_vulkan_device.cpp:23349-23360), and the runtime then puts that config into the key of every compute journal file (d3d12_vulkan_device.cpp:11818-11824, "nv-diagnostics-config"). So a boot read none of the journal a pre-compile without the variable had written, though boot.ps1 hands that journal to the boot as its seed since ProjectLeonida#2481. 2 is the runtime's mode for this case: the device-fault report, checkpoints and the submit ring, without the diagnostics config. LEONIDA_AFTERMATH=1 still gets 1. The runtime takes the LEONIDA_DEVICE_FAULT branch before the Aftermath one (d3d12_vulkan_device.cpp:23352-23371), so under 2 a crash dump would lose NVIDIA's diagnostics config (no shader debug info). A LEONIDA_DEVICE_FAULT the user gives (shell, -SetEnv or KEY=VALUE) always wins, and LEONIDA_DEVICE_FAULT= leaves it unset, as before. Measured on an RTX 3090 24 GB, NVIDIA 621.40, Windows 11: two builds, each with its own fresh compute pre-compile and an A/B pair of 60 s boots of that build, n=1 per cell. The counts are from the runtime's last "pipeline journal" progress line within the 60 s (it prints at the first event of a kind, then every 100th): build LEONIDA_DEVICE_FAULT from the precompiled journal compiled 1bc055e 1 0 500 1bc055e unset 700 0 ace0e9d unset 700 0 ace0e9d 2 700 0 With 1 the line said 25 from journal files: files that same boot had just written (zmasi's reading on ProjectLeonida#2570; the boot's writable journal gained about 519 files). No commit in 1bc055e..ace0e9d touches d3d12_vulkan_device.cpp, vulkan_device_fault.h or pipeline_cache_journal.h. Found by MoonEyes on ProjectLeonida#2570; zmasi pointed there at mode 2. The README's row says 2, when 1 is used, and that "NVIDIA diagnostics config unavailable" in the runtime's device-fault line means "not requested" under 2. Its seed row no longer says the script sets 1. The comment over the defaults says the Linux harness does not set the variable. Test: tests/test_windows_boot_journal_seed.py, dry runs for the default, the shell, -SetEnv and KEY=VALUE overrides, the removal and LEONIDA_AFTERMATH, and the README row (read as text, on any system). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
#2599 | head 202ad50 (merged cleanly onto origin/main d8c10dd) | Windows 11 (10.0.26200.9974), Windows PowerShell 5.1, Python 3.12.10 | AI-assisted: yes Independent Verification (Windows 11 + PowerShell)
|
|
TAKEN by OreoFR: game boot A/B on RTX 4070 Laptop 8 GB |
#2599 game boot A/B: boot.ps1 default LEONIDA_DEVICE_FAULT 1 (main) / 2 (this PR), with a precompiled journalLocal test, AI-assisted (Claude Code, Claude Opus 5.5). Values only: no captures, logs or game paths leave this machine.
Prediction (written before the first boot)A reads about 0 entries from the seed (key mismatch: RUN p2599-A1RUN p2599-B1RUN p2599-B2RUN p2599-A2RUN p2599-B3RUN p2599-A3RUN p2599-B4VerdictThe PR does what it says on NVIDIA. With a journal pre-compiled without the variable, main's The second half of my prediction missed: B did not reach its first frame sooner. Rendering started at t=58-127 s in A B3 crashed at 122 s (access violation, the runtime's unhandled-exception line) before any submission and before any Caches: each boot had its own fresh pipeline cache and journal folder. The NVIDIA driver's disk cache was not cleared.
|
timbot103
left a comment
There was a problem hiding this comment.
Static audit of 202ad50e5 only. No builds, tests, or GPU runs were performed for this review. I found no actionable defects.
scripts/windows-boot/boot.ps1resolves the shell,-SetEnv, and trailingKEY=VALUEarguments in that order before selecting the Aftermath default. Explicit0and1survive, and a trailing empty assignment removes the variable from the launched process. The finalLEONIDA_AFTERMATH=1selects mode1only when device fault was left to the script default. The added PowerShell constructs are compatible with 5.1 and 7 on static inspection.runtime/shims/d3d12_vulkan_device.cppuses the same compute builder for precompile and boot. Mode2omits the NVIDIA diagnostics config from device creation and the journal key, matching the key for a compatible precompile run with device fault and Aftermath unset.runtime/src/pipeline_cache_journal.hchecks the seed entry under that filename. Both modes request the same fault reporting, checkpoints, and optional AMD markers where supported. On AMD, Intel, or any other device that lacks NVIDIA's diagnostics config, the mode change has no effect on the enabled extensions or journal key.scripts/windows-boot/README.mddescribes the new default and Aftermath exception.tests/test_windows_boot_journal_seed.pyadds dry-run coverage for the defaults, override sources, removal, and Aftermath, plus a platform-independent README check. The test launcher prefers Windows PowerShell when both executables are installed.tests/test_docs_env_vars.pychecks whether variable names are documented, and both names remain documented.
AI-assisted.
Claimed in the coordination issue as: BOOT-DEVICE-FAULT-2 (#2570 (comment))
What and why
scripts/windows-boot/boot.ps1setsLEONIDA_DEVICE_FAULT=1when the shell has not set it. On NVIDIA,1also turns onVK_NV_device_diagnostics_config(runtime/shims/d3d12_vulkan_device.cpp:23349-23360, READ IN CODE), and the runtime then addsnv-diagnostics-configto the key of every compute journal file (d3d12_vulkan_device.cpp:11818-11824, READ IN CODE). So a boot looked for different file names than the onesgta6rt --precompile-pipelineswrites without the variable, and read none of the precompiled journal, even thoughboot.ps1has passed that journal to the boot as its seed since #2481.The runtime already has a mode for this case. With
LEONIDA_DEVICE_FAULT=2it keeps the device-fault report (VK_EXT_device_fault), the NVIDIA checkpoints and the submit ring, and leaves out the diagnostics config (with_config,d3d12_vulkan_device.cpp:23355, READ IN CODE). This pull request makes2the default:boot.ps1: the default changes from"1"to"2". One exception: when the final environment hasLEONIDA_AFTERMATH=1and the user did not setLEONIDA_DEVICE_FAULT(not in the shell, not with-SetEnv, not as aKEY=VALUEargument), the script uses1. The runtime takes theLEONIDA_DEVICE_FAULTbranch before the Aftermath one (d3d12_vulkan_device.cpp:23352-23371, READ IN CODE), so under2a crash dump would lose NVIDIA's diagnostics config and its shader debug info, which the old default gave it. A value the user gives always wins.LEONIDA_DEVICE_FAULT.scripts/windows-boot/README.md: theLEONIDA_DEVICE_FAULTrow gives2and says what it keeps. It says that1adds the diagnostics config and is used automatically withLEONIDA_AFTERMATH=1. It also says that under2, "NVIDIA diagnostics config unavailable" in the runtime's[rt] device-fault: enabledline means the config was not requested, not a driver problem. TheLEONIDA_PIPELINE_JOURNAL_SEED_DIRrow no longer says the script sets1.Overrides work as before. A trailing
LEONIDA_DEVICE_FAULT=1argument still turns on the full diagnostics config for one boot (so do the shell and-SetEnv), andLEONIDA_DEVICE_FAULT=leaves the variable unset.What was measured (MEASURED, n=1 per cell, so these are observations, not settled numbers):
gta6rt --precompile-pipelines, run without the variable), then an A/B pair of 60 s boots of that same build:1against unset on 1bc055e, unset against2on ace0e9d. No commit between the two builds touchesd3d12_vulkan_device.cpp,vulkan_device_fault.horpipeline_cache_journal.h(git log 1bc055e6c..ace0e9d1c -- <those three paths>is empty; the range has 64 commits).pipeline journalprogress line within the 60 s. The runtime prints that line at the first event of a kind, then at every 100th.LEONIDA_DEVICE_FAULT1(the old default)2(the new default)With
1the line said 25 from journal files, and 500 compiled and written. The 25 were re-reads of files that the same boot had just written, as zmasi read it on #2570. The boot's writable journal gained about 519 files, which confirms it. So none came from the precompiled journal.Tested
The tests came first.
tests/test_windows_boot_journal_seed.pygets nine cases. Eight runboot.ps1 -DryRun(no launch, no game files):2;LEONIDA_DEVICE_FAULT=1wins when given on the command line, in the shell, or with-SetEnv(three cases);LEONIDA_DEVICE_FAULT=removes the variable;LEONIDA_AFTERMATH=1gives1, whether it comes as an argument, from the shell or from-SetEnv;LEONIDA_AFTERMATH=1with aLEONIDA_DEVICE_FAULT=2the user gave (argument, shell or-SetEnv) keeps2;LEONIDA_AFTERMATH=0keeps2(noLEONIDA_AFTERMATHat all is the default case).The ninth reads the README as plain text, with the Markdown marks dropped, so it runs on every OS. It checks that the row's default is
2and that no text says the script sets1. Six of the nine already pass onmainand pin existing behaviour: the three overrides, the removal and the two Aftermath cases.Red, on
main0a32535 with only the test file added (the whole file, run withpython -I):With the default at
2but no Aftermath exception yet,test_aftermath_gets_the_diagnostics_configfailed in its three subtests ('2' != '1'; Ran 26 tests, FAILED (failures=3)).Mutations of
boot.ps1, each run against the full file: default back to"1"fails 2 tests. Without the Aftermath exception, 3 subtests fail. Without the-SetEnvloop, 3 tests fail.Green, with the change. Each file ran in its own process with
python -I(Python 3.13.12, Windows 11, Windows PowerShell 5.1):tests/test_windows_boot_journal_seed.py: 26 tests OK (17 existing and 9 new).tests/test_windows_boot_fault_digest.py: 5 OK.tests/test_ci_registration.py: 18 OK.tests/test_docs_*.py: 11 of 13 files OK. Two fail in exactly the same way onmain0a32535, in files this pull request does not touch. Intest_docs_links, three links toREADME.md#project-statusand#running-the-loader-on-linuxhave no target. Intest_docs_cli_flags,README.md:94passes-Gametoscripts/play-d3d12.ps1.scripts/check_no_game_data.pyon the three changed files: clean.git merge-tree). With tests: boot journal seed test compares the temp folder's long spelling (TEST-BOOT-SEED-SHORT-TEMP) #2514 this branch merges cleanly. With CI: fix the three tests red on main (CI-F16-INT16-OMOD-REJECT, CI-RUNTIME-STACK-RESERVE, CI-BCPACK-POOL-DEDUPE) #2593 the test file merges cleanly; the only conflict isruntime/test/d3d12_compile_pool_test.cpp, which CI: fix the three tests red on main (CI-F16-INT16-OMOD-REJECT, CI-RUNTIME-STACK-RESERVE, CI-BCPACK-POOL-DEDUPE) #2593 has withmainitself.What was not checked:
VK_NV_device_diagnostics_config. If so,2behaves there as1did (READ IN CODE, by zmasi).scripts/linux-boot/) does not setLEONIDA_DEVICE_FAULT, so nothing changes there.2, so this pull request does not exercise the fault report in that mode. That runtime path already existed and is unchanged.LEONIDA_AFTERMATH=1was run. Only the dry runs above check the exception.Not in this PR:
docs/running.md:57,docs/d3d12_vulkan.mdandruntime/README.mdstill document onlyLEONIDA_DEVICE_FAULT=1(a follow-up). The runtime's "NVIDIA diagnostics config unavailable" under2(runtime/src/vulkan_device_fault.h:1171-1173) says "unavailable" for a config it did not request; that is a finding, not fixed here.Credits: MoonEyes posted the finding on #2570 (#2570 (comment)). zmasi pointed out there that mode
2already exists and suggested this change (#2570 (comment)), and read the 25 journal reads under1as the boot's own files.GPUs tested: NVIDIA GeForce RTX 3090 24 GB, driver 621.40, Windows 11 (profile L), for the four boots above. The unit tests need no GPU.
AI-assisted: yes (Claude Code, Claude Opus 5.5)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code