Report: lock-safe crash report persistence under contention and re-entrancy (#106) #240
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!240
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-240"
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?
@slopgobblercobbler on GitHub · 2026-11-23 21:45 UTC · original
slopgobblercobbler:fix/crash-report-lock→main· +200 −13 · 1 files · 1 commits · openAddresses #106 Item 4 (Crash reporting lock safety & persistence under contention):
Prevents dropping crash data during process termination or unhandled exceptions:
lock_within()andbuild()recover from mutex poisoning viap.into_inner(), guaranteeing the report persists even if a thread panics during exit.InWriteGuardprevents same-thread recursion if formatting/writing faults, using a fallback path rather than self-deadlocking onWRITE_LOCK.WRITE_LOCKcannot be acquired within timeout during process termination, writes a direct fallback report or refreshes the existing report file rather than discarding crash data.CRASHbefore and after serialization so a concurrent crash is captured before process exit.What is in it
crates/xcl/src/report.rs:lock_withinwith poison recovery.InWriteGuardre-entrancy tracker.Tested
cargo test -p xcl -- report(24 passed, 0 failed).cargo test --workspace(608 passed, 0 failed).Not tested
AI use
author-report,verify-report). Verified and reviewed independently.github-bot referenced this pull request2026-11-26 04:59:09 +00:00
@MesshM on GitHub · 2026-11-24 04:33 UTC · original
Test run of
62cd3bcc6028930ec22237dfbd271fd7a81ba461on AMD RDNA4. I merged it onto currentmain64b3f35locally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 707 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 666 passed, 0 failed, 21 ignoredSKIPPED; thereporttests pass.Review: Recovering the report data from a poisoned mutex (
into_inner) and the thread-localIN_WRITEguard against re-entry mean a panic or a nested fault while writing no longer loses the report. I found nothing to change.Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
@throny on GitHub · 2026-11-25 00:37 UTC · original
Two contributors checked independently and found that #1705 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.
@DavidM1911 on GitHub · 2026-11-25 15:14 UTC · original
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main— needs a rebase before it can be tested.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.