Repository navigation
Capture minidumps instead of full dumps for build/test hangs - #67441
Merged
Merged
Conversation
The non-Windows hang-dump capture step (CaptureHangDumps.sh) used `createdump --full`, producing multi-GB cores (~5.6GB each on the macOS quarantine leg). Capturing several of these and uploading them as artifacts does not fit inside the 15-minute cancelTimeout grace window: capture alone burned ~7 minutes and the subsequent upload-cores.sh was killed at the grace boundary, so no hang dump was ever published. Switch to `createdump --normal` (minidump). createdump is .NET-aware and still includes thread stacks plus the runtime/module memory the DAC needs, so SOS `clrthreads`/`clrstack` continue to work to identify the hung process and its managed stack -- which is what a hang investigation needs. Dumps drop from gigabytes to tens of MB, capture in seconds, and upload comfortably within the grace window. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the non-Windows hang dump capture script to generate smaller diagnostic artifacts so hang dumps can be reliably uploaded within Azure Pipelines’ cancelTimeoutInMinutes grace window.
Changes:
- Switch
eng/scripts/CaptureHangDumps.shfrom capturing full dumps (createdump --full) to minidumps (createdump --normal). - Add inline rationale documenting why minidumps are sufficient for hang investigations and why full dumps prevent successful artifact upload.
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.
Summary
The non-Windows hang-dump capture step (
eng/scripts/CaptureHangDumps.sh) captured full dumps (createdump --full). On a hang these are multi-GB (~5.6 GB each on the macOS quarantine leg), and capturing several of them plus uploading them as artifacts does not fit inside the 15-minutecancelTimeoutInMinutesgrace window — so no hang dump is ever published.This switches the capture to minidumps (
createdump --normal), which are tens of MB, capture in seconds, and upload comfortably within the grace window.Why this matters
The macOS quarantine test leg (
Tests: macOS, def 86 / dnceng-public) has been intermittently hanging for ~2 hours and timing out. Investigating it requires the captured dump, but on every occurrence the dump never makes it off the agent. Concretely, on build 1482875's hung mac job:succeeded, but took ~6m45s producing 5×~5.6 GB cores.failedafter ~7m27s — killed at the 15-minute grace boundary; ~28 GB cannot upload in time. No log, no artifact.So the dumps are captured on the agent every time; they just can't be uploaded. Shrinking them is the fix.
Why
--normalis sufficientcreatedumpis .NET-aware: even a normal minidump includes the thread stacks and the runtime/module memory the DAC needs to walk managed stacks. SOSclrthreads/clrstackcontinue to work, which is exactly what a hang investigation needs (identify the hung process and its managed stack). Full heap inspection (dumpheap, object graphs) is not needed to root-cause a hang, and that is the only thing dropped.Risk
Low. Only affects the diagnostic dump captured during the
or(failed(), canceled())grace window on build/test hangs; no product or test behavior changes.