Skip to content

gRPC call hangs on Linux x64 in Azure Functions host #25208

@jskeet

Description

@jskeet

What version of gRPC and what language are you using?

gRPC 2.34.1, using .NET Core 3.1.

What operating system (Linux, Windows,...) and version?

Linux and Windows

What runtime / compiler are you using (e.g. python version or version of gcc)

.NET Core SDK 3.1, with the azure-functions-core-tools-3 version 3.0.3160-1

What did you do?

  • Start an Azure function that uses gRPC to make a request, running under Linux.
  • Invoke the function
  • Function hangs

Zip file everything to reproduce using Docker: repro.zip

This is the code that makes the request - it's not expected to work, just exercise gRPC:

private static string MakeRequest()
{
    var marshaller = new Marshaller<string>(Encoding.UTF8.GetBytes, Encoding.UTF8.GetString);
    var method = new Method<string, string>(MethodType.Unary,
        "test-service", "test-method",
        marshaller, marshaller);
    var channel = new Channel("spanner.googleapis.com:443", ChannelCredentials.Insecure);
    var callInvoker = channel.CreateCallInvoker();
            
    return callInvoker.BlockingUnaryCall(method, "spanner.googleapis.com", new CallOptions(), "request");
}

What did you expect to see?

An error of "StatusCode="Unavailable", Detail="failed to connect to all addresses"" due to making a bogus request (deliberately).

What did you see instead?

The function hangs.

Anything else we should know about your project / environment?

  • The same code "fails correctly" when running in Windows in the Azure Functions host
  • The same code "fails correctly" when running in Linux as a console application
  • Using an async call doesn't help
  • Real (correct) RPCs fail in the same way

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions