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

SageMath WSL2 kernel timed out #3977

Closed
darkl opened this issue Nov 19, 2020 · 6 comments
Closed

SageMath WSL2 kernel timed out #3977

darkl opened this issue Nov 19, 2020 · 6 comments
Labels
bug Issue identified by VS Code Team member as probable bug language-any Area covering general issues geared to supporting any language (not just Python) notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel)

Comments

@darkl
Copy link

darkl commented Nov 19, 2020

Environment data

Version: 1.52.0-insider (user setup)
Commit: a36c68b9ec3d6a0aca9799d7a10be741a6658a51
Date: 2020-11-19T05:37:52.577Z
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19042

I use WSL2 with an Ubuntu-20.04 image.

Expected behaviour

Installed using sudo apt-get install sagemath. I am trying to use VSCode with the remote development extension and make the Jupyter extension use SageMath.

Actual behaviour

I get a Timed out waiting to get a heartbeat from process message.

Steps to reproduce:

  1. Choose Remote-WSL: New Window
  2. Choose Jupyter: Create New Blank Jupyter Notebook
  3. Insert x=3 in the first cell
  4. Execute cell
  5. When prompted "Select a notebook kernel to run this notebook" select SageMath 9.0.

Logs

Note: I set the logs to debug mode by adding this line to settings.json:

"jupyter.logging.level": "debug"

Additional information:

~$ /usr/bin/sage --python --version
Python 3.8.5
~$ /usr/bin/sage --python -m ipykernel --version
7.13.0
~$ /usr/bin/sage --python -m jupyter notebook --version
6.0.3

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

User belongs to experiment group 'NativeNotebookEditor'
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py -c "import jupyter"
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py -c "import jupyter"
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py -c "import notebook"
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py -c "import notebook"
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py jupyter kernelspec --version
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py jupyter kernelspec --version
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /usr/bin/sage --python -m sage.repl.ipython_kernel -f /tmp/tmp-1175bneWkEsS7Qdu.json
cwd: /mnt/c/Users/Elad Zelingher/.vscode-insiders/extensions/ms-vscode-remote.remote-wsl-0.51.3
Error 2020-11-19 14:33:07: Timed out waiting to get a heartbeat from kernel process.
Error 2020-11-19 14:33:07: Failed to connect raw kernel session: Error: Timed out waiting to get a heartbeat from kernel process.
Error 2020-11-19 14:33:07: failed to create INotebook in kernel [Error: Timed out waiting to get a heartbeat from kernel process.
	at m.waitForHeartbeat (/home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:49:646443)]
Error 2020-11-19 14:33:07: DataScience Error [Error: Timed out waiting to get a heartbeat from kernel process.
	at m.waitForHeartbeat (/home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:49:646443)]

@darkl darkl added the bug Issue identified by VS Code Team member as probable bug label Nov 19, 2020
@greazer
Copy link
Member

greazer commented Nov 19, 2020

@darkl , looks like the output you supplied isn't actually debug output. Can you please restart VS Code and generate it again? Thanks!

@greazer greazer added the info-needed Issue requires more information from poster label Nov 19, 2020
@darkl
Copy link
Author

darkl commented Nov 20, 2020

@greazer maybe you can help me, as I'm not able to make it output the debug log. I restarted my VSCode Insiders and still get the same result.

User belongs to experiment group 'NativeNotebookEditor'
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import jupyter"
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import jupyter"
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import notebook"
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import notebook"
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py jupyter kernelspec --version
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py jupyter kernelspec --version
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
Started kernel Python 3
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> /usr/bin/sage --python -m sage.repl.ipython_kernel -f /tmp/tmp-431cKYfsdNGhA9B.json
cwd: /mnt/c/Users/Elad Zelingher/.vscode-insiders/extensions/ms-vscode-remote.remote-wsl-0.51.3
Error 2020-11-19 21:02:53: Timed out waiting to get a heartbeat from kernel process.
Error 2020-11-19 21:02:53: Failed to connect raw kernel session: Error: Timed out waiting to get a heartbeat from kernel process.
Error 2020-11-19 21:02:53: failed to create INotebook in kernel [Error: Timed out waiting to get a heartbeat from kernel process.
	at m.waitForHeartbeat (/home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/out/client/extension.js:49:646441)]
Error 2020-11-19 21:02:53: DataScience Error [Error: Timed out waiting to get a heartbeat from kernel process.
	at m.waitForHeartbeat (/home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/out/client/extension.js:49:646441)]
Error 2020-11-19 21:02:53: Failed to determine if a notebook is active for the current editor [Error: Timed out waiting to get a heartbeat from kernel process.
	at m.waitForHeartbeat (/home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/out/client/extension.js:49:646441)]

My settings.json:
image

Thanks!

@darkl
Copy link
Author

darkl commented Nov 20, 2020

Ok, I just edited the default value of logging.level in the minified JavaScript...
Here's the debug output:

User belongs to experiment group 'NativeNotebookEditor'
Info 2020-11-19 21:14:21: Attempting to start a server because of preload conditions ...
Info 2020-11-19 21:14:21: ZMQ install verified.
Info 2020-11-19 21:14:23: Attempting to start a server because of preload conditions ...
Info 2020-11-19 21:14:23: Searching for kernel based on {} for Untitled-1.ipynb
Info 2020-11-19 21:14:29: Cached data exists getEnvironmentVariables, <No Resource>
Info 2020-11-19 21:14:29: Cached data exists getEnvironmentVariables, <No Resource>
Info 2020-11-19 21:14:29: > /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import jupyter"
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import jupyter"
Info 2020-11-19 21:14:29: > /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import jupyter"
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import jupyter"
Info 2020-11-19 21:14:29: > /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import notebook"
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import notebook"
Info 2020-11-19 21:14:29: > /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import notebook"
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import notebook"
Info 2020-11-19 21:14:29: Cached data exists getEnvironmentVariables, <No Resource>
Info 2020-11-19 21:14:29: > /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
Info 2020-11-19 21:14:29: > /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
Info 2020-11-19 21:14:29: Wrote trust for untitled:Untitled-1.ipynb to /home/elad/.vscode-server-insiders/data/User/globalStorage/ms-toolsai.jupyter/nbsignatures/996297221cd94a1c2edc08996bb59311061afaff107f9247029d1382ef163f4a
Info 2020-11-19 21:14:29: Cached data exists getEnvironmentVariables, <No Resource>
Info 2020-11-19 21:14:29: > /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py jupyter kernelspec --version
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py jupyter kernelspec --version
Info 2020-11-19 21:14:29: > /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py jupyter kernelspec --version
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py jupyter kernelspec --version
Info 2020-11-19 21:14:30: Cached data exists getEnvironmentVariables, <No Resource>
Info 2020-11-19 21:14:30: > /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
Info 2020-11-19 21:14:30: > /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
Info 2020-11-19 21:14:31: Cached data exists getEnvironmentVariables, <No Resource>
Info 2020-11-19 21:14:31: > /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2020-11-19 21:14:31: > /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2020-11-19 21:14:31: > /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2020-11-19 21:14:31: > /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2020-11-19 21:14:31: > /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2020-11-19 21:14:31: > /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /usr/bin/python3 ~/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2020-11-19 21:14:38: Python Daemon (pid: 1066): Execute rpc method prewarm_kernel in DS Daemon
Info 2020-11-19 21:14:38: Python Daemon (pid: 1066): Execute rpc method prewarm_kernel from /usr/bin/python3
Info 2020-11-19 21:14:39: Python Daemon (pid: 1066): Pre-Warm DS Kernel in DS Kernel Launcher Daemon
Info 2020-11-19 21:14:39: Python Daemon (pid: 1066): Exec in DS Kernel Launcher Daemon (observable) ['/usr/bin/python3', '/home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/vscode_datascience_helpers/../pyvsc-run-isolated.py', '/home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/pythonFiles/vscode_datascience_helpers/kernel_prewarm_starter.py']
Info 2020-11-19 21:14:39: Python Daemon (pid: 1066): Exec in DS Kernel Launcher Daemon (observable)
Info 2020-11-19 21:14:39: Python Daemon (pid: 1066): Kernel launched, with PID 1074
Warn 2020-11-19 21:14:39: Python Daemon (pid: 1066): Waiting for Kernel to die 1074
Info 2020-11-19 21:14:39: Python Daemon (pid: 1066): Kernel launched, with PID as a daemon 1074
Info 2020-11-19 21:14:39: Find kernel spec, Class name = C, completed in 15940ms, has a truthy return value, Arg 1: <Uri:Untitled-1.ipynb>, Arg 2: {"language_info":{"name":"python","nbconvert_exporter":"python"},"orig_nbformat":2}, Arg 3: {"_isCancelled":false,"_emitter":null}, Return Value: {"name":"python3","argv":["/usr/bin/python3","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","path":"/usr/bin/python3","specFile":"/usr/share/jupyter/kernels/python3/kernel.json","display_name":"Python 3"}
Info 2020-11-19 21:14:39: Found matching interpreter based on metadata, for the kernel python3, Python 3
Info 2020-11-19 21:14:39: Find kernel spec, Class name = T, completed in 16021ms, has a truthy return value, Arg 1: <Uri:Untitled-1.ipynb>, Arg 2: {"language_info":{"name":"python","nbconvert_exporter":"python"},"orig_nbformat":2}, Arg 3: {"_isCancelled":false,"_emitter":null}, Arg 4: true, Return Value: {"kind":"startUsingKernelSpec","kernelSpec":{"name":"python3","argv":["/usr/bin/python3","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","path":"/usr/bin/python3","specFile":"/usr/share/jupyter/kernels/python3/kernel.json","display_name":"Python 3"},"interpreter":{"architecture":3,"path":"/usr/bin/python3","version":{"options":{"loose":false,"includePrerelease":false},"loose":false,"raw":"3.8.5-final","major":3,"minor":8,"patch":5,"prerelease":["final"],"build":[],"version":"3.8.5-final"},"sysVersion":"3.8.5 (default, Jul 28 2020, 12:59:40) \n[GCC 9.3.0]","sysPrefix":"/usr","fileHash":"8464b0be1e80a9f5648d98be82323dbf525c1354f3056eb948ba039ffe8dfc62b1387fa59ccae4033db6d32be8499dfb81a9e9a0908bd9231ae1372cbd2ac109","envType":"Unknown","displayName":"Python 3.8.5 64-bit"}}
Info 2020-11-19 21:14:57: Execute Cell in KernelProvider.ts
Info 2020-11-19 21:14:57: Creating raw notebook for untitled:Untitled-1.ipynb
Info 2020-11-19 21:14:57: Getting preferred kernel for untitled:Untitled-1.ipynb
Info 2020-11-19 21:14:57: Searching for kernel based on {"name":"sagemath","display_name":"SageMath 9.0"} for Untitled-1.ipynb
Info 2020-11-19 21:14:57: Find kernel spec, Class name = C, completed in 5ms, has a truthy return value, Arg 1: <Uri:Untitled-1.ipynb>, Arg 2: {"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":3},"orig_nbformat":2,"kernelspec":{"name":"sagemath","display_name":"SageMath 9.0"}}, Arg 3: {"_isCancelled":false,"_emitter":null}, Return Value: {"name":"sagemath","argv":["/usr/bin/sage","--python","-m","sage.repl.ipython_kernel","-f","{connection_file}"],"language":"sage","path":"/usr/bin/sage","specFile":"/usr/share/jupyter/kernels/sagemath/kernel.json","display_name":"SageMath 9.0","env":{"SAGE_ROOT":"/usr/share/sagemath","SAGE_LOCAL":"/usr"}}
Info 2020-11-19 21:14:57: Find kernel spec, Class name = T, completed in 58ms, has a truthy return value, Arg 1: <Uri:Untitled-1.ipynb>, Arg 2: {"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":3},"orig_nbformat":2,"kernelspec":{"name":"sagemath","display_name":"SageMath 9.0"}}, Arg 3: {"_isCancelled":false,"_emitter":null}, Arg 4: undefined, Return Value: {"kind":"startUsingKernelSpec","kernelSpec":{"name":"sagemath","argv":["/usr/bin/sage","--python","-m","sage.repl.ipython_kernel","-f","{connection_file}"],"language":"sage","path":"/usr/bin/sage","specFile":"/usr/share/jupyter/kernels/sagemath/kernel.json","display_name":"SageMath 9.0","env":{"SAGE_ROOT":"/usr/share/sagemath","SAGE_LOCAL":"/usr"}}}
Info 2020-11-19 21:14:57: Computing working directory untitled:Untitled-1.ipynb
Info 2020-11-19 21:14:57: Connecting to raw session for untitled:Untitled-1.ipynb
Info 2020-11-19 21:14:57: Cached data exists getEnvironmentVariables, Untitled-1.ipynb
Info 2020-11-19 21:14:57: > /usr/bin/sage --python -m sage.repl.ipython_kernel -f /tmp/tmp-1031owxPNhkIuACZ.json
> /usr/bin/sage --python -m sage.repl.ipython_kernel -f /tmp/tmp-1031owxPNhkIuACZ.json
Info 2020-11-19 21:14:57: cwd: /mnt/c/Users/Elad Zelingher/.vscode-insiders/extensions/ms-vscode-remote.remote-wsl-0.51.3
cwd: /mnt/c/Users/Elad Zelingher/.vscode-insiders/extensions/ms-vscode-remote.remote-wsl-0.51.3
Info 2020-11-19 21:14:58: KernelProcess output: NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049


To connect another client to this kernel, use:
    --existing /tmp/tmp-1031owxPNhkIuACZ.json

Info 2020-11-19 21:14:58: Kernel Output: NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049


To connect another client to this kernel, use:
    --existing /tmp/tmp-1031owxPNhkIuACZ.json

Info 2020-11-19 21:14:58: KernelProcess error: Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3/dist-packages/sage/repl/ipython_kernel/__main__.py", line 3, in <module>
    IPKernelApp.launch_instance(kernel_class=SageKernel)
  File "/usr/lib/python3/dist-packages/traitlets/config/application.py", line 663, in launch_instance
    app.initialize(argv)
  File "<decorator-gen-124>", line 2, in initialize
  File "/usr/lib/python3/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/ipykernel/kernelapp.py", line 562, in initialize
    self.init_kernel()
  File "/usr/lib/python3/dist-packages/ipykernel/kernelapp.py", line 439, in init_kernel
    kernel = kernel_factory(parent=self, session=self.session,
  File "/usr/lib/python3/dist-packages/traitlets/config/configurable.py", line 412, in instance
    inst = cls(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/sage/repl/ipython_kernel/kernel.py", line 51, in __init__
    super(SageKernel, self).__init__(**kwds)
  File "/usr/lib/python3/dist-packages/ipykernel/ipkernel.py", line 64, in __init__
    self.shell = self.shell_class.instance(parent=self,
  File "/usr/lib/python3/dist-packages/traitlets/config/configurable.py", line 412, in instance
    inst = cls(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/IPython/core/interactiveshell.py", line 683, in __init__
    self.init_display_formatter()
  File "/usr/lib/python3/dist-packages/sage/repl/interpreter.py", line 229, in init_display_formatter
    from sage.repl.rich_output.backend_ipython import BackendIPythonNotebook
  File "/usr/lib/python3/dist-packages/sage/repl/rich_output/__init__.py", line 3, in <module>
    from .display_manager import get_display_manager
  File "/usr/lib/python3/dist-packages/sage/repl/rich_output/display_manager.py", line 39, in <module>
    from sage.structure.sage_object import SageObject
  File "/usr/lib/python3/dist-packages/sage/structure/__init__.py", line 2, in <module>
    import sage.structure.element
  File "sage/structure/element.pyx", line 1, in init sage.structure.element (build/cythonized/sage/structure/element.c:33585)
    r"""
  File "sage/structure/sage_object.pyx", line 6, in init sage.structure.sage_object (build/cythonized/sage/structure/sage_object.c:11581)
    from sage.misc.persist import (_base_dumps, _base_save,
  File "sage/misc/persist.pyx", line 43, in init sage.misc.persist (build/cythonized/sage/misc/persist.c:11833)
    from .misc import SAGE_DB
  File "/usr/lib/python3/dist-packages/sage/misc/misc.py", line 104, in <module>
    sage_makedirs(DOT_SAGE)
  File "/usr/lib/python3/dist-packages/sage/misc/misc.py", line 86, in sage_makedirs
    os.makedirs(dirname)
  File "/usr/lib/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/.sage'

Warn 2020-11-19 21:14:58: StdErr from Kernel Process Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3/dist-packages/sage/repl/ipython_kernel/__main__.py", line 3, in <module>
    IPKernelApp.launch_instance(kernel_class=SageKernel)
  File "/usr/lib/python3/dist-packages/traitlets/config/application.py", line 663, in launch_instance
    app.initialize(argv)
  File "<decorator-gen-124>", line 2, in initialize
  File "/usr/lib/python3/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/ipykernel/kernelapp.py", line 562, in initialize
    self.init_kernel()
  File "/usr/lib/python3/dist-packages/ipykernel/kernelapp.py", line 439, in init_kernel
    kernel = kernel_factory(parent=self, session=self.session,
  File "/usr/lib/python3/dist-packages/traitlets/config/configurable.py", line 412, in instance
    inst = cls(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/sage/repl/ipython_kernel/kernel.py", line 51, in __init__
    super(SageKernel, self).__init__(**kwds)
  File "/usr/lib/python3/dist-packages/ipykernel/ipkernel.py", line 64, in __init__
    self.shell = self.shell_class.instance(parent=self,
  File "/usr/lib/python3/dist-packages/traitlets/config/configurable.py", line 412, in instance
    inst = cls(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/IPython/core/interactiveshell.py", line 683, in __init__
    self.init_display_formatter()
  File "/usr/lib/python3/dist-packages/sage/repl/interpreter.py", line 229, in init_display_formatter
    from sage.repl.rich_output.backend_ipython import BackendIPythonNotebook
  File "/usr/lib/python3/dist-packages/sage/repl/rich_output/__init__.py", line 3, in <module>
    from .display_manager import get_display_manager
  File "/usr/lib/python3/dist-packages/sage/repl/rich_output/display_manager.py", line 39, in <module>
    from sage.structure.sage_object import SageObject
  File "/usr/lib/python3/dist-packages/sage/structure/__init__.py", line 2, in <module>
    import sage.structure.element
  File "sage/structure/element.pyx", line 1, in init sage.structure.element (build/cythonized/sage/structure/element.c:33585)
    r"""
  File "sage/structure/sage_object.pyx", line 6, in init sage.structure.sage_object (build/cythonized/sage/structure/sage_object.c:11581)
    from sage.misc.persist import (_base_dumps, _base_save,
  File "sage/misc/persist.pyx", line 43, in init sage.misc.persist (build/cythonized/sage/misc/persist.c:11833)
    from .misc import SAGE_DB
  File "/usr/lib/python3/dist-packages/sage/misc/misc.py", line 104, in <module>
    sage_makedirs(DOT_SAGE)
  File "/usr/lib/python3/dist-packages/sage/misc/misc.py", line 86, in sage_makedirs
    os.makedirs(dirname)
  File "/usr/lib/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/.sage'

Info 2020-11-19 21:14:58: KernelProcess Exit Exit - 1
Error 2020-11-19 21:14:58: Disposing session as kernel process died ExitCode: 1, Reason: undefined
Error 2020-11-19 21:14:58: Failed to connect raw kernel session: Error: Canceled
Info 2020-11-19 21:14:58: Shutdown session -- complete
Error 2020-11-19 21:14:58: failed to create INotebook in kernel [Error: Canceled
	at t.KernelShellFutureHandler.dispose (/home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/out/client/extension.js:32:482268)
	at /home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/out/client/extension.js:47:791737
	at Map.forEach (<anonymous>)
	at g._clearState (/home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/out/client/extension.js:47:791680)
	at g.dispose (/home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/out/client/extension.js:47:785428)
	at /home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/out/client/extension.js:32:264587
	at Object.t.swallowExceptions (/home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/out/client/extension.js:1:132614)
	at l.dispose (/home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/out/client/extension.js:32:264549)
	at t.RawSession.dispose (/home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/out/client/extension.js:49:187286)
	at processTicksAndRejections (internal/process/task_queues.js:94:5)]
Error 2020-11-19 21:14:58: DataScience Error [Error: Canceled
	at t.KernelShellFutureHandler.dispose (/home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/out/client/extension.js:32:482268)
	at /home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/out/client/extension.js:47:791737
	at Map.forEach (<anonymous>)
	at g._clearState (/home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/out/client/extension.js:47:791680)
	at g.dispose (/home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/out/client/extension.js:47:785428)
	at /home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/out/client/extension.js:32:264587
	at Object.t.swallowExceptions (/home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/out/client/extension.js:1:132614)
	at l.dispose (/home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/out/client/extension.js:32:264549)
	at t.RawSession.dispose (/home/elad/.vscode-server-insiders/extensions/ms-toolsai.jupyter-2020.11.372831992/out/client/extension.js:49:187286)
	at processTicksAndRejections (internal/process/task_queues.js:94:5)]

@darkl
Copy link
Author

darkl commented Nov 20, 2020

The error seems to be related to this issue. I guess it has to do with the fact that we see the lines of the form Info 2020-11-19 21:14:57: cwd: /mnt/c/Users/Elad Zelingher/.vscode-insiders/extensions/ms-vscode-remote.remote-wsl-0.51.3. Is there any way to make the cwd be the home directory for instance?

@IanMatthewHuff
Copy link
Member

Yeah that linked WSL issue does look related. Might have to change how we start up in the WSL situation.

@DonJayamanne DonJayamanne added the notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel) label Jan 4, 2021
@rchiodo rchiodo removed the info-needed Issue requires more information from poster label Feb 18, 2021
@IanMatthewHuff IanMatthewHuff removed their assignment Apr 5, 2021
@greazer greazer added the language-any Area covering general issues geared to supporting any language (not just Python) label Aug 4, 2021
@DonJayamanne
Copy link
Contributor

Should be fixed with #7063
Closing as a duplicate

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 13, 2022
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 language-any Area covering general issues geared to supporting any language (not just Python) notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel)
Projects
None yet
Development

No branches or pull requests

5 participants