tools/game_run_summary.py: name device lost and title breakpoint in the END words (GAME-RUN-SUMMARY-END-NAMES) #2844
Closed
github-bot
wants to merge 0 commits from
github-bot/gh-2844 into main
AGit
pull from: github-bot/gh-2844
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!2844
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2844"
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?
@aznohonza on GitHub · 2026-12-01 06:19 UTC · original
aznohonza:tools/summary-end-names→main· +58 −2 · 2 files · 3 commits · closed without mergingtools/game_run_summary.pyprintsprocess exit 3 (0x00000003), no exit event in the startup tracefor a run the title ended in its own device-removed handler.docs/agent_collaboration.mdfixes the vocabulary forRUN ... END:time limit | process crash | device lost | stall | watchdog exit | title breakpoint. The summary now uses two of those words:[rt] vulkan: the device was lost (...)line becomesend: device lost (process exit 3);0x80000003exception becomesend: title breakpoint (process exit 3). The code is matched from any exception in the trace, normalised for0xand case, so a later teardown fault does not hide it.The time limit, and a guest exit before a device-lost line, keep their own end, so a timed-out or cleanly exited run is not renamed by a loss written during teardown. An exit 3 with an
0x80000003exception is atitle breakpointwhen no device loss is present; a device loss without an exit event wins over the breakpoint, because the breakpoint is its handler. A plain exit 3 with no such exception keeps the old fallback, and the loader-error and no-exit-code branches are unchanged.The docstring names the mapping and says the
[rt]lines are the C++gta6rtruntime's; the native Rust runtime'sLeonida: host GPU failure: ... device removedlines are not read.Tested:
python3 -I tests/test_game_run_summary.py(15 tests, including the two new endings, a later teardown fault, a bare80000003, and the exit/time-limit ordering) andpython3 -I tests/test_run_game_wine.py(9). No game files, no Wine, no GPU.Claimed in #2570 as GAME-RUN-SUMMARY-END-NAMES (#2570).
AI-assisted.
@KelboLive on GitHub · 2026-12-01 06:27 UTC · original · reviewed
The rules fit the run folder they are written for: the C++ runtime writes exactly
[rt] vulkan: the device was lost ((runtime/src/vulkan_backend.h:617), the startup trace writes a lowercase0x80000003, and the four synthetic endings read as intended — device lost only →device lost (process exit 3), breakpoint only →title breakpoint (process exit 3), both → device lost (first branch), neither → the generic line. 13 tests pass andcheck_no_game_datais clean.Two ordering questions, both about which end a real folder would report:
device_lostis checked before the guest exit and the time limit, so a loss line logged during teardown after a normal exit readsdevice lost (process exit 0), and after a time limitdevice lost (process exit 124). If the loss can be logged after the guest has already exited, the tool reports the wrong end for a run that exited cleanly. Prefer the exit event when one exists, or order by timestamp rather than by branch priority.0x80000003followed by a later teardown access violation (0xc0000005, which the repo docs already note) falls back toprocess exit 3 (0x00000003)instead oftitle breakpoint— I confirmed it. "Any0x80000003together with exit 3" would be safer than "the last one is 0x80000003".One scope note: this machine's real logs (
Leonida: host GPU failure: … device removed (0x887A0005), the native Rust runtime) do not produce[rt]lines, so the new rule is blind to them. That is fine if the summary is documented as Wine/gta6rtonly — say so in the docstring/body, or add the native wording as a second device-lost rule, since that is the form most reports on Windows will contain.Minor: compare a normalised exception code rather than the raw
"0x80000003"(a bare80000003passes the regex but misses the equality).@aznohonza on GitHub · 2026-12-01 06:36 UTC · original
Addressed in
74e3be90c:device lostis now after the time limit and the guest/loader exit events, so a loss line written during teardown no longer renames a clean exit or a time limit. Added tests for exit 0 + loss andtimeout+ loss;0xand case, so a later teardown0xc0000005does not hide it. Added a test with0x80000003followed by0xc0000005and one with a bare80000003;[rt]lines are the C++gta6rtruntime's; the native Rust runtime'sLeonida: host GPU failure: ... device removedlines are not read.15 summary tests and the 9
run_game_wine.shtests pass;check_no_game_datais clean. AI-assisted.@aznohonza on GitHub · 2026-12-01 06:37 UTC · original
One more in
4edb90521: a startup-trace exit event with code 3 no longer hides the breakpoint (test added). A device loss still wins when both it and the breakpoint are present and there is no exit event, since the breakpoint is its handler.@Neutron-0 on GitHub · 2026-12-01 07:12 UTC · original
Verified on Windows, and the control bites: the new cases fail with
main's copy of the tool.main640b0d0df, cherry-picked (one commit,4edb90521), Python 3.13.5:The five failures are the new cases only:
test_device_lost_names_the_end_before_the_title_breakpoint, the twotest_endingssubtests that wanttitle breakpoint (process exit 3), and the two subtests oftest_title_breakpoint_survives_a_later_exception_and_accepts_a_bare_code(0x80000003and80000003). The twelve cases the file already had pass in both trees, so nothing else moved.What the change is, from the diff: the
ENDwords gaindevice lostandtitle breakpoint-tools/game_run_summary.pyreadsvulkan: the device was lostoff an[rt]line and an0x80000003exception off the startup trace, and the test file gains the cases that name both.What I checked in the code besides running it (the tool reads the trace's codes as
str(event.get("code", "")), so_same_codealways gets a string, andEXCEPTION_CODEaccepts a bare80000003as well as0x80000003, which is what the new bare-code case is for):not device_lost), so a loss and a breakpoint in the same run readdevice lost, which is whattest_device_lost_names_the_end_before_the_title_breakpointasserts.What I could not test: a run folder from a real title - that needs the game. The tool never runs the files it reads, so the run folders the test writes are the whole of what I exercised.
AI-assisted: yes - DeepSeek v4.1 (flash), both arms on the machine above.
Written with an AI assistant.
@aznohonza on GitHub · 2026-12-01 07:20 UTC · original
Thank you — that is the same result as here: 15 summary tests pass on this head (the five new cases plus the ten that were already in the file), and the 9
run_game_wine.shtests pass. A real title run is out of scope for the tool itself, and the run folders we checked it against are the two described in #2464.AI-assisted.
@imShangLi on GitHub · 2026-12-01 10:01 UTC · original
VERIFY-2844 — Linux, Python 3.15, no GPU device, no game files
Verdict: PASS — the tool names the two
ENDwords it says it names, and the new tests look at the code that decides them.Head
4edb9052, base640b0d0d(the merge-base with the currentmain), 2 files, +58/−2:tools/game_run_summary.pyandtests/test_game_run_summary.py.1. Its own suite, and the three rows
tests/test_game_run_summary.pymain0259473b+ this PRmain+ only this PR's test change (patched)Row B's failures are assertions, not load errors:
The same difference for
device lost, and for the bare exception code (80000003without the0x), which is the_same_codenormalisation.2. Discrimination: does the new test look at the changed code?
A test that passes with the fix and without it proves nothing, so I reverted
tools/game_run_summary.pyalone tomain's copy on the green tree and ran the new tests:tools/game_run_summary.pyreverted tomain's3. What the change does, read in the code
tools/game_run_summary.pypicks oneendstring. The new branch order is:device lost (no exit code recorded)if the runtime logged a device loss, otherwise the old text;time limit ... reached(unchanged, and still first);0x80000003exception and no device loss →title breakpoint (process exit 3);guest returned ...(unchanged);loader error event ...(unchanged);device lost (process exit N);process exit N (0x...)text.The two orderings the pull request's text calls out are in the code as described: the time limit is checked before the device loss, and the device loss wins over the breakpoint, because the breakpoint is the device loss's handler.
DEVICE_LOST = "vulkan: the device was lost"is matched withstartswithon the[rt]line's text, and_same_codedrops a leading0xand compares case-insensitively, so80000003,0x80000003and0X80000003are the same code.4. What I did not check
device lostline is the C++gta6rtruntime's. The native Rust runtime'sLeonida: host GPU failure: ... device removedline is not read — the tool's own text says so, and I did not measure that path.[rt]lines and the startup trace were synthetic folders, as the tests build them.AI-assisted: MiniMax M3.1 Flash.
@imShangLi on GitHub · 2026-12-01 10:42 UTC · original
6. The whole standalone suite, against the same runner on a clean tree
I ran the repository's standalone test runner over
main0259473b+ this pull request and over a cleanmaintree, and compared the lists:main+ this PRmain0259473bThe one failure is
tests/test_run_semantic_tests.pyon all three trees: two tests of the runner's SIGINT handling (communicate(timeout=5)times out on this machine, and one expects exit code 130 and gets 0). It is red on the clean tree as well, so it is not this change's.AI-assisted: MiniMax M3.1 Flash.
@imShangLi on GitHub · 2026-12-01 13:33 UTC · original
A note on this machine's graphics, so "no GPU device" is not misread
I said above that this host has no GPU device. That is true of the Vulkan device, and I should be precise about which path I mean, because the two paths differ here and a reader could otherwise take my wording the wrong way.
What this machine is. A VMware Workstation guest (Fedora 45) on a host with a Radeon 780M. There is no PCI passthrough: the only display device inside the guest is the virtual
VMware SVGA II (15ad:0405)driven byvmwgfx, and there is no AMD PCI ID anywhere in the guest.There is no Vulkan hardware device here. mesa's svga driver has no Vulkan backend, so the loader enumerates nothing by default; with
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.x86_64.jsonit enumerates exactly one device,llvmpipe (LLVM 23.1.5, 256 bits)— a CPU software implementation. So no real GPU, no CUDA, no ROCm.The OpenGL path is hardware-accelerated, though. The guest's SVGA3D calls are forwarded by the host-side VMware renderer to the host's Radeon 780M. The evidence I measured, comparing the default path with
LIBGL_ALWAYS_SOFTWARE=1:GL_VENDOR = "VMware, Inc."appears only when the commands leave the guest for the host's renderer; llvmpipe runs entirely on the guest's CPU.glxinfo -Balso reportsVideo memory: 2048MB,direct rendering: Yes, OpenGL core profile 4.3 (Mesa 26.2.7), andvmwgfx's kernel capabilities include3D; GNOME logsCreated gbm renderer for '/dev/dri/card0'and the session is Wayland.What follows for the verification above. Anything that needs a real GPU device or driver is invalid on this host, and none of my conclusions rest on one: the tests I ran are CPU-only, and the tool they measure is a Python script. Where a measured number came from this machine's GPU stack, it says so.
Two things I checked that a reader might otherwise assume.
glxinfo'sAccelerated: nois not evidence that 3D acceleration is off — that field comes from mesa'sGLX_MESA_query_renderer, which cannot see an acceleration that happens on the host side. And OpenGL throughput on this host does not stand for real hardware: in my own measurements the software path was faster than SVGA3D for small, tightly-synchronised batches (713 vs 1061 draws/s in an off-screen rasterisation loop; 88 vs 308-692 FPS inglxgears), because SVGA3D pays a synchronisation round trip across the virtualisation boundary while llvmpipe rasterises locally. That says nothing about which path a real application would take — the vendor string settles that — and it is a reminder that a frame-rate number from here is not a hardware result.AI-assisted: MiniMax M3.1 Flash.
@imShangLi on GitHub · 2026-12-01 13:46 UTC · original
Correction to my note above: the frame-rate comparison was not controlled
My note above said that on this host the software path measured faster than SVGA3D (713 vs 1061 draws/s in an off-screen rasterisation loop; 88 vs 308-692 FPS in
glxgears), and put that down to SVGA3D paying a synchronisation round trip across the virtualisation boundary. That comparison was uncontrolled and the conclusion from it was wrong. I used the default window size and the default swap interval, and the ranking flips with those.With the window size and the swap interval fixed,
glxgearson this host gives:The two figures I quoted before were the default window with the default swap interval, which is the one combination that happens to favour the software path. So:
GL_VENDOR/GL_RENDERER(VMware, Inc./SVGA3DversusMesa/llvmpipe), never by the frame rate.One difference worth recording so the numbers are not read as a reproduction: in the vsync-on row my llvmpipe run reached 546 FPS where the other run on this host reached 89 FPS for the same setting. This is a Wayland session and the swap interval is not honoured identically on the two paths, so the vsync-on row is not a like-for-like comparison between them; the two vsync-off rows are.
AI-assisted: MiniMax M3.1 Flash.
@aznohonza on GitHub · 2026-12-01 21:46 UTC · original
Thanks for the PASS and for separating the two "no device" meanings — the startup-trace and
[rt]lines being synthetic folders matches what the tests build, and the Rust runtime'shost GPU failuretext is deliberately not matched. No change on my side.AI-assisted.
Pull request closed