VS Code spawn unneeded kernels that cannot be killed from Jupyter
tkorach opened this issue · 1 comments
Environment data
- VS Code version: 1.52.1
- Extension version (available under the Extensions sidebar): v2020.12.424452561
- OS and version: Windows 10, Ubuntu 20.04
- Python version (& distribution if applicable, e.g. Anaconda): 3.8, Anaconda
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
- Relevant/affected Python packages and their versions: Jupyter
Name Version Build Channel
jupyter 1.0.0 py38_7
jupyter_client 6.1.7 py_0
jupyter_console 6.2.0 py_0
jupyter_core 4.7.0 py38h06a4308_0
jupyterlab 2.2.6 py_0
jupyterlab_pygments 0.1.2 py_0
jupyterlab_server 1.2.0 py_0
- Relevant/affected Python-related VS Code extensions and their versions: Python v2020.12.424452561
- Value of the
python.languageServer
setting: Microsoft
[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'
), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]
Expected behaviour
VS Code Python extension does not spawn unneeded kernels, and allows the user to close them.
Actual behaviour
Whenever the user runs "create interactive window" a new Jupyter kernel is spawned, even if the user wants to resume an existing kernel (e.g. one running as a notebook on the Jupyter server). These ghost kernels are not listed in the server UI console or the CLI console, and cannot be killed, leading to clutter and resource leakage.
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
- Install VS Code Python extensions.
- Set up remote Jupyter server to a remote server (even one running on localhost).
- On the Jupyter kernel, create a notebook named "A.ipynb"
- In a Python text file, type ctrl+shift+P
- Choose "create interactive window".
- Click on the kernel chooser and switch to "A.ipynb".
- Click again on the kernel chooser.
- Many kernels will be listed, most of them not active.
- Browse to the web console of the jupyter server.
- Click on "running" - only A.ipynb is listed.
Logs
Closing as I believe that the extra kernels are no longer generated. Just ping back if you are still seeing them.