Repository navigation
xcl run: XCL_STALL_DUMP dumps every thread and ends the title when frames stop - #1656
ThiagoAlexsander wants to merge 1 commit into
Conversation
Hardware test report — commit
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
…ames stop Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
480a683 to
8510ca0
Compare
|
Tested The watchdog fired at 184.216 s, 15 seconds after frame 3,692. It captured the same 146 thread IDs twice, 1.065 s apart, then exited with code 0.
For #1269, this gives us a specific PSO wait to investigate. Its connection to the presenter’s wait and the later GPU timeout is still open. Would it be more useful to trace the presenter’s wait handle and its signaling thread first, or to capture the pending PSO keys alongside the AI assistance: OpenAI Codex ran the tests, compared the snapshots using the matching XCL release symbols, and prepared this report. Follow-up on the RTX 4090 — the coordinator’s 82nd eventI repeated world entry on two locally instrumented builds based on The longer run logged successful The presenting thread was on a different Windows object, a semaphore, from 221.793 s through the cutoff. At 226.800 s, q1 timed out waiting for q0 on cell This narrows the next trace to the point where the game associates a queued job with its completion event. We can identify the signalers of the first 81 events. The current trace does not identify which worker or shader, if any, was assigned event 82. One run per duration, NVIDIA 621.24, Windows 11 build 26300, direct DXIL and heap windows enabled. The NVIDIA driver cache was uncontrolled. Related: #1269 and #1834. AI assistance: OpenAI Codex instrumented the local XCL builds, ran the tests and correlated the wait, signal and pipeline logs. Event 82 traced from the queue to worker 3In a further 600-second world-entry run on the RTX 4090, worker 3 (TID 21940) picked up the job for event 82 before the coordinator began waiting. I used the same instrumented An external sampler observed descriptor On XCL’s clock, coordinator TID 20168 began its 82nd wait at 191.784 s. The first 81 waits had succeeded. During the next 408.217 s, worker 3 completed the following work.
For #1269, two compute records are now directly tied to this job. Worker 3 was still executing the callback when the trace ended, before it reached the completion signal for event 82. The presenter remained on a separate semaphore, and the world never appeared (3,676 AI assistance: OpenAI Codex (GPT-6) ran the test and correlated the queue samples, worker stacks and pipeline timings. RTX 4090 on NVIDIA 621.40 — partial compute cache during world entryReusing the compute pipelines saved by a 600 s control run took Tested
Both traces associate slot 81 with the same callback RVA ( The warm run passed the cold run’s last unfinished compute record ( Not tested A complete precompile of all compute or graphics pipelines, waits longer than 600 s, repeat pairs, other adapters and a clean build of current main. NVIDIA’s internal cache was left under driver control across the two runs. These measurements establish progress within the callback and a lower bound on each wait. They do not establish a permanent deadlock or isolate the driver update’s effect on performance. AI use OpenAI Codex (GPT-6) ran the measurements, correlated the saved traces, checked the final sampled images and drafted this report. |
|
Regression run of Against the limits in CONTRIBUTING.md: 100 % of AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, AI use: Claude Code (Claude Opus 5.5) built both trees and ran |
XCL_STALL_DUMP=n: once a title has presented frames and then presents none for n seconds, XCL dumps every thread to the log. It dumps twice, a second apart, so a stuck thread can be told from a moving one, then ends the title the wayXCL_RUN_SECONDSdoes. A stalled frame loop is caught while it is stalled, without guessing a time forXCL_THREAD_DUMP_ATand without waiting for the title's own watchdog. On the retail title in #846, that watchdog fires about 26–30 s after presents stop. Part of #846.On that title this showed what the stall is on an NVIDIA GPU. The title's threads were in
pso_asyncbinds that wait for compute pipelines, while XCL's PSO workers were inside the driver's compiler. The dumps are in my comment on #1273.What is in it
crates/xcl/src/host.rs: the switch is a thread that watchespresent::presents()every 250 ms and uses the existingeh::dump_threadsandreal::end_title. Without the variable nothing starts.README.md: one entry next to the other run switches.stall_dump_takes_a_positive_number_of_seconds(the variable's parsing) anda_stall_needs_a_presented_frame_and_the_full_wait(when the watcher fires).Tested
cargo test --workspace -- --test-threads=4on this head: 742 passed, 1 failed, 25 ignored.test_title_runs_and_game_folder_is_untouched(e2e.rs:93), fails the same way onmainb7aa9f3on this machine.gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no wave64).XCL_STALL_DUMP=6and an A press throughXCL_PRESS_AT.main'sdump_threads, 1 run in 3 faulted inside ntdll's unwinder during the dump (read at address 0xac8), and the process then hung. That is the fault xcl run: thread dumps unwind a copy of each stopped thread's stack #253 fixes (the stack unwound after the thread was resumed).Update: rebased onto
main689f2db(head8510ca0). Since480a683: the README entry, and the parsing and stall check moved into two small functions with the two tests above../scripts/test.ps1 --skip test_title_runs_and_game_folder_is_untouched(CI's command): 976 passed, 0 failed, 45 ignored in 20 suites, including both new tests.XCL_STALL_DUMP=6(without xcl run: thread dumps unwind a copy of each stopped thread's stack #253, which is still open): no frame after frame 1401, so the switch fired at 77.6 s. Both dumps (126 threads each) are in the log, and the title ended without a crash or hang.The regression run below is from
480a683, before the rebase.Regression run
main:
this PR:
(Both runs are of the first-run start screen with no input; the switch is not set in either.)
Not tested
dump_threads's existing behaviour withXCL_THREAD_DUMP_ATtoo (Runtime / Loader / Platform: static TLS alignment & attach races, eh::dump_threads deadlock & VEH bounds, C-unwind FFI boundaries, AVX2 check, and hybrid CPU affinity / PLS quota #106), not new code.AI use
🤖 Generated with Claude Code