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

Got unstable kernel when appmode installed #68

Closed
tantra35 opened this issue Mar 26, 2023 · 3 comments
Closed

Got unstable kernel when appmode installed #68

tantra35 opened this issue Mar 26, 2023 · 3 comments

Comments

@tantra35
Copy link

When instaled this extension we got unstable notebook works with many time thrown exceptions:

[E 08:48:30.577 NotebookApp] Uncaught exception in ZMQStream callback
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.10/site-packages/zmq/eventloop/zmqstream.py", line
        f = callback(*args, **kwargs)
      File "/opt/conda/lib/python3.10/site-packages/zmq/eventloop/zmqstream.py", line
        return callback(self, msg)
      File "/opt/conda/lib/python3.10/site-packages/notebook/services/kernels/handlers
        super()._on_zmq_reply(stream, msg)
      File "/opt/conda/lib/python3.10/site-packages/notebook/base/zmqhandlers.py", lin
        self.write_message(msg, binary=isinstance(msg, bytes))
      File "/opt/conda/lib/python3.10/site-packages/tornado/websocket.py", line 339, i
        return self.ws_connection.write_message(message, binary=binary)
      File "/opt/conda/lib/python3.10/site-packages/tornado/websocket.py", line 1086,
        fut = self._write_frame(True, opcode, message, flags=flags)
      File "/opt/conda/lib/python3.10/site-packages/tornado/websocket.py", line 1061,
        return self.stream.write(frame)
      File "/opt/conda/lib/python3.10/site-packages/tornado/iostream.py", line 546, in
        self._handle_write()
      File "/opt/conda/lib/python3.10/site-packages/tornado/iostream.py", line 976, in
        self._write_buffer.advance(num_bytes)
      File "/opt/conda/lib/python3.10/site-packages/tornado/iostream.py", line 182, in
        assert 0 < size <= self._size
    AssertionError
[E 08:48:30.578 NotebookApp] Uncaught exception in zmqstream callback
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.10/site-packages/zmq/eventloop/zmqstream.py", line
        self._handle_recv()
      File "/opt/conda/lib/python3.10/site-packages/zmq/eventloop/zmqstream.py", line
        self._run_callback(callback, msg)
      File "/opt/conda/lib/python3.10/site-packages/zmq/eventloop/zmqstream.py", line
        f = callback(*args, **kwargs)
      File "/opt/conda/lib/python3.10/site-packages/zmq/eventloop/zmqstream.py", line
        return callback(self, msg)
      File "/opt/conda/lib/python3.10/site-packages/notebook/services/kernels/handlers
        super()._on_zmq_reply(stream, msg)
      File "/opt/conda/lib/python3.10/site-packages/notebook/base/zmqhandlers.py", lin
        self.write_message(msg, binary=isinstance(msg, bytes))
      File "/opt/conda/lib/python3.10/site-packages/tornado/websocket.py", line 339, i
        return self.ws_connection.write_message(message, binary=binary)
      File "/opt/conda/lib/python3.10/site-packages/tornado/websocket.py", line 1086,
        fut = self._write_frame(True, opcode, message, flags=flags)
      File "/opt/conda/lib/python3.10/site-packages/tornado/websocket.py", line 1061,
        return self.stream.write(frame)
      File "/opt/conda/lib/python3.10/site-packages/tornado/iostream.py", line 546, in
        self._handle_write()
      File "/opt/conda/lib/python3.10/site-packages/tornado/iostream.py", line 976, in
        self._write_buffer.advance(num_bytes)
      File "/opt/conda/lib/python3.10/site-packages/tornado/iostream.py", line 182, in
        assert 0 < size <= self._size
    AssertionError
Exception in callback BaseAsyncIOLoop._handle_events(30, 1)
handle: <Handle BaseAsyncIOLoop._handle_events(30, 1)>
Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/opt/conda/lib/python3.10/site-packages/tornado/platform/asyncio.py", line 206
    handler_func(fileobj, events)
  File "/opt/conda/lib/python3.10/site-packages/zmq/eventloop/zmqstream.py", line 634,
    self._handle_recv()
  File "/opt/conda/lib/python3.10/site-packages/zmq/eventloop/zmqstream.py", line 663,
    self._run_callback(callback, msg)
  File "/opt/conda/lib/python3.10/site-packages/zmq/eventloop/zmqstream.py", line 584,
    f = callback(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/zmq/eventloop/zmqstream.py", line 308,
    return callback(self, msg)
  File "/opt/conda/lib/python3.10/site-packages/notebook/services/kernels/handlers.py"
    super()._on_zmq_reply(stream, msg)
  File "/opt/conda/lib/python3.10/site-packages/notebook/base/zmqhandlers.py", line 25
    self.write_message(msg, binary=isinstance(msg, bytes))
  File "/opt/conda/lib/python3.10/site-packages/tornado/websocket.py", line 339, in wr
    return self.ws_connection.write_message(message, binary=binary)
  File "/opt/conda/lib/python3.10/site-packages/tornado/websocket.py", line 1086, in w
    fut = self._write_frame(True, opcode, message, flags=flags)
  File "/opt/conda/lib/python3.10/site-packages/tornado/websocket.py", line 1061, in _
    return self.stream.write(frame)
  File "/opt/conda/lib/python3.10/site-packages/tornado/iostream.py", line 546, in wri
    self._handle_write()
  File "/opt/conda/lib/python3.10/site-packages/tornado/iostream.py", line 976, in _ha
    self._write_buffer.advance(num_bytes)
  File "/opt/conda/lib/python3.10/site-packages/tornado/iostream.py", line 182, in adv
    assert 0 < size <= self._size
AssertionError
[I 08:49:49.721 NotebookApp] Appmode deleting: .TrainDreamBooth-0.ipynb
[I 08:49:49.722 NotebookApp] Kernel shutdown: 8699cf39-6451-4c7b-8076-940636b572f0
[W 08:49:49.770 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.771 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.772 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.772 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.773 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.774 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.775 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.777 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.778 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.778 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.779 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.780 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.781 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.782 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.783 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.784 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.785 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.786 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.787 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.788 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.789 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.790 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.791 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.792 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.793 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.794 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.795 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.796 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.796 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.797 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.798 NotebookApp] zmq message arrived on closed channel
[W 08:49:49.799 NotebookApp] zmq message arrived on closed channel
@pdstack
Copy link
Contributor

pdstack commented Mar 26, 2023

I was getting this issue too - see discussion on #65

It seems to be a problem with updates to jupyter_client and possibly notebook as well, when using the NotebookApp backend. Pinning the following should fix it:

jupyter_client<8.0.0
notebook<=6.4.11

Once the next release of appmode occurs then the ServerApp backend will work with Appmode and you can just use that instead, which doesn't have the same error messages when using the latest version of jupyter_client.

@jamescooke
Copy link

FYI there are underlying issues in zmq / tornado as you can see here jupyter/notebook#6721 that might cause some confusion because it generates a very similar stack trace as above.

For people reading this because they found this issue through search, please check jupyter/notebook#6721 first 🙏🏻 - I would guess that this appmode extension is not the cause of your issue.

@oschuett
Copy link
Owner

It seems this is not actually an issue with Appmode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants