Giter VIP home page Giter VIP logo

Comments (6)

Carreau avatar Carreau commented on May 18, 2024

Since IPython ignores the crash message, how should we tell it we've shut down?

For real shutdown there is a shutdown request and reply. In case of real full kernel crash, the heartbeat will fail and the frontend is responsible to ask for ask restart (automatic in case of notebook, prompt user for qtconsole)

from ijulia.jl.

stevengj avatar stevengj commented on May 18, 2024

@Carreau, I understand that the heartbeat stop will cause a restart. However, it would be nice have a mechanism to report the reason for the crash to the front-end if possible (obviously not possible for a segfault or similar catastrophic error, but we can certainly do it in cases like uncaught exceptions).

from ijulia.jl.

StefanKarpinski avatar StefanKarpinski commented on May 18, 2024

Shouldn't one just catch all exceptions and report them as errors? Are there situations where we can send a message back but can't continue operating? That seems like a strange intermediate situation.

from ijulia.jl.

stevengj avatar stevengj commented on May 18, 2024

Sure, that's one possibility, just send a pyerr message back to the frontend and continue operating. But we may want some mechanism to exit if we get into an infinite loop of exceptions this way.

(For now I want to crash on an unhandled exception just to make sure that we don't accidentally ignore it.)

from ijulia.jl.

stevengj avatar stevengj commented on May 18, 2024

The above patch changes the behavior so that it tries to continue on an unexpected exception. However, sending a pyerr message doesn't seem to work, perhaps because I'm just sending a new UUID as the session parameter (since this is not in the middle of an execute_request). @minrk or @Carreau, is there a way to send a pyerr (or similar) message outside of the context of an execute_request, to report to the front ends that something may be going wrong in the kernel?

from ijulia.jl.

Carreau avatar Carreau commented on May 18, 2024

IURC, the "session" UUID should change only once every kernel restart, it should stay the same across messages.

The only problem is that in between execute request if you publish a message with a message id that no frontend know of, the frontend will just ignore it.

I guess you could try to keep track of last seen session-id and message id by peeking into the messages.

from ijulia.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.