[.NET Core, Windows] gRPC server shutdown blocks if child process was spawned

24 views
Skip to first unread message

dubov...@gmail.com

unread,
Jan 11, 2019, 4:13:50 PM1/11/19
to grpc.io

We are building a cross-platform app that consists of several interdependent processes that interact with each other.

One process starts a gRPC server and then spawns a child process. After having exchanged a few gRPC calls with yet another process it needs to close, but is unable to close the server gracefully - ShutdownAsync task never completes until the child process exits - but we need it to stay up.

Details regarding child processes:

  • The child that blocks the shutdown doesn't use gRPC.
  • The peers for the interaction are also spawned by the main process, but are closed by the time the main process starts closing.
  • Children are spawned using .NET System.Diagnostics.Process API. If the latter is replaced with CreateProcess P/Invoke with inheritHandles=false, the problem disappears, but that would be a work-around, not the solution, assuming we are aiming for cross-platform code.

 

Could this be the same issue as the "fork() not supported" issue in Python version?

Does it mean that out scenario is not supported too?


Reply all
Reply to author
Forward
0 new messages