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

Address race condition between shutdown_kernel and restarter #607

Merged
merged 1 commit into from
Feb 22, 2021

Conversation

kevin-bates
Copy link
Member

There is a window in which the auto-restarter logic (that detects unexpectedly terminated kernels) can restart a shutdown kernel - whose termination was intended.

Although rare, this has been seen when a Notebook server is terminated with running kernels, at which time it issues shutdown requests for each kernel - while, at the same time, but after the kernel process has terminated, the restarter detects the kernel process's absence and restarts the kernel.

By indicating that the kernel manager has started a (graceful) shutdown of the kernel, the restarter can better-determine the difference between an intended and unintended shutdown - skipping the kernel restart in case of the former.

Resolves #606

@Carreau
Copy link
Member

Carreau commented Feb 22, 2021

that looks good to me, let's get that in.

@Carreau Carreau merged commit 987f3e1 into jupyter:master Feb 22, 2021
@Carreau Carreau modified the milestones: 6.1.11, 6.1.12 Mar 10, 2021
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

Successfully merging this pull request may close these issues.

Kernel not properly shutdown after NotebookApp receives SIGTERM.
2 participants