python kernel still up after closing VSCode if extension host is on a linux machine
See original GitHub issueEnvironment data
- VS Code version: 1.54.3
- Jupyter Extension version (available under the Extensions sidebar): v2021.3.619093157
- Python Extension version (available under the Extensions sidebar): v2021.3.658691958
- OS (Windows | Mac | Linux distro) and version: 20.04
- Python and/or Anaconda version: Python 3.8.5 /conda 4.9.2
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
- Jupyter server running: Local
Expected behaviour
Close python kernel.
Actual behaviour
Python kernel’s still up.
Steps to Reproduce:
- Open an ipython notebook
- Type the following
import torch
a = torch.ones((1,)).cuda()
- Close VSCode
- Open terminal
- nvidia-smi
- Check if any python process is consuming GPU memory
Gif:
Logs
N/A
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (13 by maintainers)
Top Results From Across the Web
jupyter server : not started, no kernel in vs code - Stack Overflow
It seems that new dependencies came up with the latest update of python, which are not installed. For me this was pygments: jupyter-console...
Read more >Remote Development FAQ - Visual Studio Code
Remote Development FAQ. This article covers frequently asked questions for each of the Visual Studio Code Remote Development extensions.
Read more >Extension Host - Visual Studio Code
The Visual Studio Code Extension Host is responsible for managing extensions and ensuring the stability and performance of Visual Studio Code.
Read more >Visual Studio Code June 2022
When closing the merge editor or accepting the merge, a warning is shown if not all conflicts have been addressed. The merge editor...
Read more >Working with Jupyter Notebooks in Visual Studio Code
Connect to a remote Jupyter server; Debug a Jupyter Notebook. Setting up your environment. To work with Python in Jupyter Notebooks, you must...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The same thing is happening on my machine (Ubuntu 21.04), but it’s not limited to processes on the GPU.
I am only using interactive windows, but I suspect it’s the same issue.
Right now, when you run an interactive window, there will be 5 python processes, 2 of them being related to the kernel and 3 helpers. If you exit VS Code, it will shut down the 3 helper processes, but the 2 kernel processes will remain open. However, if you close the interactive window, VS code will shut down the kernel processes just fine (while the 3 helper processes remain). So the current work around for me is to first close the interactive window and only then close VS code.
@goncamateus, we’ve made some significant changes to our notebook support. Can you try this scenario in VS Code insiders to see if it still repros?