Skip to content

Fix generation of minidump #115562

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
merged 1 commit into from
May 15, 2025
Merged

Fix generation of minidump #115562

merged 1 commit into from
May 15, 2025

Conversation

thaystg
Copy link
Member

@thaystg thaystg commented May 14, 2025

When it's generating a minidump a failure was happening while calling ilVersion.GetIL(); then we are skipping saving all the rest of the information needed to run successfully the !clrstack command.
As we have others try catches in the code I thought that it's not a problem to add another one, then we will not save the IL correctly because the GetIL will throw an exception in a specific function but the minidump will be useful with a full callstack.

@thaystg thaystg requested review from tommcdon and Copilot May 14, 2025 14:35
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 14, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses a minidump generation issue by wrapping IL version method calls with a try-catch block to ensure that an exception in GetIL doesn’t prevent dumping a full callstack.

  • Wraps GetIL and related ILCodeVersion calls in an exception block
  • Uses EX_CATCH_RETHROW_ONLY_COR_E_OPERATIONCANCELLED to selectively rethrow only specific exceptions

@thaystg thaystg added area-Diagnostics-coreclr and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels May 15, 2025
Copy link
Contributor

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

@thaystg thaystg merged commit 6188ca4 into dotnet:main May 15, 2025
98 checks passed
@thaystg
Copy link
Member Author

thaystg commented May 19, 2025

/backport to release/9.0-staging

@thaystg
Copy link
Member Author

thaystg commented May 19, 2025

/backport to release/8.0-staging

Copy link
Contributor

Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/15121700431

Copy link
Contributor

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/15121702986

tommcdon pushed a commit to tommcdon/runtime that referenced this pull request May 28, 2025
This PR addresses a minidump generation issue by wrapping IL version method calls with a try-catch block to ensure that an exception in GetIL doesn’t prevent dumping a full callstack.

Wraps GetIL and related ILCodeVersion calls in an exception block
Uses EX_CATCH_RETHROW_ONLY_COR_E_OPERATIONCANCELLED to selectively rethrow only specific exceptions
tommcdon pushed a commit to tommcdon/runtime that referenced this pull request May 28, 2025
This PR addresses a minidump generation issue by wrapping IL version method calls with a try-catch block to ensure that an exception in GetIL doesn’t prevent dumping a full callstack.

Wraps GetIL and related ILCodeVersion calls in an exception block
Uses EX_CATCH_RETHROW_ONLY_COR_E_OPERATIONCANCELLED to selectively rethrow only specific exceptions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants