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

Jupyter Notebook hangs up dead with no feedback in SSH Remote Development #15836

Open
1 of 2 tasks
htkg opened this issue Jul 9, 2024 · 0 comments
Open
1 of 2 tasks
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@htkg
Copy link

htkg commented Jul 9, 2024

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

When using Jupyter Notebook in an SSH Remote Development setup, the following issues occur after approximately 5 minutes of use:

Prerequisites

  1. Remote connection established via Tailscale VPN to a VPS.
  2. New .ipynb file created and opened.
  3. Several code cells added to the notebook.

Observed Issues:

  1. Notebook Unresponsiveness: Attempting to execute a cell causes the entire notebook to freeze. The only resolution is to "Reload Window."
  2. Pylance Failure: Pylance extension ceases to function.
  3. JSON Parsing Error: All cells display the following error message:
    "Expected a Jupyter Notebook, which must be internally stored as JSON, but this file isn't valid JSON: expected value at line 1 column 1"

These issues consistently arise after approximately 5 minutes of active use, rendering the Jupyter Notebook environment unusable and requiring a full window reload.

VS Code Version

1.91.0

Jupyter Extension Version

v2024.6.0

Jupyter logs

13:56:14.215 [debug] Handle Execution of Cells 0 for ~/projects/~-dev/oai_service.ipynb
13:56:14.225 [debug] Kernel acknowledged execution of cell 0 @ 1720522574224
13:56:42.365 [info] Disposing request as the cell (2) was deleted ~/projects/~-dev/oai_service.ipynb
13:56:42.365 [debug] Disposing kernel associated with ~/projects/~-dev/oai_service.ipynb, isClosed=true
13:56:42.365 [info] Dispose Kernel '~/projects/~-dev/oai_service.ipynb' associated with '~/projects/~-dev/oai_service.ipynb'
13:56:42.365 [debug] Cancel pending cells
13:56:42.366 [debug] Shutdown session 7a7d86b4-9b19-4fa8-a292-4d1b2e5a4dc4, .jvsc74a57bd0bdb88f3e940ffb7b55604193ab3c6c8690e5a93877cab7d2141508066a70521d./home/~/projects/~-dev/.venv/python./home/~/projects/~-dev/.venv/python.-m#ipykernel_launcher - start called from Error: 
	at E_.shutdown (/home/~/.vscode-server/extensions/ms-toolsai.jupyter-2024.6.0-linux-x64/dist/extension.node.js:304:1140)
	at E_.dispose (/home/~/.vscode-server/extensions/ms-toolsai.jupyter-2024.6.0-linux-x64/dist/extension.node.js:304:623)
	at Ss (/home/~/.vscode-server/extensions/ms-toolsai.jupyter-2024.6.0-linux-x64/dist/extension.node.js:115:867)
	at e (/home/~/.vscode-server/extensions/ms-toolsai.jupyter-2024.6.0-linux-x64/dist/extension.node.js:285:31789)
	at YD.dispose (/home/~/.vscode-server/extensions/ms-toolsai.jupyter-2024.6.0-linux-x64/dist/extension.node.js:285:32034)
	at my.disposeOldKernel (/home/~/.vscode-server/extensions/ms-toolsai.jupyter-2024.6.0-linux-x64/dist/extension.node.js:285:23341)
	at my.<anonymous> (/home/~/.vscode-server/extensions/ms-toolsai.jupyter-2024.6.0-linux-x64/dist/extension.node.js:285:21548)
	at n.value (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:166:20994)
	at r.B (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:83:737)
	at r.C (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:83:807)
	at r.fire (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:83:1023)
	at p.$acceptDocumentAndEditorsDelta (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:161:9554)
	at S (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:153:5986)
	at S.Q (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:153:5752)
	at S.M (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:153:4778)
	at S.L (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:153:3830)
	at n.value (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:153:2297)
	at r.B (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:83:737)
	at r.fire (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:83:954)
	at o.fire (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:108:14502)
	at n.value (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:179:8639)
	at r.B (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:83:737)
	at r.fire (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:83:954)
	at o.fire (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:108:14502)
	at f.z (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:108:17638)
	at n.value (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:108:16019)
	at r.B (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:83:737)
	at r.fire (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:83:954)
	at m.acceptChunk (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:108:12248)
	at /home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:108:11518
	at Socket.v (/home/~/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/out/vs/workbench/api/node/extensionHostProcess.js:176:14266)
	at Socket.emit (node:events:518:28)
	at addChunk (node:internal/streams/readable:559:12)
	at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
	at Readable.push (node:internal/streams/readable:390:5)
	at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
13:56:42.367 [debug] Dispose Kernel process 170469.
13:56:42.371 [debug] Kernel got disposed, hence there is no longer a kernel associated with ~/projects/~-dev/oai_service.ipynb
13:56:42.372 [debug] Notebook document ~/projects/~-dev/oai_service.ipynb got closed
13:56:42.373 [debug] Cancel executions after closing notebook ~/projects/~-dev/oai_service.ipynb
13:56:42.373 [debug] Cancel pending cells
13:56:42.373 [debug] Cancel executions after closing notebook ~/projects/~-dev/oai_service.ipynb
13:56:42.373 [debug] Cancel pending cells
13:56:42.375 [warn] Cancel all remaining cells due to dead kernel
13:56:42.375 [debug] Cancel pending cells
13:56:42.393 [debug] KernelProcess Exited 170469, Exit Code - undefined 
13:56:42.424 [debug] Disposed Kernel process 170469.
13:56:42.426 [debug] Shutdown session 7a7d86b4-9b19-4fa8-a292-4d1b2e5a4dc4, .jvsc74a57bd0bdb88f3e940ffb7b55604193ab3c6c8690e5a93877cab7d2141508066a70521d./home/~/projects/~-dev/.venv/python./home/~/projects/~-dev/.venv/python.-m#ipykernel_launcher - shutdown complete
13:57:21.057 [debug] No interpreter for Pylance for Notebook URI "~/projects/~-dev/oai_service.ipynb"

Coding Language and Runtime Version

Python 3.11.9

Language Extension Version (if applicable)

Python: v2024.10.0; PyLance: v2024.7.1

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

N/A or Not sure

@htkg htkg added the bug Issue identified by VS Code Team member as probable bug label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants