report: take a poisoned crash or write lock instead of losing the report #1705
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1705
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1705"
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?
@b3IKK on GitHub · 2026-11-24 19:27 UTC · original
b3IKK:report/poisoned-lock-keeps-crash-report→main· +30 −3 · 1 files · 1 commits · openreport::lock_withintreats everytry_lockerror exceptWouldBlockas "give up":A poisoned lock is one a thread panicked while holding — exactly the situation a crash report exists for — yet it made
write_finalreturn before writing anything (WRITE_LOCK) andbuilddrop the crash text (.ok()onCRASH). So a panic insidebuild()took the report with it, including the crash it was reporting.This takes the poisoned guard with
TryLockError::Poisoned(e) => Some(e.into_inner())inlock_within, and readsCRASHthroughlock_withininbuildso the crash text is not silently dropped. A lock held by a live thread is still not waited for beyondwait, so a report from a thread already insidebuild()cannot wedge the process at exit.What is in it
crates/xcl/src/report.rs: handleTryLockError::Poisonedinlock_within; readCRASHthrough it inbuild; add unit testa_poisoned_lock_is_taken_instead_of_losing_the_report(fails onmainatexpect("a poisoned lock is still taken")) and keep the held-lock timeout assertion.Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1).\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 960 passed, 0 failed, 43 ignored (SKIPPED: the wave64 / direct-DXIL per-lane tests that need 64-lane hardware or a semantics mode this adapter refuses,no heap windows, andcannot disable the driver cache (Windows Developer Mode is required))cargo test -p xcl --lib report::tests: 2 passed, 0 failedRegression run
main (
1d027e5, clean tree, no local changes):PR (
cf0cde2, clean tree, no local changes):(Two runs of this head: 1229 and 1232 frames. The change is in
report.rsonly — nothing on the render path — andXCL_TRANSLATOR_SOURCE_ID, which keys the translated-shader cache, does not include it; the minute went into the title's compute-pipeline work on this loaded box. No crashes and no device removals in either.)Not tested
build()(the unit test poisons the lock directly)AI use
report.rs, wrote the fix and unit test (and confirmed it fails without the fix), rebased onto1d027e5, ran the test suite andscripts/smoke.ps1regression runs with #677's title hashing, and drafted this PR description.@b3IKK on GitHub · 2026-11-24 22:02 UTC · original
Rebased onto
1d027e5and re-ran: 960 passed, 0 failed, 43 ignored; the blocks above use the current scripts/smoke.ps1 (#677's hashed itle: line). The PR block's frame count is lower than main's on this loaded box — the change is ineport.rs only and is not part of the translated-shader cache key — but both runs show 0 crashes and 0 device removals.
@DavidM1911 on GitHub · 2026-11-24 22:09 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored.Thanks!
@throny on GitHub · 2026-11-25 00:37 UTC · original
Two contributors checked independently and found that #240 solves the same problem in a different way: #1607, group D65. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.
This is a hint from the community triage in #1607, not a maintainer decision.
AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
github-bot referenced this pull request2026-11-26 06:18:31 +00:00
@DavidM1911 on GitHub · 2026-11-26 06:07 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.