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 memory leak in the async_local_storage scope manager #1134

Merged
merged 1 commit into from
Oct 23, 2020

Conversation

rochdev
Copy link
Member

@rochdev rochdev commented Oct 23, 2020

What does this PR do?

Fix memory leak in the async_local_storage scope manager.

Motivation

There is a bug in AsyncLocalStorage where enterWith may be called while in the callback of exit, causing the storage instance to be re-added to the internal storage list. This slows down the application continuously until it's no longer able to respond to requests. A fix will need to be done in Node, but in the meantime we can simply remove our call to exit since it was just an optimization that is unnecessary.

Fixes #1133

@rochdev rochdev added bug Something isn't working core labels Oct 23, 2020
@rochdev rochdev added this to the 0.28.0 milestone Oct 23, 2020
@rochdev rochdev requested a review from a team as a code owner October 23, 2020 15:52
@rochdev rochdev merged commit 7a7c504 into master Oct 23, 2020
@rochdev rochdev deleted the fix-async-local-storage-exit-leak branch October 23, 2020 16:10
@rochdev
Copy link
Member Author

rochdev commented Oct 23, 2020

Fix in Node: nodejs/node#35779

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

Successfully merging this pull request may close these issues.

Upgrading to 0.27.0 leaks mongodb connections
2 participants