Release CordbUnmanagedThread instance from CordbProcess member#66910
Merged
AaronRobinsonMSFT merged 2 commits intodotnet:mainfrom Mar 22, 2022
Merged
Release CordbUnmanagedThread instance from CordbProcess member#66910AaronRobinsonMSFT merged 2 commits intodotnet:mainfrom
CordbUnmanagedThread instance from CordbProcess member#66910AaronRobinsonMSFT merged 2 commits intodotnet:mainfrom
Conversation
The m_lastDispatchedIBEvent was not be cleared during shutdown, which was causing a memory leak assert to fire.
am11
reviewed
Mar 21, 2022
Co-authored-by: Adeel Mujahid <[email protected]>
This was referenced Mar 21, 2022
Member
Author
hoyosjs
approved these changes
Mar 22, 2022
Member
hoyosjs
left a comment
There was a problem hiding this comment.
Feels pretty safe - this is a flush, shutdown, or detach path. Might not mimic the best lifetime for the event being held but can't think of a better place to have it - you need it for other continue events and native event convoys. I couldn't find a case that wouldn't fall in this scenario as long as the debugger impl is checking the shutdown/detach path for interop.
thaystg
pushed a commit
to thaystg/runtime
that referenced
this pull request
Mar 22, 2022
…otnet#66910) * Release CordbUnmanagedThread from CordbProcess member The m_lastDispatchedIBEvent was not being cleared during shutdown, which was causing a memory leak assert to fire. Co-authored-by: Adeel Mujahid <[email protected]>
radekdoulik
pushed a commit
to radekdoulik/runtime
that referenced
this pull request
Mar 30, 2022
…otnet#66910) * Release CordbUnmanagedThread from CordbProcess member The m_lastDispatchedIBEvent was not being cleared during shutdown, which was causing a memory leak assert to fire. Co-authored-by: Adeel Mujahid <[email protected]>
radekdoulik
pushed a commit
to radekdoulik/runtime
that referenced
this pull request
Mar 30, 2022
…otnet#66910) * Release CordbUnmanagedThread from CordbProcess member The m_lastDispatchedIBEvent was not being cleared during shutdown, which was causing a memory leak assert to fire. Co-authored-by: Adeel Mujahid <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #65357
The
m_lastDispatchedIBEventwas not being cleared during shutdown, which was causing a memory leak assert to fire.See
runtime/src/coreclr/debug/di/process.cpp
Lines 8130 to 8148 in c3fa765
I added the clearing in the
NeuterChildren()method because it seemed like the best place. Suggestions on more appropriate places is welcome./cc @dotnet/dotnet-diag