emacs-jupyter / jupyter

An interface to communicate with Jupyter kernels.
GNU General Public License v3.0
933 stars 92 forks source link

Can't interrupt/restart remote kernel #290

Open timlod opened 4 years ago

timlod commented 4 years ago

I cannot interrupt remote kernels. When interrupting a busy kernel, I do get Interrupting kernel, but the interrupt never terminates. If I try to send any command after the signal, I still get Kernel busy, and after a while Kernel not alive.

When then trying to restart the kernel, I get Starting dead kernel... for a while, but it never seems to start up. In the Messages buffer it still tells me Kernel not alive, and the execution indicator of the cell I initially wanted to interrupt still shows [*].

The only thing I can do to recover is to kill the buffer, including REPL and jupyter kernel.

I'm running a Python 3.8.5 virtualenv kernel through TRAMP. I do not have the same issue when trying this (same configuration) with a local kernel/python (which is an earlier python conda env).

littlehome-eugene commented 3 years ago

I find I can restart kernel using jupyter-repl-restart-kernel

I 'd like to stop cell execution with jupyter-repl-interrupt-kernel but it doesn't seem to work that way..

egr95 commented 1 year ago

I'm having the same issue. Did anyone find a workaround here?

pati-ni commented 1 year ago

I think it depends whether the kernel is managed through emacs-jupyter. I am using an ipython kernel -f there are no ways to send an interrupt signal AFAIK besides stopping the kernel. So if it hangs doing the wrong thing, the only solution is to interrupt the kernel with CTRL+\ kill the python emacs-jupyter buffer and start over