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

Don't dispose timers if we're in our UnhandledException handler. #104828

Conversation

StephenMolloy
Copy link
Member

  • Description -
    Timer was updated in 5.0 to improve performance, but is prone to deadlocks when manipulated in an unhandled exception handler. Which MemoryCache does. And MemoryCache is probably more likely to witness unhandled exceptions like OOM than typical code.
  • Customer Impact - The deadlock is preventing a first-party team (Exchange/Substrate) from migrating to .Net 6 and 8.
  • Regression? - From NetFx, yes.
  • Risk Low.

Original Issue: #64115 (and #102666)
.Net 9.0 PR: #103937

System.Runtime.Caching is an OOB package that ships alongside the runtime.

@carlossanlop
Copy link
Member

@StephenMolloy This needs to target the release/8.0-staging branch, not the release/8.0 branch directly. Can you please make the change? Make sure the branch switch doesn't accidentally bring in unrelated commits.

@carlossanlop
Copy link
Member

Because this change affects an OOB package:

You'll also have to follow these instructions to enable building the package: https://github.com/dotnet/runtime/blob/main/docs/project/library-servicing.md#check-if-a-package-is-generated

OOB assemblies don't get built by default in servicing branches.

Copy link
Member

@carlossanlop carlossanlop left a comment

Choose a reason for hiding this comment

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

OOB

@StephenMolloy StephenMolloy changed the base branch from release/8.0 to release/8.0-staging July 16, 2024 16:19
@StephenMolloy StephenMolloy force-pushed the bp8_64115_Memcache-UnhandledEx-Timer-Deadlock branch from 2e4661c to 43a164f Compare July 16, 2024 18:16
Copy link
Member

@carlossanlop carlossanlop left a comment

Choose a reason for hiding this comment

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

Thanks. OOB changes look good.

@carlossanlop carlossanlop self-requested a review July 16, 2024 18:24
@StephenMolloy
Copy link
Member Author

Closed in favor of #106221

@github-actions github-actions bot locked and limited conversation to collaborators Sep 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Runtime.Caching Servicing-consider Issue for next servicing release review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants