-
Notifications
You must be signed in to change notification settings - Fork 300
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
Python processes still running after closing VSCode #11018
Comments
Thanks for the issue. Do you have some example code that repros the problem? |
My only guess as to how this might be a VS code issue is that we don't wait for the kernel to shutdown on exit. We just kill the kernel. Jupyter may be waiting for shutdown. The way to verify that would be to kill the jupyter server (when using just jupyter) and see if the processes leak there too. |
Thanks for the quick reply. This is a short example that can be used to reproduce the problem:
|
Thanks that helps. I'm reproing. The processes don't die during shutdown in VS code but do in Jupyter regardless of whether or not I kill them in the UI or just shutdown jupyter altogether. |
Applies To
What happened?
I am running a Python script with GridSearchCV and n_jobs > 1. This spawns N threads. After closing VSCode, these threads remain in memory.
This only happens with the Jupyter extension for VSCode (Interactive Window / .ipynb files). If I run the script in Terminal ("Run Python File in Terminal") or directly in Jupyter Notebook (outside of VSCode), the threads are closed properly.
I have tried some suggestions on similar issues (#5485, #1626, microsoft/vscode-python #19347, conda/conda #11569, microsoft/vscode #72769, scikit-learn/scikit-learn #12817) but none have worked for me.
Before closing VSCode
After closing VSCode
VS Code Version
1.69.2
Jupyter Extension Version
v2022.6.1201981810
Jupyter logs
Coding Language and Runtime Version
Python 3.9.12
Language Extension Version (if applicable)
v2022.10.1
Anaconda Version (if applicable)
conda 4.12.0
Running Jupyter locally or remotely?
Local
The text was updated successfully, but these errors were encountered: