Repository navigation
xcl run: a thread dump line reaches the title's frames under a deep stack - #1734
Open
JRamos1993 wants to merge 1 commit into
Open
JRamos1993 wants to merge 1 commit into
JRamos1993 wants to merge 1 commit into
Conversation
…tack A thread dump line showed the top 14 frames of each thread. A title thread deep in XCL, the driver or DXC (a compute pipeline it builds in a bind, a compile it waits for) had all 14 of them there, so its line named no title frame and read like one of XCL's own threads. In dumps of a retail title's world-load stall, the title threads building pipelines in their binds looked like that, and reading them as XCL's own threads led to a wrong conclusion. The dump now unwinds up to 96 frames. When none of the top 14 is in the title's code but a deeper one is, the line adds how many frames were left out and the title's first 4 frames from there. Other lines are unchanged. (Such a thread's first title frame was 34 and 47 frames deep.)
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
Contributor
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A thread dump line showed each thread's top 14 frames. A title thread deep in XCL, the driver or DXC had all 14 of its frames there, so its line named no title frame and read like one of XCL's own threads. Examples are a compute pipeline the thread builds in a bind, or a compile it waits for. I misread such lines in a world-load stall of the retail title in #846; my report there explains how.
The dump now unwinds up to 96 frames. When none of the top 14 is in the title's code but a deeper one is, the line adds how many frames were left out and the title's first 4 frames from there. All other lines are unchanged. Related: #846, #924.
#253 changes the same call (
unwindreads a copy of the stack there). Whichever of the two lands second needs a one-line rebase.What is in it
crates/xcl/src/eh.rs:dump_framespicks a line's frames: the topDUMP_FRAMES(14). When none of those is in the title's code, it adds… N frames …and the title's firstDUMP_TITLE_FRAMES(4) frames.dump_threadsunwindsDUMP_UNWIND(96) frames and passes them to it.modules::image_base_for_addr: the images XCL maps itself, which are the title's exe and DLLs. It takes no lock.a_dump_line_reaches_the_title_frames_under_a_deep_stackanda_dump_line_is_the_top_frames_otherwise.Tested
x86_64-pc-windows-msvc, and again withx86_64-pc-windows-gnu.x86_64-pc-windows-gnu.cargo test --workspace -- --test-threads=4ond18b275, aftercargo build --workspace: 860 passed, 0 failed, 42 ignored, the same with both toolchains. SKIPPED: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). Both new tests pass.XCL_NETWORK=0 XCL_PRESS_AT=25:A XCL_THREAD_DUMP_AT=88,96.… N frames …and their first title frames. Those frames were 18 to 53 frames deep.main, such threads' lines had no title frame.Regression run (60 s, no input)
main:
PR:
In these 60 s runs the title takes one of two paths, whatever the build: about 16–17 GB peak commit with ~1,600 frames, or about 25–26 GB with ~1,300 frames. Two other runs took the heavier path: a second
mainrun onc160d86(1,302 frames, 26.5 GB) and an earlier PR run onbe07955(this change with 40 frames: 1,361 frames, 25.4 GB). Without a thread dump this change does not run.Not tested
AI use