question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Kernel dies after interruption

See original GitHub issue

Environment data

  • VS Code version: 1.64.0
  • Jupyter Extension version: v2022.1.1001775990
  • Python Extension version: v2022.0.1786462952
  • OS and version: Windows_NT x64 10.0.19043
  • Python and/or Anaconda version: Python 3.9.7 & conda 4.10.3
  • Type of virtual environment used: Anaconda
  • Jupyter server running: Local

Actual behaviour

If I interrupt a running cell the kernel dies.

Logs

Info 12:16:25: Interrupt kernel execution
Info 12:16:25: Cancel pending cells
Info 12:16:25: Interrupting kernel: python396jvsc74a57bd0434ef728c16ae87739179d593b2a5ca7a96305c1d5164569cdfc0df7f6e276d2
Info 12:16:25: Interrupting kernel via Signals
Info 12:16:25: Cell 2 executed with state Idle
(...)
Info 12:16:25: Cell 46 executed with state Idle
Error 12:16:25: Disposing session as kernel process died ExitCode: 1, Reason: C:\Users\Usuario\.conda\envs\pytorch-gpu\lib\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.
  warn(
C:\Users\Usuario\.conda\envs\pytorch-gpu\lib\site-packages\traitlets\traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '8882db69-05a2-414a-8d0d-22b603cc4ebf' instead of 'b"8882db69-05a2-414a-8d0d-22b603cc4ebf"'.
  warn(

Info 12:16:25: Dispose Kernel process
Error 12:16:25: Raw kernel process exited code: 1
Error 12:16:25: Error in waiting for cell to complete [Error: Canceled future for execute_request message before replies were done
	at t.KernelShellFutureHandler.dispose (c:\Users\Usuario\.vscode\extensions\ms-toolsai.jupyter-2022.1.1001775990\out\client\extension.js:51:432353)
	at c:\Users\Usuario\.vscode\extensions\ms-toolsai.jupyter-2022.1.1001775990\out\client\extension.js:66:307599
	at Map.forEach (<anonymous>)
	at y._clearKernelState (c:\Users\Usuario\.vscode\extensions\ms-toolsai.jupyter-2022.1.1001775990\out\client\extension.js:66:307585)
	at y.dispose (c:\Users\Usuario\.vscode\extensions\ms-toolsai.jupyter-2022.1.1001775990\out\client\extension.js:66:301017)
	at c:\Users\Usuario\.vscode\extensions\ms-toolsai.jupyter-2022.1.1001775990\out\client\extension.js:51:194444
	at t.swallowExceptions (c:\Users\Usuario\.vscode\extensions\ms-toolsai.jupyter-2022.1.1001775990\out\client\extension.js:16:2495)
	at dispose (c:\Users\Usuario\.vscode\extensions\ms-toolsai.jupyter-2022.1.1001775990\out\client\extension.js:51:194423)
	at t.RawSession.dispose (c:\Users\Usuario\.vscode\extensions\ms-toolsai.jupyter-2022.1.1001775990\out\client\extension.js:113:303296)
	at processTicksAndRejections (internal/process/task_queues.js:93:5)]
Info 12:16:25: Cancel all remaining cells true || Success
Info 12:16:25: Cancel pending cells
Info 12:16:25: Cell 0 executed with state Success

Seems to have something to do with traitlets? I guess downgrading to traitlets<5 would do the trick.

edit: typo

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
rchiodocommented, Apr 13, 2022

Yes this issue has been fixed. This issue was related to interrupting on windows. Can you open another issue?

1reaction
rchiodocommented, Feb 7, 2022

I believe this was caused by the removal of the special code in the daemon to handle interrupting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

R notebook kernel dies when interrupted in Data Science ...
I'm using R notebooks on Data Science Experience, backed by an Apache Spark service. When I select "Kernel -> Interrupt" while executing a...
Read more >
The kernel appears to have died. It will restart automatically ...
Apologies for the audio distortion in the beginning of the video: I am a robot.In this video, I'll show you how to fix...
Read more >
R Notebook Kernel Dies When Interrupted In Data ... - ADocLib
Kernel died with exit code 1VS code 1.The best way to keep Jupyter within Data Scientist Workbench healthy is to stop any running...
Read more >
Messaging in Jupyter — jupyter_client 7.4.8 documentation
When the clients detect a dead kernel thanks to inactivity on the heartbeat socket, they simply send a forceful process termination signal, since...
Read more >
Kernel Died error post installing tensorflow - Apple Developer
Each time after I did this, my Jupyter notebook kernel would not work. The laptop I use is MacBook Pro 2021. —. yus002....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found