xcl run: thread dumps name XCL's own functions from xcl.pdb #1801
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1811"
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?
Imported from ivall/xcl. Originally posted by JRamos1993 on 2026-11-24T21:01:23Z.
Stacked on #1734. This PR's commit is the last one,
c7c600f; the one before it is #1734's.A thread dump gives XCL's frames as
xcl.exe+offset, and whoever reads one looks each up by hand with the same build's PDB. Several reports in #846 and #505 did that, and so did I. Now a dump line adds the function's name to XCL's frames, from the PDB next to the executable:xcl.exe+0x276a43 (title_textures::refresh). The offset stays.What is in it
crates/xcl/src/eh.rs:own_symbols: on the first dump, it loads System32'sdbghelp.dll, opens a session of its own and loads only XCL's module and its PDB.short_namedrops generic arguments and keeps the last two path segments.describe_frame:module+offset, plus(name)for XCL's own frames.dump_threadsuses it.XCL_DUMP_SYMBOLS=0. A run that makes no dump never loads dbghelp.a_symbol_name_drops_generic_arguments_and_keeps_two_segmentsa_dump_frame_of_xcl_names_its_function: looks up a test function's own address through the test executable's PDB. It prints SKIPPED without a PDB.Tested
x86_64-pc-windows-msvc; tests in debug, runs in release.cargo test --workspace -- --test-threads=4onc7c600f, aftercargo build --workspace: 862 passed, 0 failed, 42 ignored.gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).XCL_NETWORK=0 XCL_PRESS_AT=25:A XCL_THREAD_DUMP_AT=88,96.Regression run (60 s, no input, both built with
x86_64-pc-windows-msvc)main:
PR:
Not tested
AI use
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T21:35:25Z.
Full-suite run, since this PR has no test report yet. Tested exact head
c7c600f(on its basec160d86).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip pso_measurement_compiles_an_exact_synthetic_record: 861 passed, 0 failed, 42 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.a_dump_line_reaches_the_title_frames_under_a_deep_stack,a_symbol_name_drops_generic_arguments_and_keeps_two_segments,a_dump_frame_of_xcl_names_its_function,a_dump_line_is_the_top_frames_otherwise.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 862 passed, 0 failed, 42 ignored. SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipon NVIDIA. Both fail on main7f7e768too, not because of this PR: underXCL_REQUIRE_GPU=mesh,runner::skip_testturns their skips into failures.heap_window_out_of_memory_falls_back_to_the_switch_formskips whenXCL_HEAP_WINDOWSis unset (#1651), andshaders::tests::pso_measurement_compiles_an_exact_synthetic_recordskips because Developer Mode is off on this PC (it cannot disable the driver cache). The AMD run does not setXCL_REQUIRE_GPU, so there both just print SKIPPED.Not tested
AI use
Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-24T21:57:00Z.
Linux (Wine) test of
c7c600f(with #1734's commit under it) onmainc4d37be+ #684, a GNU build, which has no.pdb: the thread dump at 30 s had the same form with it as without (145 threads, no frame named), as the description says for a build without a PDB. The naming itself did not run here.Setup: Fedora 44 (kernel 7.2.9), Wine 11.21 Staging, vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175 and a local dxil-spirv patch. RTX 4070 12 GB (driver 615.71.09), Ryzen 9 9950X3D. Release, cross-compiled to
x86_64-pc-windows-gnu(rustc 1.98.0). Retail title 1.0.2.1, the first-run screens completed once and no story progress, one A press, 40 s runs,XCL_THREAD_DUMP_AT=30, 1 run of each tree.Tested
cargo test --release -p xcl --libfor the two tests it adds, under Wine:a_symbol_name_drops_generic_arguments_and_keeps_two_segmentspassed;a_dump_frame_of_xcl_names_its_functiontakes its SKIPPED path here (eh.rs:1196, no PDB beside the test executable), so the lookup itself did not run.c4d37be+ #684c7c600fRead
eh.rs:707:openreturns beforeLoadLibraryExW(:712) when there is no.pdbbeside the executable, so a GNU build never loads Wine's dbghelp. Thisxcl.execarries 127 MB of DWARF sections (objdump -h). A guess, not measured: without that return, Wine's dbghelp would be handed them on the first dump.Not tested: the lookup itself under Wine (dbghelp was never loaded); this commit without #1734; an MSVC build with its
.pdbunder Wine; Windows; the rest of the suite.AI use: Claude Code (Claude Fable 5.2) read the diff, built the trees, ran the tests and the two runs and wrote this report.
Posted without review by a person: the account owner was away and reads replies later.
Imported from ivall/xcl. Originally posted by tugasky on 2026-11-24T23:27:29Z.
The same lookup, already here
I wrote the same thing before I saw this PR, and this is the better home for it. My duplicate was a separate
crates/xcl/src/symbols.rswith adbghelpsession behindtry_lock, a cache keyed by module base, paths shortened to two segments, andSizeOfImageread from the PE as the offset bound — the same shape as this PR, written twelve minutes after it opened because I searched withgh … --search, which returns nothing in this repository, and did not fall back to listing the open PRs. I have not built this branch, so I am not reporting a result for it; I am saying I have nothing to add that this does not already do for thread dumps.The part it does not cover: the crash report
modules::describe_addressis what formats frames in theunhandled exception … in <module>+0xNNNline, in the thread dump and in the stack scan — and it appends nothing from a PDB. In my own copy that path named the one address I cared about, in a0xC0000005, only after symbolising by hand:If the session this PR opens were reachable from
describe_addressas well as from the thread dump, every frame XCL prints would carry(function)and, where line tables exist,at file:line— the exception line included, which is the one a report reader looks at first.Two things I would keep in mind for that:
SymInitialize; two independent sessions in one process is not something I would want to argue about.+0x9f6was the offset of a fault inside a function whose line tables give only the closing brace, so the name was worth everything and the line was worth nothing. The other case worth deciding is a PDB that is stale against a rebuilt binary — the module's PE timestamp or checksum is what catches it, and a wrong name is worse than no name.Happy to open that as a small stacked PR on your branch (
Stacked on #1811) if you want it, and equally happy to drop my copy and leave the whole thing to you — your call, since it is your PR and your diagnostics.Written by Claude (Anthropic) under my review; numbers from runs on my machine, no game data included.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T00:28:08Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by throny on 2026-11-25T10:28:39Z.
Test report for exact head
c7c600f.Tested
cargo build --workspace && cargo test --workspace -- --test-threads=4onc7c600fas it is (its own base): 862 passed, 0 failed, 42 ignored.SKIPPED: 3 lines (no wave64 on this adapter, and the like).scripts/smoke.ps1, the retail title, 60 s, release builds,main568e7dbfirst, then this head. Both runs started without the preload list newer builds leave behind (used-pipelines.txtin the DXIL cache), which makes builds on an older base run out of memory at start:main:
PR:
Not tested: AMD, the head merged onto current
main, a world load.AI use: Claude Code (Claude Opus 5.5) ran this and wrote the report; the diff was read for safety by a Claude Opus 5.5 sub-agent before it was built.
upstream-sync referenced this pull request2026-11-25 19:07:20 +00:00
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:51:35Z.
Triage (#1607) – head
c7c600fStacked on #1734: its first commit
d18b2751is #1734's (deep-stack dump lines); onlyc7c600f(dbghelp names for XCL's own frames from xcl.pdb) belongs here. Neither change is on main. dbghelp is loaded after the dumped thread is resumed, so it does not take the loader lock while a thread is suspended. No problems found in the diff; it conflicts with main's newerunwindsignature in eh.rs.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Pull request closed