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

ProcDict leak in trace handler #105

Open
gomoripeti opened this issue Nov 2, 2017 · 1 comment
Open

ProcDict leak in trace handler #105

gomoripeti opened this issue Nov 2, 2017 · 1 comment

Comments

@gomoripeti
Copy link
Collaborator

The trace handler process stores start time and arguments for each function call in its process dictionary so that it can fetch it when the function returns. However it is possible that the function finished event (return_from or exception_from) never returns. (Eg. the function does an infinite loop or calls another function that does that. Or the process executing the function exits/gets killed without crashing)

One idea is to garbage collect such entries from the procdict removing those older than max_duration.

@gomoripeti
Copy link
Collaborator Author

gomoripeti commented Nov 2, 2017

Actually if the process exits or is killed then an exception_from message will still be received. So the only problem is with infinite loops. But that's also only when ignore_recursion is false or there are growing number of processes with infinite loops in the system.
On the other hand, tracing can affect tail recursive calls negatively (citation needed) so it's better to avoid them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant