Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminating a program that utilizes durable task without launching dapr causes the program to hang #249

Open
RyanLettieri opened this issue Nov 28, 2023 · 1 comment

Comments

@RyanLettieri
Copy link
Member

This issue stems from an issue reported by a user in the dapr .NET SDK repository here: dapr/dotnet-sdk#1191

To reproduce the issue:

Pull down the dapr dotnet-sdk and navigate to the following directory: https://github.com/dapr/dotnet-sdk/tree/master/examples/Workflow/WorkflowConsoleApp

Run dotnet run and observe that the program starts.

Attempt to cancel the program with CTRL+C

Notice that the program never actually closes and the following logs are displayed endlessly:

...
info: Microsoft.DurableTask[3]
      The gRPC server for Durable Task gRPC worker is unavailable. Will continue retrying.
info: Microsoft.DurableTask[3]
      The gRPC server for Durable Task gRPC worker is unavailable. Will continue retrying.
info: Microsoft.DurableTask[3]
      The gRPC server for Durable Task gRPC worker is unavailable. Will continue retrying.
...
@jviau
Copy link
Member

jviau commented Dec 5, 2023

I am not familiar with how dapr process works, but looks like the CTRL+C is not propagated to the durabletask process. CTRL+C there will terminate the program. This loop will exit when the host cancellation token source is tripped, and is tripped when CTRL+C (or any other exit signal) is sent.

https://github.com/microsoft/durabletask-dotnet/blob/main/src/Worker/Grpc/GrpcDurableTaskWorker.Processor.cs#L64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants