[release/8.0-staging] Fix generation of minidump (#115562) #116052
Closed
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.
Ports #115562
Customer Impact
Addresses a customer reported issue in minidump generation. The DAC implements
ICLRDataEnumMemoryRegions::EnumMemoryRegionswhich is used bydbghelp!MiniDumpWriteDumpto mark pages in the process that must be saved for actionable dumps. As some memory enumeration API's might fail at dump collection time, we implement try/catch blocks around the logic that collects memory pages so that the entire process is not aborted. We have a customer report on an issue resulting in corrupted mini-dumps, missing memory needed for stackwalking. The issue was narrowed down to a call toGetILon anInlinedCallFramecauses an exception to be thrown during memory enumeration, resulting in skipping over other memory collection API's that would have succeeded and in turn creating a minidump missing memory needed for stackwalking. The fix addresses the issue by wrapping the IL version method calls at a lower-level with a nested try-catch block to ensure that an exception inGetILdoesn’t prevent dumping a full callstack.Regression
Testing
Manually tested, the customer verified
Risk
Low risk, we are adding a more granular try/catch around dump generation code