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

Memory leaks on process shutdown #319

Open
delmyers opened this issue Oct 23, 2020 · 1 comment
Open

Memory leaks on process shutdown #319

delmyers opened this issue Oct 23, 2020 · 1 comment
Labels
bug Something isn't working task New feature or request

Comments

@delmyers
Copy link
Contributor

Our ref counting is indicating memory leaks on process shut down.

It looks like this is probably due to a circular reference between App Domains and the Module Infos contained therein. That circular reference is meant to be broken when we get a module unload callback, but that callback is not guaranteed on process shut down. We will likely also leak App Domain references on shut down because I don't think we are guaranteed to get a callback for that either. Essentially, I think all bets are off on callbacks during process exit.

We might need to have better memory leak detection. It probably wouldn't hurt to be a little better about circular references anyway. For example, there is no need to hold a ref-counted reference to the App Domain from the Module Info, since the App Domain should keep it alive.

@delmyers delmyers added bug Something isn't working task New feature or request labels Oct 23, 2020
@jander-msft
Copy link
Member

#142 might make that difficult to write a test with a real runtime if anything is released in the profiler's is deconstructor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working task New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants