[pr-fix][linux-proton] Crash records from two threads stay whole under Wine #355
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
hle
input
INTEL
lighting
linux-proton
memory
MULDER
needs-info
needs-logs
needs-rebase
NVIDIA
performance
post-merge
pr-diagnostics
pr-docs
pre-merge
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
relevance
high
relevance
low
relevance
medium
relevance
very-high
rendering
report
roadmap-proposal
saves
series-s
shaders
startup
status
blocked-by-rework
status
needs-test-report
status
needs-triage
status
ready-for-review
status
stale
status
superseded
status
wip
tools
ui
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!355
Loading…
Reference in a new issue
No description provided.
Delete branch "ntsthay/wine-crash-append"
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?
Not run in the game. A unit test shows the problem under Wine when the machine is busy.
Contributor role (optional)
What it changes
append_recordwrites a crash record with one append, so records from two threads that crash at the same time stay whole. Under Wine they can interleave. Onf3840d7,concurrent_crash_records_stay_togetherpasses alone but fails when other tests run beside it: withcargo nextest run -p darner-hle -p darner-loader --stress-count 5under Proton, it failed in all 5 iterations withassertion failed: lines.next().is_some_and(|line| line == body).Under Wine only, the record's file is now locked for the write. The handler takes the lock with
File::try_lockand yields between tries, so it never blocks for good. After 10,000 tries it writes anyway, since a thread that crashed while holding the lock lets it go only when its handle closes. On Windows nothing changes.How it was tested
b7767d1, this branch onf3840d7.--stress-count 5run under Proton (proton-cachyos, RTX 4080, 32 threads):concurrent_crash_records_stay_togetherfailed 0 times in 5 iterations, against 5 of 5 onf3840d7. The 23crash::tests pass.Checklist
main.docs/asset-policy.md.Checked for overlap