-
Notifications
You must be signed in to change notification settings - Fork 283
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
Report exit status if kernel unexpectedly dies #957
Comments
Shouldn't this be reported primarily in https://github.com/jupyter-server/jupyter_server? Only once the server has support for it could any eventual client-side support be handled. |
My understanding is that I figured this feature would first need support in |
Ah, my bad, I missed the distinction between The interfaces of |
The entity that knows the actual state of the kernel "process" is the Kernel Provisioner. Provisioners are an abstraction layer that enables kernel lifecycle management other than just local process management (which is what the default Since what you're driving at is essentially the result of Also note that the integer status returned from |
If the Jupyter kernel process unexpectedly dies, Jupyter will show a message in the frontend. However, it doesn't report the exit status of the dead process. The exit status would be useful for diagnosing why the process crashed -- for example, I recently spent a while trying to figure out why a kernel process crashed, before eventually realizing it had been SIGKILL'ed by the Linux OOM killer.
I'm not sure what's the best way to implement this.
KernelManager.is_alive
doesn't provide a way to report the reason for death.jupyter_server.ServerKernelManager
adds areason
field; it's not currently used for this purpose, but perhaps it could be? There would also need to be a way to report the message to the frontend, perhaps via a new field in the kernel status message? And then the frontend would need to be updated to render that field.For now I'm working around this by subclassing KernelManager and ZMQChannelsWebsocketConnection to report the exit code to the frontend via the stderr: https://gist.github.com/tmaxwell-anthropic/de7a54753d312ccce831dbfd48ef2b12 But it would be nice if this could be a first-class feature.
The text was updated successfully, but these errors were encountered: