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

Support kernel_info request on the control channel #82

Merged
merged 6 commits into from
Dec 11, 2023
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions 80-kernel-info/kernel-info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Support kernel\_info request on the control channel

## Problem

When connecting a new websocket to an existing kernel via the Jupyter server, if the kernel execution is
stopped on a breakpoint, the messages sent over the websocket get no reply. This is because when
JohanMabille marked this conversation as resolved.
Show resolved Hide resolved
establishing a new websocket connection, the Jupyter server will send `kernel_info` requests to the kernel
and will prevent sending any other request until it receives a `kernel_info` reply. Since the `kernel_info`
request is sent on the shell channel and the kernel execution is stopped, it cannot reply to that request.

## Proposed enhancement

We propose to state in the Jupyter Messaging Protocol that the `kernel_info` request can be sent on both the shell and the control channels. Although both channels supports the `kernel_info` message, clients are encouraged to send it on the control channel as it will always be able to handle it, while the shell channel may be stopped.

### Impact on existing implementations

This JEP impacts kernels since it requires them to support receiving 'kernel\_info\_request' on the control channel in addition to receiving them on the shell channel.

It also has an impact on the Jupyter Server, which must be updated accordingly.
JohanMabille marked this conversation as resolved.
Show resolved Hide resolved

## Relevant Resources (GitHub repositories, Issues, PRs)

### GitHub repositories

- [Jupyter server](https://github.com/jupyter-server/jupyter_server): the backend to Jupyter web applications
JohanMabille marked this conversation as resolved.
Show resolved Hide resolved
- [Jupyter client](https://github.com/jupyter/jupyter_client): Jupyter protocol client APIs
- [JupyterLab](https://github.com/jupyterlab/jupyterlab): JupyterLab computational environment

### GitHub Issues

- New websocket unable to communicate with kernel paused in debugging [#622](https://github.com/jupyter-server/jupyter_server/issues/622)
- [Debugger] Active sessions cause the kernel to deadlock on page refresh [#10174](https://github.com/jupyterlab/jupyterlab/issues/10174)

### GitHub Pull Requests

Nudge kernel with info request until we receive IOPub messages [#361](https://github.com/jupyter-server/jupyter_server/pull/361)

Loading