Giter Site home page Giter Site logo

AkkaSystem unclean termination about akka.net HOT 8 OPEN

Zetanova avatar Zetanova commented on June 15, 2024
AkkaSystem unclean termination

from akka.net.

Comments (8)

Arkatufus avatar Arkatufus commented on June 15, 2024

I can't really reproduce the bug, maybe there are other things that causes the actor system to fail?

from akka.net.

Aaronontheweb avatar Aaronontheweb commented on June 15, 2024

Terminate and/or CoordinatedShutdown a system in OOM situation.

So I missed this - but this is largely an unhandleable situation and CoordinatedShutdown won't run correctly because processes are aborted when this occurs. Catastrophic runtime failures can't be handled gracefully through the normal pathways we use to handle graceful terminations. The solve here is to fix the OOM.

from akka.net.

Aaronontheweb avatar Aaronontheweb commented on June 15, 2024

See https://learn.microsoft.com/en-us/dotnet/api/system.outofmemoryexception?view=net-7.0 for a fuller explanation on what you can do to log this type of error (Environment.FailFast), but there are no tools to handle it once it gets going.

from akka.net.

Zetanova avatar Zetanova commented on June 15, 2024

Its not that OOM exception should be handled explicitly,
but system.WhenTerminated should be completed even after an exception in system.Terminate() itself.
The callbacks registered in System.RegisterOnTermination(StopApplication) could/should be executed even after an exception in CoordinatedShutdown

If not system.Terminate() and/or CoordinatedShutdown will break the system state and system.WhenTerminated never completes and no System.RegisterOnTermination(StopApplication) callbacks get executed.

My end result was that my LiveHealthCheck on system.WhenTerminated was successful
but the ReadyHealthCheck on the akka cluster was in a failure state. (Kubernetes)

from akka.net.

Zetanova avatar Zetanova commented on June 15, 2024

In my opinion system.Terminate() should have the same behavior as Dispose() that even when it internaly throws the end result of the instance is disposed

from akka.net.

Aaronontheweb avatar Aaronontheweb commented on June 15, 2024

but system.WhenTerminated should be completed even after an exception in system.Terminate() itself.
The callbacks registered in System.RegisterOnTermination(StopApplication) could/should be executed even after an exception in CoordinatedShutdown

Ok, that is fixable. We can do that.

from akka.net.

Arkatufus avatar Arkatufus commented on June 15, 2024

@Zetanova can you look at #6967 and check if I missed anything, I could not reproduce your error.

from akka.net.

Aaronontheweb avatar Aaronontheweb commented on June 15, 2024

Any updates on this @Zetanova ?

from akka.net.

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.