Skip to content

Coordinated shutdown timesout when exit-clr = on #3815

@mwpro

Description

@mwpro
  • Which Akka.Net version you are using? 1.3.13
  • On which platform you are using Akka.Net? .NET Core / both Windows and Linux (k8s)

When akka.coordinated-shutdown.exit-clr is enabled, task terminate-system in actor-system-terminate phase of coordinated shutdown times out.

Steps to reproduce

I expect following program to shutdown in near immediate time:

using System;
using Akka.Actor;
using Akka.Configuration;

namespace HelloAkka
{
    class Program
    {
        static void Main(string[] args)
        {
            var system = ActorSystem.Create("MySystem", ConfigurationFactory.ParseString(@"
            akka {
                stdout-loglevel = DEBUG
                loglevel = DEBUG
                coordinated-shutdown.exit-clr = on
            }"));

            var result = CoordinatedShutdown.Get(system)
                .Run(CoordinatedShutdown.ClrExitReason.Instance).Result;
        }
    }
}

instead, last phase of coordinated shutdown times out

[DEBUG][04.06.2019 14:09:40][Thread 0001][EventStream] StandardOutLogger started
[DEBUG][04.06.2019 14:09:40][Thread 0001][EventStream(MySystem)] Logger log1-DefaultLogger [DefaultLogger] started
[DEBUG][04.06.2019 14:09:40][Thread 0001][EventStream(MySystem)] StandardOutLogger being removed
[DEBUG][04.06.2019 14:09:40][Thread 0001][EventStream(MySystem)] Logger log1-DefaultLogger [DefaultLogger] started
[DEBUG][04.06.2019 14:09:40][Thread 0001][EventStream(MySystem)] StandardOutLogger being removed
[DEBUG][04.06.2019 14:09:40][Thread 0001][EventStream(MySystem)] Default Loggers started
[DEBUG][04.06.2019 14:09:40][Thread 0001][Akka.Actor.CoordinatedShutdown] Performing phase [before-service-unbind] with [0] tasks.
[DEBUG][04.06.2019 14:09:40][Thread 0005][Akka.Actor.CoordinatedShutdown] Performing phase [service-unbind] with [0] tasks.
[DEBUG][04.06.2019 14:09:40][Thread 0005][Akka.Actor.CoordinatedShutdown] Performing phase [service-requests-done] with [0] tasks.
[DEBUG][04.06.2019 14:09:40][Thread 0004][Akka.Actor.CoordinatedShutdown] Performing phase [service-stop] with [0] tasks.
[DEBUG][04.06.2019 14:09:40][Thread 0004][Akka.Actor.CoordinatedShutdown] Performing phase [before-cluster-shutdown] with [0] tasks.
[DEBUG][04.06.2019 14:09:40][Thread 0004][Akka.Actor.CoordinatedShutdown] Performing phase [cluster-sharding-shutdown-region] with [0] tasks.
[DEBUG][04.06.2019 14:09:40][Thread 0004][Akka.Actor.CoordinatedShutdown] Performing phase [cluster-leave] with [0] tasks.
[DEBUG][04.06.2019 14:09:40][Thread 0004][Akka.Actor.CoordinatedShutdown] Performing phase [cluster-exiting] with [0] tasks.
[DEBUG][04.06.2019 14:09:40][Thread 0004][Akka.Actor.CoordinatedShutdown] Performing phase [cluster-exiting-done] with [0] tasks.
[DEBUG][04.06.2019 14:09:40][Thread 0004][Akka.Actor.CoordinatedShutdown] Performing phase [cluster-shutdown] with [0] tasks.
[DEBUG][04.06.2019 14:09:40][Thread 0004][Akka.Actor.CoordinatedShutdown] Performing phase [before-actor-system-terminate] with [0] tasks.
[DEBUG][04.06.2019 14:09:40][Thread 0004][Akka.Actor.CoordinatedShutdown] Performing phase [actor-system-terminate] with [1] tasks: [terminate-system]
[INFO][04.06.2019 14:09:50][Thread 0004][Akka.Actor.CoordinatedShutdown] Starting coordinated shutdown from CLR termination hook.
[WARNING][04.06.2019 14:09:50][Thread 0008][Akka.Actor.CoordinatedShutdown] Coordinated shutdown phase [actor-system-terminate] timed out after 00:00:10
Press any key to continue . . .

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions