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

fix kernel can only restart once issue #695

Merged
merged 1 commit into from
Sep 24, 2021
Merged

Conversation

mofanke
Copy link
Contributor

@mofanke mofanke commented Sep 17, 2021

fix kernel can only resstart once issue
fix issue #689

@mofanke mofanke changed the title fix https://github.com/jupyter/jupyter_client/issues/689 fix kernel can only resstart once issue Sep 17, 2021
Copy link
Member

@kevin-bates kevin-bates left a comment

Choose a reason for hiding this comment

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

Hi @mofanke - thank you for the pull request. I was thinking the reset would occur at the start of the start_kernel() method (rather than its post-start). Did you try that and was it problematic?

@mofanke
Copy link
Contributor Author

mofanke commented Sep 22, 2021

Hi, @kevin-bates I have tried the reset in start_kernel(), pre_start_kernel() and post_start_kernel() , all the three ways can git rid of the problem. "self.shutting_down = True" setted in _async_shutdown_kernel() just before "self.stop_restarter()" so I put "self.shutting_down = False" as the reset just before "self.start_restarter()" in _async_post_start_kernel().

shoud I update the PR , and set "self.shutting_down = False" in start_kernel()?

@kevin-bates kevin-bates changed the title fix kernel can only resstart once issue fix kernel can only restart once issue Sep 22, 2021
@kevin-bates
Copy link
Member

Hi @mofanke - thanks for looking into the various solutions. In looking at the history of self.shuttting_down I must have inadvertently removed its reset to False when introducing kernel provisioners. It was previously located at the start of pre_start_kernel(), which makes the most sense to me since, at that point, it's no longer shutting down. As such, I think its best to place it in that same relative location. Thank you.

fix kernel can only resstart once  issue

add reset self.shutting_down in pre_start_kernel
Copy link
Member

@kevin-bates kevin-bates left a comment

Choose a reason for hiding this comment

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

LGTM - thank you @mofanke!

@kevin-bates kevin-bates merged commit 7ef616e into jupyter:master Sep 24, 2021
@blink1073 blink1073 added the bug label Sep 28, 2021
@blink1073 blink1073 added this to the 7.0 milestone Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants