Skip to content

Missing ZMQ channel cleanup leads to "Could not destroy zmq context for AsyncKernelClient" #182

Closed
@Zsailer

Description

@Zsailer

Description

When running this extension with the latest stable JupyterLab, Jupyter Client, and Jupyter Server, I see a warning every time the kernel is polled for metrics:

[W 2023-03-13 10:53:48.052 ServerApp] Could not destroy zmq context for <jupyter_client.asynchronous.client.AsyncKernelClient object at 0x7f7e08e79640>

Looks like we need to close the opened ZMQ channels in the AsyncKernelClient object so the ZMQContext can properly teardown.

Reproduce

  1. Install JupyterLab and this extension
  2. Open JupyterLab
  3. Open a notebook to start a kernel.
  4. Watch the terminal console.
  5. Multiple warnings will be printed.

Expected behavior

No warnings should be printed to the console.

Context

  • Operating System and version: MacOS Version 12.5
  • Browser and version: Chrome
  • Jupyter Server version: 2.4.0
  • JupyterLab version: 3.6.1
  • Jupyter Client: 8.0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions