vscode-jupyter: Kernel crashes due to upstream problems with zmq package (seen with usage of bokeh and similar packages)

Environment data

  • VS Code version: 1.67.2
  • Jupyter Extension version (available under the Extensions sidebar): v2022.4.1021342353
  • Python Extension version (available under the Extensions sidebar): v2022.6.3
  • OS (Windows | Mac | Linux distro) and version: Windows 10 64 bit
  • Python and/or Anaconda version: winpython 3.9.8
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
  • Jupyter server running: Local

Expected behaviour

flawless execution of example notebook from bqplot

Actual behaviour

crashing of the IDE

Steps to reproduce:

download “interaction layer.ipynb” from https://github.com/bqplot/bqplot/tree/master/examples/Interactions

Logs

Issue Type: Bug

Opening an example script file for the bqplot library, such as “Interaction Layer.ipynb” from https://github.com/bqplot/bqplot/tree/master/examples/Interactions worked fine in the previous release of VSCode. Since upgrading on both my computer to the latest VSCode-release (April 2022) the script somehow crashes the IDE. When running the script, operation suddenly ceases and a prompt asks to save changes in the notebook file. Afterwards cell contents has been disappearing.

bild

No change in the script files, nor in the python installation has been done simultaneously. Only change was the update of VSCode.

I observed this first yesterday on my stationary computer, today also my laptop updated itself to the new version of VSCode and now this behavior is persistent on both systems. Reinstallation of the jupyter-extension didn’t help.

Extension version: 2022.4.1021342353 VS Code version: Code 1.67.2 (c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5, 2022-05-17T18:15:52.058Z) OS version: Windows_NT x64 10.0.19044 Restricted Mode: No

System Info
Item Value
CPUs AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx (8 x 2096)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 17.94GB (7.71GB free)
Process Argv –crash-reporter-id dfd4ad75-9b10-405c-836f-ded4c33df111
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
vscscmwlcmt:30465135
cppdebug:30492333


vscaac:30438847
vsclangdf:30486550

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 26 (19 by maintainers)

Most upvoted comments

Ipyvolume and fileupload also crash this way.

This problem only occurs in the desktop ZMQ version. Works fine in web and remote and with ZMQ disabled.

Workaround then is to set this hidden setting (or use remote):

"jupyter.disableZMQSupport": true

This workaround appears to no longer work? When I enable this setting and run my notebook, I get the following error:

originalException: a [Error]: '_xsrf' argument missing from POST
      at Function.create (/home/ubuntu/.vscode-server/extensions/ms-toolsai.jupyter-2022.9.1202862440/out/node_modules/@jupyterlab/services.js:2:53387)

This problem only occurs in the desktop ZMQ version. Works fine in web and remote and with ZMQ disabled.

Workaround then is to set this hidden setting (or use remote):

"jupyter.disableZMQSupport": true

@uwezi Thanks for the report here. I actually repro the same thing. Checking into it now. I see this as the possible first error in the developer tools.

FATAL ERROR: Error::New napi_get_last_error_info 1: 0x118d09f85 node::FatalException(v8::Isolate*, v8::TryCatch const&) [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 2: 0x118d0a12f node::OnFatalError(char const*, char const*) [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 3: 0x118d09fa9 node::FatalException(v8::Isolate*, v8::TryCatch const&) [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 4: 0x118cbb2ea napi_fatal_error [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 5: 0x10d14f46d zmq::stream_listener_base_t::create_engine(int) [/Users/ianhuff/.vscode-insiders/extensions/ms-toolsai.jupyter-2022.6.1001611018/out/node_modules/zeromq/prebuilds/darwin-x64/electron.napi.node] 6: 0x10d14f20e zmq::stream_listener_base_t::create_engine(int) [/Users/ianhuff/.vscode-insiders/extensions/ms-toolsai.jupyter-2022.6.1001611018/out/node_modules/zeromq/prebuilds/darwin-x64/electron.napi.node] 7: 0x10d15fd9e napi_register_module_v1 [/Users/ianhuff/.vscode-insiders/extensions/ms-toolsai.jupyter-2022.6.1001611018/out/node_modules/zeromq/prebuilds/darwin-x64/electron.napi.node] 8: 0x10d168fb4 napi_register_module_v1 [/Users/ianhuff/.vscode-insiders/extensions/ms-toolsai.jupyter-2022.6.1001611018/out/node_modules/zeromq/prebuilds/darwin-x64/electron.napi.node] 9: 0x118cba4bb napi_is_detached_arraybuffer [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]10: 0x11433ea2b v8::internal::Accessors::MakeAccessor(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Name>, void (*)(v8::Local<v8::Name>, v8::PropertyCallbackInfo<v8::Value> const&), void (*)(v8::Local<v8::Name>, v8::Local<v8::Value>, v8::PropertyCallbackInfo<v8::Boolean> const&)) [/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]11: 0x1207f0aa38 12: 0x12003bb998 

Not sure on the cause yet, but does seem to be coming from the Jupyter extension.