tools/game_run_summary.py: name device lost and title breakpoint in the END words (GAME-RUN-SUMMARY-END-NAMES) #2844
Closed
leonida/mandy
aznohonza wants to merge 0 commits from
tools/summary-end-names into main
pull from: tools/summary-end-names
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
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
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!2844
Loading…
Reference in a new issue
No description provided.
Delete branch "tools/summary-end-names"
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?
Pull request closed
This pull request cannot be reopened because the branch was deleted.
tools/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 (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7302707897).
AI-assisted.
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.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.
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.
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.
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.
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.
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.
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.
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.