Fall back to a plain minidump when the rich one fails - #11
Merged
Conversation
Two CI runs failed on "An uncaught C++ exception produces a minidump": the .dmp existed and was over 4 KB, but the crash log did not contain "minidump written". Only the terminate path ever failed. The access violation and invalid-parameter probes, one of which passes the same null exception info, never did. MiniDumpWithIndirectlyReferencedMemory walks everything the stack points at. That walk can report failure after most of the file has already been written, which leaves a large .dmp next to a log line saying no dump was written -- and it is worst on the terminate path, where an exception is still in flight while the walk runs. A rich dump that fails is now started again as a plain one, which needs no walk. A stack-only dump is much less than the full one and much more than nothing. The three crash tests now print the log they read and require it to be non-empty. A log that could not be read and a log missing a line both arrived as "npos != npos", so neither CI failure could say which had happened; the comment in the file had already complained about exactly that. Verified by forcing the rich attempt to fail: the crash tests pass on the fallback alone, so a plain dump still clears the 4 KB the test requires and the log line is honest. The flake itself has never reproduced on this machine -- 25 consecutive runs of [crash] in Debug are clean both before and after -- so CI is the only place the fix can be confirmed. Debug and Release are both 99/99. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
HeathHowren
added a commit
that referenced
this pull request
Aug 26, 2026
Fall back to a plain minidump when the rich one fails
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.
Why
Two CI runs failed on An uncaught C++ exception produces a minidump (
3d439cbDebug,2c2a614Debug). Both failed the same assertion: the.dmpexisted and was over 4 KB, but the crash log did not contain"minidump written".Only the terminate path ever failed. The access-violation and invalid-parameter probes never did — and the invalid-parameter one passes the same null exception info, so that is not the difference.
MiniDumpWithIndirectlyReferencedMemorywalks everything the stack points at. That walk can report failure after most of the file has already been written, which leaves a large.dmpsitting next to a log line saying no dump was written — and it is worst on the terminate path, where an exception is still in flight while the walk runs. That is the one moment the crash log has to be believable.What
writeMinidumpnow retries as a plainMiniDumpNormalwhen the rich type fails. A plain dump needs no walk. Much less than the full dump, much more than nothing — and the log line becomes true again.npos != npos, so neither CI failure could say which had happened. The comment in that file had already complained about exactly this.Tests
MiniDumpNormalalone — so a plain dump still clears the 4 KB the test requires and the log line is honest. Without this, the retry would be an untested path in a crash handler./W4 /WX.Honest limit: the flake has never reproduced on my machine — 25 consecutive
[crash]runs in Debug are clean both before and after the change. The diagnosis comes from the two CI failures and from which of the three probes fail, not from a local repro. CI is the only place this can be confirmed. If it recurs, the newINFOoutput will name the line the log actually contained.Needed on
masterbeforev2.1.0is tagged: the tag build runs the same suite, and this was failing roughly one Debug run in four.