Repository navigation
crash: write one report per fault, not one per dispatch - #19
Draft
arthurprudenteres wants to merge 1 commit into
Draft
arthurprudenteres wants to merge 1 commit into
arthurprudenteres wants to merge 1 commit into
Conversation
A title that asserts inside a pool allocator several threads are in reaches the same `int3` in each, and every one of those dispatches runs the unhandled-exception filter: the first prologue run's crashes.log holds six identical reports of one breakpoint (unix time 1795569532, process 9408, at victory-image-b99f876b74d4a77f.dll+0x5149aec), which buries the report that says what failed first. One full report is written per kind of report (first-chance, unhandled) per exception code and faulting address; a later dispatch of the same fault is one line. The lock is tried, never waited for, so a fault inside this handler is still reported rather than dropped. Test: crash::tests::one_fault_is_in_the_crash_log_once dispatches one fault three times in a child process and finds one full report and two "again" lines; with the de-duplication disabled the same test finds three full reports and none.
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.
Refs #16. One report per fault, not one per dispatch.
What this fixes
When title code asserts inside a pool allocator that several threads are in, each of those threads reaches the same
int3, and each dispatch runs the unhandled-exception filtervictory-loaderinstalls. Every dispatch then appended its own full report (registers and a 40-frame unwind) tocrashes.log.The prologue crash this issue isolates shows it: the first run's
crashes.logholds six identical reports of one breakpoint — sameunix time 1795569532, same process, same faulting addressvictory-image-b99f876b74d4a77f.dll+0x5149aec, 12 lines each. That is 72 lines for one fault, and it buries the record that says what failed first, which is exactly what the issue needed to read.crates/victory-loader/src/crash.rsnow writes one full report per kind of report (first-chance, unhandled) per exception code and faulting address. A later dispatch of the same fault is one line in the console and in the file:The
REPORTEDlock is tried, never waited for: a fault raised inside this handler is still reported in full rather than dropped.Before and after
crash::tests::one_fault_is_in_the_crash_log_onceraises one breakpoint three times throughreport_unhandledin a child process, as three threads of one stuck allocator do:(whole reports, "again" lines) = (3, 0)— three complete register and unwind dumps for one fault;(1, 2)— one complete report, then two one-line notes.The field evidence is the same shape: the run behind issue #16 has six complete reports of one
0x80000003.Tests
Also
cargo build --profile diag -p victory --features diagnostics, run four times on the prologue with revision481837bd2c7d5b5f6bf43744014e05901916e26eas the base.Base
Targets
integration/fps-syncat481837b, the revision the issue pins for the repro, so the diff is this one commit. If the integration draft (#14) lands onmainfirst, the base follows it; the change itself is independent.What this does not change
The crash itself.
0x80000003is a title-sideint3, not a fault in our code: the faulting address is a title RVA (victory-image-<hash>.dllis the namevictory-loadergives the mapped title image), the byte there is0xCC, and the allocator's empty-freelist sentinel (0x1fffe) is inraxin both runs that crashed, at two different inlined copies of the same allocator (+0x5149aecand+0x63966f). It is reported here unchanged, so the original failure stays observable in the repro.The isolation and the two matched passes are in #16.
AI-assisted investigation and validation.