-
Notifications
You must be signed in to change notification settings - Fork 199
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
type_inference_provider does not properly clean up child processes on timeout #472
Comments
Easiest way to repro is probably to add a fake |
@zsol that is a great idea, I got something working before I noticed it though: <test_libcst.py>
And running with: Triggers the warning like:
Which leads to a zombie process like: |
If the subprocess call to in
type_inference_provider
times out the child processes do not get immediately cleaned up:When running over a large directory a new process is spawned per path so this can become problematic for scaling.
I believe the processes don't get killed by the
TimeoutExpired
being raised becauseshell=True
is in use (LibCST/libcst/metadata/type_inference_provider.py
Line 106 in 27ef2bf
StackOverflow suggests it's because the blocking process is a child of the shell process (https://stackoverflow.com/questions/48763362/python-subprocess-kill-with-timeout).
I'm trying to get a repro of this externally but haven't done so yet.
I plan to work on this, but am opening the issue for discussion and tracking.
The text was updated successfully, but these errors were encountered: