Skip to content

Host shutdown mistakes #42655

@deep-outcome

Description

@deep-outcome

Type of issue

Missing information

Description

From

Host shutdown

  1. I deem "SIGTERM is also raised" should be "ProcessExit is also raised".
  2. This appear somewhat melded.

Since ConsoleLifetime blocked ProcessExit while waiting for the host to shut down, this behavior led to deadlocks from Environment.Exit also blocks waiting for the call to ProcessExit.

I went through code and linked issue and I am not 100 % sure but it should be something like:

"Environment.Exit fired ProcessExit and ConsoleLifetime blocked waiting to host stop which in turn was not possible because host was waiting to finish Environment.Exit, a deadlock.".

Page URL

https://learn.microsoft.com/en-us/dotnet/core/extensions/generic-host?tabs=hostbuilder

Content source URL

https://github.com/dotnet/docs/blob/main/docs/core/extensions/generic-host.md

Document Version Independent Id

22a12ff8-d2ff-a841-b9bb-e2fd1032bc04

Article author

@IEvangelist

Metadata

  • ID: d43ecd7c-307a-688e-d533-c1135bde65f9
  • Service: dotnet-fundamentals

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions