Skip to content
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

[release/6.0] Always generate metadata for dynamic methods #77322

Merged

Conversation

tommcdon
Copy link
Member

@tommcdon tommcdon commented Oct 21, 2022

We have had multiple customer and partner team reports of the following error in Visual Studio while attempting to attach to a .NET 6 process:

image

Customer and partner reports include: #69841, "The application is in break mode" despite hitting resolved breakpoint, and #62977. We have also had internal teams reach out to us via email encountering this problem.

The root issue is described in #62977. This is an unintended side effect of #57069. As it stands now we won't generate metadata for dynamic modules unless a debugger is attached. Without the metadata, the .NET debugging services API is unable to walk the stack resulting in the error in VS shown above.

Customer Impact

Customers attaching to their process after a dynamic method has been created can trigger this error. We have seen this reproduce with F5 debugging on Azure Functions Visual Studio projects as well as customers using Debug->Attach dialog in VS.

Risk

Very low as it restores the original behavior before #57069 for debugger metadata generation for dynamic methods.

Testing

This fix is a backport of #72315 and has been manually tested/verified by internal partner teams with private 6.0 builds backporting this fix.

@tommcdon tommcdon added Servicing-consider Issue for next servicing release review area-Diagnostics-coreclr labels Oct 21, 2022
@tommcdon tommcdon added this to the 6.0.x milestone Oct 21, 2022
@tommcdon tommcdon self-assigned this Oct 21, 2022
@ghost
Copy link

ghost commented Oct 21, 2022

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

Issue Details

We have had multiple customer and partner team reports of the following error in Visual Studio while attempting to attach to a .NET 6 process:

image

Customer and partner reports include: #69841, "The application is in break mode" despite hitting resolved breakpoint, and #62977 for examples. We have also had internal teams reach out to us via email encountering this problem.

The root issue is described in #62977. This is an unintended side effect of #57069. As it stands now we won't generate metadata for dynamic modules unless a debugger is attached. Without the metadata, the .NET debugging services API is unable to walk the stack resulting in the error in VS shown above.

Customer Impact

Customers attaching to their process after a dynamic method has been created can trigger this error. We have seen this reproduce with Azure Functions as well as customers using Debug->Attach dialog in VS.

Risk

Very low as it restores the original behavior before #57069 for debugger metadata generation for dynamic methods.

Testing

This fix is a backport of #72315 and has been manually tested/verified by internal partner teams with private 6.0 builds backporting this fix.

Author: tommcdon
Assignees: tommcdon
Labels:

Servicing-consider, area-Diagnostics-coreclr

Milestone: 6.0.x

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.

approved. please take a look at the failing ci and we will take for consideration in 6.

@tommcdon
Copy link
Member Author

Verified the CI failure is not related to this change

@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Oct 25, 2022
@rbhanda rbhanda modified the milestones: 6.0.x, 6.0.12 Oct 25, 2022
@carlossanlop
Copy link
Member

CI failure seems to be this unrelated problem: #74328

Approved by Tactics. Signed off. No OOB package authoring changes needed. Ready to merge. :shipit:

@carlossanlop carlossanlop merged commit a53eb8c into dotnet:release/6.0 Nov 3, 2022
@dotnet dotnet locked as resolved and limited conversation to collaborators Dec 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants