-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Unhandled Promise Rejections - Kernel Autorestarting #12200
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
Triage notes: Add Can you share an example of code that reliably causes an OOM error so that we can test any fix against it? |
We have a As for example code, here is something that will cause an OOM exception:
|
To be frank the fact that there is no way to handle this rejection is frustrating. It causes issues in our tests with random tests marked as failing or random/cryptic error logs (due to issue in jest jestjs/jest#9210) and slows down development. jupyterlab/packages/services/src/kernel/future.ts Lines 195 to 199 in 5598b3a
jupyterlab/packages/services/src/kernel/future.ts Lines 55 to 57 in 5598b3a
So far I found that this can be suppressed in tests with: // @ts-ignore
future['_done']['reject'] = () => {} |
Of note, this caused a lot of confusion and annoyance downstream:
I think that we should make kernel restart NOT throw this error (unhandled rejection). I think it is fair enough to special-case kernel shutdown/restart so that this nicer error message (warning) is logged in the console instead. |
Hi,
I am using
@jupyterlab/services
version6.0.9
. I am experiencing an issue with the Kernel autorestarting when you try and execute code that causes and OOM exception. The Kernel status is getting in a state where the following unhandled promise rejections are causing our application to crash because we can only catch the rejections at the NodeJS process level.Things I have tried:
interrupt()
on the Kernel connection and thenshutdown()
on the connection to then. spin up a new connection. This results in the "Kernel connection disconnected", which I believe is due to theinterrupt()
call not properly terminating all async tasks, which was reported here. This means our call toshutdown()
is going to set the status todisconnected
and the the async call toreconnect
when the Kernel is autorestarting is probably not terminated immediately by theinterrupt()
call.@jupyterlab/services
to6.3.1
Curious if anyone is aware of the best way to handle Kernel crashes due to OOM exceptions? Thanks.
The text was updated successfully, but these errors were encountered: