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/8.0] Fix handling exceptions on shutdown #101915

Conversation

janvorli
Copy link
Member

@janvorli janvorli commented May 6, 2024

Another partial backport of #100293 to release/8.0

Customer Impact

A recent partial backport of a change to enable propagating exceptions on shutdown was missing two places in the code that were under a different condition than the global exception handling disabling that was removed. I must have made a mistake when testing that change (not setting watson registry settings properly or using a stale build). This change makes it work correctly.
During the runtime shutdown, we stop handling exceptions at all and we also prevent entering EE at few places. A customer has hit an issue with Watson dump being generated from a .NET app on every machine reboot due to that. That app was a networking app that was listening on a socket. Shutdown of the app resulted in a SocketException being thrown, but the exception handling was prevented and so the exception was reported as an unhandled exception which caused the dump to be taken.

Testing

CI testing, local testing of a case equivalent to what the customer had - a grpc running as a service. Without the fix the issue reported by the customer can be reproduced, with the fix it is gone.

Risk

Low - the change just enables exceptions handling during shutdown. So where previously the app would crash with an unhandled exception, it will now get proper handling of that exception upto the point the process is torn down by the OS.

A recent partial backport of a change to enable propagating exceptions
on shutdown was missing two places in the code that were under a
different condition than the global exception handling disabling that
was removed. I must have made a mistake when testing that change (not
setting watson registry settings properly or using a stale build).
This change makes it work correctly.
@janvorli janvorli added Servicing-consider Issue for next servicing release review area-ExceptionHandling-coreclr labels May 6, 2024
@janvorli janvorli added this to the 8.0.x milestone May 6, 2024
@janvorli janvorli requested a review from jkotas May 6, 2024 12:38
@janvorli janvorli self-assigned this May 6, 2024
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. please get a code review

@leecow leecow added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels May 21, 2024
@leecow leecow modified the milestones: 8.0.x, 8.0.7 May 21, 2024
@jeffschwMSFT jeffschwMSFT merged commit 188b412 into dotnet:release/8.0-staging Jun 10, 2024
111 of 115 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 11, 2024
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.

5 participants