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

VS Code spawn unneeded kernels that cannot be killed from Jupyter #4442

Closed
tkorach opened this issue Jan 21, 2021 · 1 comment
Closed

VS Code spawn unneeded kernels that cannot be killed from Jupyter #4442

tkorach opened this issue Jan 21, 2021 · 1 comment
Labels
bug Issue identified by VS Code Team member as probable bug notebook-remote Applies to remote Jupyter Servers

Comments

@tkorach
Copy link

tkorach commented Jan 21, 2021

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]

  1. Install VS Code Python extensions.
  2. Set up remote Jupyter server to a remote server (even one running on localhost).
  3. On the Jupyter kernel, create a notebook named "A.ipynb"
  4. In a Python text file, type ctrl+shift+P
  5. Choose "create interactive window".
  6. Click on the kernel chooser and switch to "A.ipynb".
  7. Click again on the kernel chooser.
  8. Many kernels will be listed, most of them not active.
  9. Browse to the web console of the jupyter server.
  10. Click on "running" - only A.ipynb is listed.

image

Logs

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Jan 21, 2021
@greazer greazer added the bug Issue identified by VS Code Team member as probable bug label Jul 8, 2021
@greazer greazer added the notebook-remote Applies to remote Jupyter Servers label Aug 4, 2021
@IanMatthewHuff
Copy link
Member

Closing as I believe that the extra kernels are no longer generated. Just ping back if you are still seeing them.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug notebook-remote Applies to remote Jupyter Servers
Projects
None yet
Development

No branches or pull requests

3 participants