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

Prevent missing IOPub upon restart #5904

Closed
wants to merge 1 commit into from

Conversation

SylvainCorlay
Copy link
Member

Upon restart, nedge the kernel with info requests until we get something on IOPub, to ensure it is properly connected.

CF jupyter/jupyter_client#593

@@ -310,37 +310,62 @@ async def restart_kernel(self, kernel_id, now=False):
await maybe_future(self.pinned_superclass.restart_kernel(self, kernel_id, now=now))
kernel = self.get_kernel(kernel_id)
# return a Future that will resolve when the kernel has successfully restarted
channel = kernel.connect_shell()
shell_channel = kernel.connect_shell()
iopub_channel = kernel.connect_iopub()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really, we should use the iopub channel from zmqhandler.channels, which we don't have access to here.

@kevin-bates
Copy link
Member

Hi Sylvain - thanks for submitting this pull request. Using these changes, I am unable to complete a general restart of the kernel. The state stays at restarting and no commands can be performed. It does appear that the kernel manager is completing its restart of the process, but the setup of the kernel messaging is having issues.

I also notice that SIGINT (multiple times) is not terminating the application (SIGQUIT does) implying that the process is probably tied up in lower levels.

I've left a similar comment on the jupyter-server PR as well (once the method name is changed).

@kevin-bates
Copy link
Member

I'm sorry. It just dawned on me that this PR requires jupyter/jupyter_client#593, so please disregard the restart failure behavior. I'll need to pull that PR as well.

@SylvainCorlay
Copy link
Member Author

Closing. This is not the way to go.

We need to do this in pre_get / open when opening the web socket connection.

@SylvainCorlay SylvainCorlay deleted the restart branch December 11, 2020 09:32
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants