Skip to content

gRPC call task hangs forever when the server is unreachable #1892

Done

Description

@edeandrea

What happened:

A call: grpc task whose server can't be reached never completes. The workflow instance's future stays pending forever and nothing is logged.

GrpcExecutor creates the call with CallOptions.DEFAULT.withWaitForReady() and no deadline. With wait-for-ready, gRPC does not fail the RPC while the channel is in TRANSIENT_FAILURE; it waits for the channel to become ready. If the server is down, or the host/port is wrong, it waits forever.

A task timeout fails the task, but orTimeout doesn't cancel the gRPC call. The pending call stays open, and so does the ManagedChannel the executor creates when no grpcChannelProvider is configured: it is only shut down when the call completes.

What you expected to happen:

The task fails with a workflow error caused by UNAVAILABLE, like an HTTP call task to an unreachable host does. A try/retry can then handle it. This is gRPC's default (fail-fast) behavior.

How to reproduce it:

Workflow workflow =
    WorkflowBuilder.workflow("grpc-unreachable", "test", "0.1.0")
        .tasks(
            doTasks(
                call(
                    "greet",
                    grpc()
                        .proto("workflows-samples/grpc/proto/person.proto")
                        .service("Person", "localhost", 5099) // nothing listening
                        .method("GetPerson"))))
        .build();

app.workflowDefinition(workflow).instance(Map.of()).start().join(); // never returns

Anything else we need to know?:

Found in Quarkus Flow: when its Quarkus-managed gRPC channel isn't created, the SDK falls back to its own channel with the host/port from the workflow, and the workflow hung instead of failing.

Proposed fix: drop withWaitForReady(). Setting a default deadline would be an alternative, but it would also limit long streaming calls; a task timeout already serves that purpose.

Environment:

  • Specification version used: 1.0.x (reproduced on main and 7.35.4.Final)

Activity

  1. added a commit that references this issue on Dec 3, 2026
    bd0f4fe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions