runtime: a fatal exception names its place in the title: RVA, stack, registers (RT-FATAL-REPORT-RVA) #2555
Closed
github-bot
wants to merge 1 commit from
github-bot/gh-2555 into main
AGit
pull from: github-bot/gh-2555
merge into: github:main
github:main
github:perf/darner-title-priority-ceiling
github:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
github:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
github:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
github:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
github:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
github:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
github:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
github:fix/runtime-test-conservative-fixtures
github:ci/shard-semantic-linux
github:docs/fg-limit-fps-switch
github:fix/runtime-test-fixture-paths
github:fix/runtime-test-fixture-readers
github:fix/read-file-hard-link
github:fix/book-slot-heap-never-read
github:fix/depth-resolve-spv-path
github:fix/indirect-unused-batched
github:gh-pr/3358/base
github:fix/xmem-refusal-diagnostics
github:gh-pr/3357/base
github:ci/shorten-ci-time
github:fix/alias-later-queued-submissions
github:claude/gallant-sagan-aamatr
github:gh-pr/3342/base
github:gh-pr/3341/base
github:d3d12/agility-sdk-621
github:gh-pr/3293/base
github:gh-pr/3319/base
github:gh-pr/3318/base
github:gh-pr/3315/base
github:gh-pr/3313/base
github:gh-pr/3314/base
github:claude/fervent-curie-m19lnr
github:gh-pr/3216/base
github:gh-pr/3272/base
github:gh-pr/3276/base
github:gh-pr/3279/base
github:gh-pr/3257/base
github:gh-pr/3258/base
github:gh-pr/3271/base
github:codex/skip-no-hit-ray-passes
github:gh-pr/3230/base
github:gh-pr/3266/base
github:gh-pr/3247/base
github:gh-pr/3246/base
github:gh-pr/3244/base
github:claude/sharp-sagan-1jqnp3
github:t3/preserve-fsr-sdk-restart-path
github:t3/propagate-host-failure-hresult
github:t3/launcher-custom-parameters
github:t3/series-x-2160-startup
github:codex/d3d12-uncapped-simulation
github:ci/less-to-run
github:perf/native-compute-shader-forms
github:claude/blissful-franklin-ukp7ag
github:codex/full-precompile-default
github:gh-pr/3166/base
github:gh-pr/3148/base
github:gh-pr/3138/base
github:gh-pr/3106/base
github:gh-pr/3057/base
github:gh-pr/2756/base
github:gh-pr/2812/base
github:gh-pr/3032/base
github:gh-pr/2992/base
github:notes/card-time-and-plant-flicker
github:gh-pr/2986/base
github:gh-pr/3000/base
github:gh-pr/2966/base
github:gh-pr/2924/base
github:gh-pr/726/base
github:gh-pr/2761/base
github:gh-pr/2663/base
github:gh-pr/2861/base
github:gh-pr/2862/base
github:gh-pr/2820/base
github:gh-pr/2811/base
github:gh-pr/2803/base
github:rt-call-trace
github:gh-pr/2802/base
github:gh-pr/2766/base
github:perf/ahead-split
github:gh-pr/2589/base
github:gh-pr/2699/base
github:gh-pr/2696/base
github:docs/readme-runtime-proposal
github:gh-pr/1346/base
github:codex/coord-claim-check-20261124-7e48
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
area: ci
.github/ workflows and settings
area: d3d12
The D3D12 runtime in d3d12/ (Rust: leonida.exe and its crates)
area: docs
Documentation
area: launcher
The launcher (launcher/)
area: runtime (legacy)
The earlier Vulkan runtime in runtime/
area: shader translator
The shader translator (leonida-shader, tools/rdna2spirv) and its tests
area: tools
tools/ and scripts/
area: viewer
The map viewer (viewer/)
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
missing claim
Needs a claim in #14
needs in-game run
Changes the code a frame runs through: needs the 300 s in-game gate (docs/game_gate.md)
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
wontfix
This will not be worked on
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!2555
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2555"
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?
@kristofbarany on GitHub · 2026-11-28 02:25 UTC · original
kristofbarany:leonida/fatal-report→main· +161 −1 · 4 files · 1 commits · closed without mergingClaimed in the coordination issue as: RT-FATAL-REPORT-RVA (#1608)
What and why
gta6rt's fatal-exception filter printed only the exception code (
[rt] unhandled exception 0x80000003: writing the session pipeline cache ...), so a title's soft assert (anint3after a report call) could not be traced from thelog. It now also prints, once, before the pipeline cache is written:
rsp.rbxwhen its first qword points into the image.ReadProcessMemory, so a bad stack pointer ends the walk instead of faulting again inside thehandler (
runtime/src/fatal_report.h). The image's base and size are recorded right after the title is loaded.Found with it (the use that motivated it, see #2554): with the title's own upscaler forced on Series S, the title
stops about 30 s in at its out-of-memory report. The report gave the
int3's RVA, the allocator call on the stack,the request size in
rdi(2.1 MiB) and the allocator object's vtable fromrbx; reading that object's fieldsthen showed the full 1,277 MiB range.
Tested
fatal_report_test(new): a made-up exception record, context and stack over a stand-in image: the RVA, the imageaddresses in order with the limit, the registers,
rbx's vtable, and a fault outside the image, an unknown image,an unreadable stack pointer and null exception pointers (no fault, a report). 7/7.
cteston this branch (Windows 11, MSVC 2022, Ninja, RelWithDebInfo): 508 of 510 passed. The two failures,xbox_present(present failed (VkResult -11)) andd3d12_set_descriptor_heaps(recorded_commandscheck), areseparate executables that do not build
src/main.cppor the new header, and fail the same way on the branch of#2554.
tests/test_docs_env_vars.py,test_ctest_registration.py,test_text_encoding.py: OK.scripts/check_no_game_data.pyon the changed files: clean.int3(three runs, the same RVA each time). Not yet run in the game on thismain.GPUs tested: NVIDIA GeForce RTX 4070 12 GB, driver 621.40, Windows 11 (ctest)
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a)The fatal-exception filter printed only the code ("unhandled exception 0x80000003"), so a title's soft assert (int3 after a report call) could not be traced from the log. It now also prints the faulting address as an RVA of the title's image, the stack qwords that point into the image (likely return addresses, innermost first), the general registers, and the RVA of the vtable of an object in rbx. Reads go through ReadProcessMemory, so a bad stack pointer ends the walk instead of faulting inside the handler (runtime/src/fatal_report.h). Found with it: the title's out-of-memory int3 when its own upscaler is forced on Series S (the allocation size in rdi, the allocator's vtable from rbx). Test: fatal_report_test (made-up exception record, context and stack over a stand-in image). Co-Authored-By: Claude Opus 5.5 <[email protected]>@Tyrannys on GitHub · 2026-11-28 02:41 UTC · original
#2555 | head
db0ecbacec| ctest -C RelWithDebInfo -R "^fatal_report$" (MSVC RelWithDebInfo; gta6rt also built) | red: n/a, the test includes the new src/fatal_report.h, so on main it does not compile (new diagnostic, not a fix of something main gets wrong) | green: main02f71ccfemerged into the head, 7 checks, 0 failures, 1/1 passed | full suite: not run (a game boot was using the machine) | Windows 11, RTX 4070 SUPER, NVIDIA 621.01, Python 3.14 | AI-assisted: yes, Claude Code@lixonik on GitHub · 2026-11-28 09:20 UTC · original · approved these changes
Reviewed the diff and tested merged onto
main(493867366) with Ninja Release (MSVC).Using
ReadProcessMemoryinrt::fatal_report::describekeeps the fatal-exception diagnostic safe against bad stack/object pointers, and the RVA/stack/register/vtable formatting and unit tests are clean.Tests run
ctest --output-on-failure -R "^fatal_report$": 1/1 passed (fatal_report0.02 s).python -m unittest tests/test_ctest_registration.py: 7/7 passed (1.01 s).AI-assisted (Antigravity, Gemini).
@zmasi on GitHub · 2026-11-28 23:06 UTC · original
Native Windows 11 + MSVC
19.44+ Live Hardwareint3SEH Verification (db0ecbacec+origin/mainadfb3821a2)Verdict: PASS (0 blockers, 0
/W4warnings in new code)Environment & Merge Check
10.0.26200), MSVC19.44.35228(x64,/W4 /permissive- /utf-8 /O2 /EHsc)origin/main(adfb3821a2,git merge-tree --write-treerc=0);runtime/src/main.cppcompiles cleanly under/W4;test_ctest_registration.py,test_ci_registration.py, andtest_text_encoding.pyallOK.Red -> Green & Live Hardware SEH Results
runtime/src/fatal_report.handfatal_report_testare absent onorigin/main(C1083), wheresave_caches_on_fatal_exceptionlogs only the exception code without RVA, stack, or register context.PR #2555 + origin/main):fatal_report_test.exe: PASS (7 checks, 0 failures,0/W4warnings).int3(__debugbreak()) SEH probe: Raised a realEXCEPTION_BREAKPOINT(0x80000003) inside nested non-inlined PE functions and passedGetExceptionInformation()intort::fatal_report::describeagainstGetModuleInformationbase/size — confirmed accurate fault RVA ([rt] fault at title +0x203a), innermost-first hardware stack return RVAs (+0x20fb +0x19560 ...), and live register dump (rc=0).Diff Audit Notes (Non-Blocking Suggestions)
r10andr11(the two volatile x64 scratch/indirect-call registers) are omitted from the[rt] registers:format string betweenr9andr12; including them could help when diagnosing indirect/CFG call faults.describe()builds its output instd::stringinsidesave_caches_on_fatal_exception; if a fatal exception ever occurs while the default process heap lock is held or corrupted, formatting stack-buffered lines directly toSTD_ERROR_HANDLE(WriteFile/fputsonchar buf[512]) would keep the diagnostic completely heap-free.AI-assisted.
@enlight3d on GitHub · 2026-11-29 00:47 UTC · original
Run of #2555 (
fatal_report), red then green.db0ecbacec(base1a441d336). Current main:1bc055e6c2.git merge-tree --write-tree main <head>merges cleanly.Commands (in a vcvars64 shell, build folder inside the worktree):
Green (PR head): builds,
fatal_reportPassed (1/1, 0.02 s).Red (non-test changes reverted:
runtime/src/fatal_report.hremoved andruntime/src/main.cppback to the base, test and CMake registration kept): the target does not build (C1083: cannot open include file '../src/fatal_report.h') and the same ctest endsfatal_report (Not Run), 0 of 1 passed. Since the PR adds a new header, red here is a build failure and not an assertion failure. The stale test executable from the green build was deleted before this ctest, so it could not pass by leftover.Overlap (checked with
git merge-tree): this PR conflicts with #2306 (which contains #2276) inruntime/src/main.cpp; both add a crash report with registers and stack, so only one of the two can go in as is.Link check: merged into main
1bc055e6c, gta6rt.exe builds and links (RelWithDebInfo, MSVC 19.44); no new imports vs main.@timbot103 on GitHub · 2026-11-29 01:06 UTC · original · reviewed
Static audit of
db0ecbaceagainst48bae6cad. I found two issues.runtime/src/fatal_report.h:37andruntime/src/main.cpp:374: the top-level filter allocates and writes through CRTstderrbefore saving caches. A failed allocation can bypass the save and filter delegation, and a blocked report holds the existingcall_once. Please format into a fixed-size buffer, bypass CRT stdio for the new output, and preserve cache saving and filter delegation when reporting fails.runtime/src/fatal_report.h:45:ReadProcessMemorychecks readability. A corruptRspcan still point into a readable non-stack page. Please bound the scan to the faulting thread's stack and cover readable non-stack memory and the upper stack boundary in the synthetic test.AI-assisted.
github-bot referenced this pull request2026-11-29 16:56:36 +00:00
@fiestorra on GitHub · 2026-11-29 17:29 UTC · original
Verified on the C++ runtime here, because this one can be built and run without the game.
The branch is 1780 commits behind, so the question is whether it still applies at all. Applied onto
origin/main4364a4fa6:So: it applies, its own test passes, and the whole runtime still compiles with the change - which matters more than usual here because
main.cppis where the fatalpath lives and a mistake there would show up as a build break rather than a test failure.
What this does not cover: anything that needs the game to run. I built
gta6rtbut did not launch it, so the part that prints an RVA and registers for a realexception is unexercised -
fatal_report_testdrives the formatter with synthetic data, which is the testable half.Written with an AI assistant.
@fiestorra on GitHub · 2026-11-30 06:01 UTC · original
Independent verification on this machine (Windows 11, MSVC 19.44.35226). It applies, builds and passes; the negative control is impossible by construction, and I say so rather than dress up a passing number.
1. It applies.
merge-treeclean;db0ecbacecherry-picks ontomain0ae217cebwithout a conflict. Four files,161 insertions(+), 1 deletion(-):fatal_report.h(new),main.cpp, the test, and its CMake registration.2. It builds and passes, three times:
fatal_report_test.exe-> exit 0, 0, 0.3. The negative control cannot be built.
fatal_report.his a new file and the test includes it (6 references); with the header removed the compile stops at:So there is no
mainversion of this test to run against - the same shape as #2651 and #2645. What that proves is that the test exercises the new reporting path; it does not prove the path is right.A trap I fell into and caught in this same round: my first attempt reverted only
main.cpp(the header does not exist onmain, sogit checkout origin/main -- …fails for it), Ninja reported "no work to do", and the binary from the previous build answeredexit 0. That number was the old executable, not the reverted source. The.exetimestamp is what exposed it -07:00:45, unchanged - and the compile failure above is the real result of the attempt.What I did not test: a fatal exception in a real run. The test builds the report from a synthetic fault record; whether the RVA, stack and register block it prints point at the right place in the title needs a crash under the loader, which is the situation this reporting exists for and one this machine cannot stage.
Written with an AI assistant.
@fiestorra on GitHub · 2026-11-30 11:21 UTC · original
Verified with a negative control, and the result is worth knowing: the tests pass with the header reverted, so they do not observe the change.
1. It applies and builds. merge-tree clean onto main
d367675c7.2. With the branch:
3. The control - revert only the source change, keep the test, rebuild:
What that says: the fault report written for an exception is not observed by $(System.Collections.Hashtable.test). The test keeps passing when both the header and its wiring in main.cpp are put back to main's versions.
What I am not saying: that the change is wrong. Two readings are possible and I did not choose between them - the test may be a unit test of a header whose behaviour is unchanged in the cases it covers (in which case green either way is correct and the change is elsewhere), or it may be a test that was written beside the change rather than against it.
What would settle it in one case: a test that drives the path through the new code - e.g. for this one, the fault report written for an exception with an input that only the new code handles - and asserts on the result. If no such input exists, the change is additive and the control is expected to be green, which is also a useful thing to write in the pull request.
Why I am commenting: I verify open pull requests that replay onto current main, build the binaries their tests name, run them, then revert only the source change. A green control is a real result, and it is the one a reviewer cannot get from the diff.
Written with an AI assistant.
@KelboLive on GitHub · 2026-11-30 16:37 UTC · original
Independent check on Windows (not the author), at
db0ecbace.runtimeand builtfatal_report_test(MSVC 14.52.37025, Windows SDK 10.0.26100).Environment: Ryzen 9 7950X3D, Windows 11 Pro 10.0.26200.9711.
AI-assisted: yes (opencode).
@MoonEyes on GitHub · 2026-11-30 17:32 UTC · original
Maintainer review: not ready to merge. Blockers: (1)
gh pr checksreports no checks for the current head; the comments contain test runs, but no current CI result is available. (2) This PR overlaps the still-open #2306 crash-reporting change; the intended single implementation needs to be resolved before merge. (3) The latest independent review reports the new fatal path can allocate/use CRT stderr before cache saving and that the stack scan is not bounded to the faulting thread stack; no fix or response is present in the discussion. (4) A later negative-control report saysfatal_report_teststill passes after reverting the source change, so the test does not demonstrate the new behavior. Please address these points or explain why each is safe, then refresh validation.@aslan2142 on GitHub · 2026-12-01 16:46 UTC · original
Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (
d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools,d3d12/, or general docs), please feel free to reopen it.Pull request closed