Skip to content

[release/8.0-staging] Fix generation of minidump #115739

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented May 19, 2025

Backport of #115562 to release/8.0-staging

/cc @thaystg

Customer Impact

  • Customer reported
  • Found internally

Some mini dumps generated by the runtime are missing information and the managed callstack can't be inspected.

Regression

  • Yes
  • No

[If yes, specify when the regression was introduced. Provide the PR or commit if known.]

Testing

We got a full dump and generated a mini dump from it and with the fix the mini dump is with the managed callstack information correctly.

Risk

Low risk, only added another try catch as there are many others in the code.

@thaystg thaystg requested review from tommcdon and steveisok May 19, 2025 19:47
ilVersion.GetRejitState();
ilVersion.GetIL();
}
EX_CATCH_RETHROW_ONLY_COR_E_OPERATIONCANCELLED
Copy link
Member

@jkotas jkotas May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the exception that this is catching thrown in the first place?

Is this a proper fix or just a quick workaround?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a quick/low-risk workaround. I agree we should do a more full version of the fix in main addressing the reason for the crash.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a quick/low-risk workaround. I agree we should do a more full version of the fix in main addressing the reason for the crash.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we figured out why it is crashing? If we have not figured out why it is crashing, what's our confidence level that this workaround is going to solve the issue reliably and that it won't just break again later when the crash dump is opened in the debugger?

(I am fine with this workaround if we understand the root cause of the crash and determined that this workaround is the right way to solve it in servicing.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jkotas I apologize for the delayed response! The crash was triggered by attempting to read the IL off an InlinedCallFrame pointing to an NDirectMethodDesc. At dump collection time, we enumerate all of the threads, and all of the stacks. While walking the frames, we encounted an InlinedCallFrame and called MethodDesc::EnumMemoryRegions on it. This in turn called ILCodeVersion::GetIL, which called MethodDesc::GetILHeader which attempted to get the IL from the module, causing an access violation due to an invalid pointer. @thaystg verified that avoiding reading the IL on NDirect methoddescs avoids the exception - candidate .net 10 change here - #116391. We decided to leave the try/catch in place but also guard the call to retrieve the IL. If the commit in main looks good, should we back port that to this servicing PR or keep the current PR as-is? The updated fix was verified locally.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

candidate .net 10 change here - #116391.

I think the change is not quite right: #116391 (comment)

should we back port that to this servicing PR or keep the current PR as-is?

The current PR is fine as-is. Thanks!

Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. we will take for consideration in 8.0.x

@jeffschwMSFT jeffschwMSFT added Servicing-consider Issue for next servicing release review area-Diagnostics-coreclr labels May 28, 2025
@jeffschwMSFT jeffschwMSFT added this to the 8.0.x milestone May 28, 2025
Copy link
Contributor

Tagging subscribers to this area: @tommcdon
See info in area-owners.md if you want to be subscribed.

@rbhanda rbhanda modified the milestones: 8.0.x, 8.0.18 May 29, 2025
@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels May 29, 2025
@thaystg thaystg merged commit 4bdcdb8 into release/8.0-staging Jun 9, 2025
112 of 114 checks passed
@akoeplinger akoeplinger deleted the backport/pr-115562-to-release/8.0-staging branch June 11, 2025 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants