robert-dodier / maxima-jupyter

A Maxima kernel for Jupyter, based on CL-Jupyter (Common Lisp kernel)
Other
185 stars 31 forks source link

kernel hanging and receiving `zmq message arrived on closed channel` #87

Closed cameronraysmith closed 3 years ago

cameronraysmith commented 3 years ago

When I create a notebook and enter some test input, the notebook hangs and this appears in the log:

[I 22:54:18.087 LabApp] Creating new notebook in 
[I 22:54:18.088 LabApp] Saving Untitled.ipynb
[I 22:54:19.333 LabApp] Kernel started: abce814e-4348-4a4f-b972-f050fdec2468, name: maxima
To load "maxima-jupyter":
  Load 1 ASDF system:
    maxima-jupyter
; Loading "maxima-jupyter"
.....
jupyter_kernel_start("/home/jovyan/.local/share/jupyter/runtime/kernel-abce814e-4348-4a4f-b972-f050fdec2468.json")
[I 22:54:21.579 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[I 22:54:22.142 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[I 22:54:22.315 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:22.471 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:4218b07d-03b4-4cdf-abd3-2fada34c5b06
[I 22:54:22.474 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:22.626 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:00fac16e-ce28-4347-9567-a7e9f581abfe
[I 22:54:23.135 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:23.291 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:476e44e8-4fef-4dff-92f0-a12fc45e170a
[I 22:54:23.294 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:24.139 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:4218b07d-03b4-4cdf-abd3-2fada34c5b06
[I 22:54:24.142 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:25.138 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:00fac16e-ce28-4347-9567-a7e9f581abfe
[I 22:54:25.142 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:25.588 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:476e44e8-4fef-4dff-92f0-a12fc45e170a
[I 22:54:25.591 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:27.138 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:4218b07d-03b4-4cdf-abd3-2fada34c5b06
[I 22:54:27.141 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:28.138 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:00fac16e-ce28-4347-9567-a7e9f581abfe
Maxima encountered a Lisp error:

 Interactive interrupt at #x7F284094346F.

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
[I 22:54:28.144 LabApp] Kernel interrupted: abce814e-4348-4a4f-b972-f050fdec2468
[I 22:54:28.161 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[I 22:54:28.330 LabApp] KernelRestarter: restarting kernel (1/5), keep random ports
kernel abce814e-4348-4a4f-b972-f050fdec2468 restarted
kernel abce814e-4348-4a4f-b972-f050fdec2468 restarted
kernel abce814e-4348-4a4f-b972-f050fdec2468 restarted
[W 22:54:29.138 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:476e44e8-4fef-4dff-92f0-a12fc45e170a
[I 22:54:29.143 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
To load "maxima-jupyter":
  Load 1 ASDF system:
    maxima-jupyter
; Loading "maxima-jupyter"
....[W 22:54:30.139 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:4218b07d-03b4-4cdf-abd3-2fada34c5b06
[I 22:54:30.145 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
.
jupyter_kernel_start("/home/jovyan/.local/share/jupyter/runtime/kernel-abce814e-4348-4a4f-b972-f050fdec2468.json")
[I 22:54:31.147 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:31.301 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:4218b07d-03b4-4cdf-abd3-2fada34c5b06
[I 22:54:31.304 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:31.453 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:476e44e8-4fef-4dff-92f0-a12fc45e170a
[I 22:54:31.457 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:32.137 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:00fac16e-ce28-4347-9567-a7e9f581abfe
[I 22:54:32.141 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:32.448 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:4218b07d-03b4-4cdf-abd3-2fada34c5b06
[I 22:54:32.451 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:32.618 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:476e44e8-4fef-4dff-92f0-a12fc45e170a
[I 22:54:32.621 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:33.139 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:00fac16e-ce28-4347-9567-a7e9f581abfe
[W 22:54:33.145 LabApp] zmq message arrived on closed channel
[W 22:54:33.148 LabApp] zmq message arrived on closed channel
[I 22:54:33.151 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:33.615 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:4218b07d-03b4-4cdf-abd3-2fada34c5b06
[I 22:54:33.619 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:34.139 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:476e44e8-4fef-4dff-92f0-a12fc45e170a
[W 22:54:34.145 LabApp] zmq message arrived on closed channel
[W 22:54:34.148 LabApp] zmq message arrived on closed channel
[I 22:54:34.151 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
cameronraysmith commented 3 years ago

I do not know the cause, but this issue seems to arise in conjunction with the use of the sidecar proxy employed by gcp ai platform notebooks. The issue does not arise when managing instances manually and so does not appear to be a bug with maxima-jupyter.

robert-dodier commented 3 years ago

Hi Cameron, thanks for following up. I saw your previous message but I didn't respond because I didn't have any guesses as to why that was happening. Given that the problem appears to be in the web proxy, maybe it makes sense to see if similar bugs have been reported for other Jupyter kernels or Jupyter itself.

Thanks for your interest in Maxima and Maxima-Jupyter, and sorry I can't be more helpful at this time.