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/7.0-rc1] Fix leak caused by not disposing the scoped parent service provider #74362

Merged
merged 2 commits into from
Aug 22, 2022

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 22, 2022

Backport of #74261 to release/7.0-rc1

/cc @tarekgh

Customer Impact

In Dependency Injection, when retrieving the IServiceProvider service and disposing it, it will not dispose the parent container which causes a memory leak. Users of HubConnection in SignalR already experienced and reported this issue as indicated in the issue #73832

Testing

Have passed all CI and regression tests. And manually confirmed it fixes the memory leak.

Risk

Fairly low risk. The change started to dispose the Service Provider object that is supposed to be disposed. The break here is minimal as no-one supposes to use this disposed object and even users can use this disposed object to create a Singlton service.

@ghost
Copy link

ghost commented Aug 22, 2022

Tagging subscribers to this area: @dotnet/area-extensions-dependencyinjection
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #74261 to release/7.0-rc1

/cc @tarekgh

Customer Impact

Testing

Risk

IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.

Author: github-actions[bot]
Assignees: -
Labels:

area-Extensions-DependencyInjection

Milestone: -

@tarekgh tarekgh added this to the 7.0.0 milestone Aug 22, 2022
@tarekgh tarekgh self-assigned this Aug 22, 2022
@tarekgh tarekgh requested a review from eerhardt August 22, 2022 17:49
@tarekgh
Copy link
Member

tarekgh commented Aug 22, 2022

CC @davidfowl

@danmoseley
Copy link
Member

Approved, reliability, customer reported, likely servicing candidate

@carlossanlop
Copy link
Member

CI failure is a timeout.
Approved and signed off.
Ready to merge. :shipit:

@carlossanlop carlossanlop merged commit d8e8436 into release/7.0-rc1 Aug 22, 2022
@carlossanlop carlossanlop deleted the backport/pr-74261-to-release/7.0-rc1 branch August 22, 2022 20:25
@ghost ghost locked as resolved and limited conversation to collaborators Sep 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants