xeus-python icon indicating copy to clipboard operation
xeus-python copied to clipboard

Kernel Dies Unexpectedly

Open mlucool opened this issue 4 years ago • 4 comments

There are cases when the kernel dies when handling large outputs. Below is a gif of one variant that was easy to reproduce on the binder for this project. I suspect there are more ways of triggering this bug.

Large output + interrupt: xeus

mlucool avatar May 17 '21 17:05 mlucool

Getting same issue, even without displaying large outputs

neilmehta-leapyear avatar Oct 26 '21 19:10 neilmehta-leapyear

Could you provide some more information (xeus-python version, OS, how did you install it, provide an exemple that fails, an error message you see etc). That would be super helpful, thanks!

martinRenou avatar Oct 27 '21 07:10 martinRenou

Note that it might be that the message rate limit has been reached due to a number of messages that's too important (too many prints in a short period of time in this case), leading to this warning:

    The notebook server will temporarily stop sending output
    to the client in order to avoid crashing it.
    To change this limit, set the config variable
    `--NotebookApp.iopub_msg_rate_limit`.
    
    Current values:
    NotebookApp.iopub_msg_rate_limit=1000.0 (msgs/sec)
    NotebookApp.rate_limit_window=3.0 (secs)

I don't know if that can make the kernel crash though.

martinRenou avatar Oct 27 '21 07:10 martinRenou

@martinRenou I got the same issue as well. Here's the information you asked for previously: I installed xeus-python to the base environment of a freshly installed mambaforge distribution.

OS: macOS Mojave 10.14.6 Firefox: 94.0.1 xpython version: 0.13.5 mamba: 0.16.0 conda: 4.10.3 mambaforge: 4.10.3 IPython : 7.29.0 ipykernel : 6.4.2 ipywidgets : not installed jupyter_client : 7.0.6 jupyter_core : 4.9.1 jupyter_server : 1.11.2 jupyterlab : not installed nbclient : 0.5.5 nbconvert : 6.2.0 nbformat : 5.1.3 notebook : 6.4.5 qtconsole : not installed traitlets : 5.1.1

Example (running in Jupyter Notebook):

import time
while True:
    print('hi')
    time.sleep(1)

A few seconds after clicking the button to interrupt the kernel, the same error message as provided in @mlucool's gif is displayed. The console output does'nt seem helpful either:

Kernel: kernel_interrupting (16bd2048-1dc2-4b70-b95a-66a280d9cebd) main.min.js:61505:21
[ExecuteTime] Clearing all timing data ExecuteTime.js:120:17
Kernel: kernel_restarting (16bd2048-1dc2-4b70-b95a-66a280d9cebd) main.min.js:61505:21
Kernel: kernel_autorestarting (16bd2048-1dc2-4b70-b95a-66a280d9cebd) main.min.js:61505:21

Any idea on how to debug it?

robertegel avatar Nov 09 '21 13:11 robertegel