Pweave icon indicating copy to clipboard operation
Pweave copied to clipboard

RuntimeError: Kernel died before replying to kernel_info

Open abukaj opened this issue 7 years ago • 8 comments

While trying to find minimal failing example for #60 I discovered another issue (2f888e83af10f0a6b9df8168376e5c81855f3461 Python 3.5)

START: run 660/1000
E
======================================================================
ERROR: testTerminalEmulation (__main__.ReproducibleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_nondeterministicFail.py", line 29, in testMethod
    pweave.weave(infile, doctype=doctype, **kwargs)
  File "/home/jkowalski/Pweave/pweave/__init__.py", line 60, in weave
    doc.weave()
  File "/home/jkowalski/Pweave/pweave/pweb.py", line 181, in weave
    self.run()
  File "/home/jkowalski/Pweave/pweave/pweb.py", line 118, in run
    self.wd
  File "/home/jkowalski/Pweave/pweave/processors/jupyter.py", line 151, in __init__
    super(IPythonProcessor, self).__init__(*args)
  File "/home/jkowalski/Pweave/pweave/processors/jupyter.py", line 28, in __init__
    cwd = path)
  File "/home/jkowalski/anaconda/envs/Pweave35/lib/python3.5/site-packages/jupyter_client/manager.py", line 452, in start_new_kernel
    kc.wait_for_ready(timeout=startup_timeout)
  File "/home/jkowalski/anaconda/envs/Pweave35/lib/python3.5/site-packages/jupyter_client/blocking/client.py", line 115, in wait_for_ready
    raise RuntimeError('Kernel died before replying to kernel_info')
RuntimeError: Kernel died before replying to kernel_info

abukaj avatar Jun 08 '17 15:06 abukaj

The issue hits quite often given multiple runs of test (ca. every 200 weaves).

abukaj avatar Jun 16 '17 20:06 abukaj

This seems to be an issue with jupyter_client, can you test if this fixes it: https://github.com/jupyter/jupyter_client/issues/154#issuecomment-314543988

mpastell avatar Aug 18 '17 07:08 mpastell

I am updating the environment and checking.

Python 3.5.4 |Anaconda custom (64-bit)| (default, Aug 14 2017, 13:26:58) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import jupyter_client

In [2]: jupyter_client.__version__
Out[2]: '5.1.0'

abukaj avatar Aug 20 '17 08:08 abukaj

Kernel died on 100th weave (of 1000).

abukaj avatar Aug 20 '17 09:08 abukaj

I can reproduce this on Windows using Python 3.5.4., but not on Linux. Also I don't get the error on either using Python 3.6.2. Also it doesn't seem to happen if you use pweave script.

I don't know how to fix this, but I have added better error messages using d55e92f

mpastell avatar Aug 21 '17 09:08 mpastell

I just have reproduced it with the pweave script. :-/ Now I am trying to reproduce it again.

abukaj avatar Aug 21 '17 11:08 abukaj

After ca 1000 weaves I managed to reproduce the issue with test/test_nondeterministicFail.sh script (339d266).

[EDIT]

Ca 600 weaves later I have 2 more kernel deaths.

abukaj avatar Aug 21 '17 15:08 abukaj

Python3 now uses an embedded kernel which does not have this error. It is possible that other kernels will be affected so I will keep this issue open.

mpastell avatar Aug 22 '17 07:08 mpastell