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

Eliminate unnecessary Python reloading which causes memory leaks. #827

Merged
merged 6 commits into from
Jun 29, 2023

Conversation

rcmcdonald91
Copy link
Contributor

Reloading the Python interpreter for every HUP/reload is unnecessary. Python does not handle this very well and leaks memory.

@rcmcdonald91
Copy link
Contributor Author

This work also tipped me off to the lack of inplace callback cleanup in the python module. That has been corrected too

@rcmcdonald91
Copy link
Contributor Author

@wcawijngaards I hate to ping directly, but some visibility to this would be appreciated. Thanks :)

Copy link
Member

@gthess gthess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good, thanks!
I have some feedback and would need to do some local testing but this could be part of the next release.

pythonmod/pythonmod.c Outdated Show resolved Hide resolved
pythonmod/pythonmod.c Outdated Show resolved Hide resolved
pythonmod/pythonmod.c Outdated Show resolved Hide resolved
pythonmod/pythonmod.c Outdated Show resolved Hide resolved
@gthess gthess self-assigned this Feb 24, 2023
@gthess gthess added this to the 1.18.0 milestone Feb 24, 2023
Copy link
Member

@gthess gthess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with further testing! Valgrind at least locally stopped reporting the leaks.

@gthess gthess merged commit 380e3de into NLnetLabs:master Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants