-
Notifications
You must be signed in to change notification settings - Fork 693
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: log and trace processor memory leak #4449
Conversation
95a4774
to
da51419
Compare
Update register_at_fork calls in processors to use weak references Add tests for all processors that us register_at_fork Strong references in register_at_fork persist after the processor objects are deleted. This prevents garbage collection as the reference count for the processor object never drops to 0.
da51419
to
8f0efad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks LGTM! Since there is no way to unregister the actual at fork hook, this still leaks those lambdas but I imagine it's negligible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!
Description
Strong references in
register_at_fork
persist after the processor objects are deleted.This prevents garbage collection as the reference count for the processor object never drops to 0.
Update
register_at_fork
calls in processors to use weak referencesAdd tests for all processors that us
register_at_fork
Fixes #4422
Type of change
How Has This Been Tested?
Does This PR Require a Contrib Repo Change?
Checklist: