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

Fix DiagnosticListener memory leak #16046

Merged
merged 1 commit into from
Jun 12, 2019
Merged

Conversation

roji
Copy link
Member

@roji roji commented Jun 12, 2019

When IsConfigured is called, it applies all services. This caused a DiagnosticListener to get instantiated on each DbContext instantiation, and since it wasn't disposed it caused a leak.

Fixes #15173

When IsConfigured is called, it applies all services. This caused a
DiagnosticListener to get instantiated on each DbContext instantiation,
and since it wasn't disposed it caused a leak.

Fixes #15173
@roji roji mentioned this pull request Jun 12, 2019
@ajcvickers
Copy link
Member

@roji Can you please prepare a PR for the 2.2 branch, but don't merge anything.

@dougbu @JunTaoLuo @natemcmaster Just a heads-up that we're going to be bring a 2.2 patch for this to shiproom on Tuesday.

/cc @divega @Pilchie FYI: This is a pretty bad memory leak; we need to patch. Also, leak does not happen on 2.1, so no need to consider patching there.

@roji roji merged commit 5fc73a3 into master Jun 12, 2019
@ghost ghost deleted the DiagnosticListenersEverywhere branch June 12, 2019 14:59
@roji
Copy link
Member Author

roji commented Jun 12, 2019

@ajcvickers done, PR for 2.2: #16047

@ErikEJ
Copy link
Contributor

ErikEJ commented Jun 12, 2019

@roji Would removing the call to IsConfigured work around / get rid of the leak?

@roji
Copy link
Member Author

roji commented Jun 12, 2019

@ErikEJ yes, that is the current workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory leak
3 participants