Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classic jupyter notebook fails if first output > 3MB #2038

Open
jleibs opened this issue May 3, 2023 · 2 comments
Open

Classic jupyter notebook fails if first output > 3MB #2038

jleibs opened this issue May 3, 2023 · 2 comments
Labels
🪳 bug Something isn't working notebook Jupyter notebooks etc 🐍 Python API Python logging API

Comments

@jleibs
Copy link
Member

jleibs commented May 3, 2023

Using a moderately sized image can result in a crash in the kernel:

Exception in callback None()
handle: <Handle cancelled>
Traceback (most recent call last):
  File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/home/jleibs/rerun/venv/lib/python3.10/site-packages/tornado/platform/asyncio.py", line 206, in _handle_events
    handler_func(fileobj, events)
  File "/home/jleibs/rerun/venv/lib/python3.10/site-packages/tornado/iostream.py", line 702, in _handle_events
    self._handle_write()
  File "/home/jleibs/rerun/venv/lib/python3.10/site-packages/tornado/iostream.py", line 976, in _handle_write
    self._write_buffer.advance(num_bytes)
  File "/home/jleibs/rerun/venv/lib/python3.10/site-packages/tornado/iostream.py", line 182, in advance
    assert 0 < size <= self._size
AssertionError

However, this doesn't not happen deterministically. If you first log a smaller image. For example only an output sized 2.5MB, and then output the larger size afterwards, everything is fine. It seems like we're overflying something in tornado.

Additionally this is only an issue with notebook classic. Jupyter lab and VS code do not share the issue.

@jleibs jleibs added 🪳 bug Something isn't working 🐍 Python API Python logging API labels May 3, 2023
@jleibs
Copy link
Member Author

jleibs commented May 3, 2023

Looks like others have hit various versions of this: https://discourse.jupyter.org/t/jupyter-notebook-zmq-message-arrived-on-closed-channel-error/17869

One of the suggested workarounds:

pip install tornado==6.1 'jupyter-client<=8.1'

does seem to work for us.

@emilk emilk added the notebook Jupyter notebooks etc label May 9, 2023
@teh-cmc
Copy link
Member

teh-cmc commented May 12, 2023

Likely fixed by #2092; can you confirm @jleibs ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working notebook Jupyter notebooks etc 🐍 Python API Python logging API
Projects
None yet
Development

No branches or pull requests

3 participants