Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught signal: 11 when using .net Core Cloud Firestore in Google Cloud

I have created two .net core 3.0 C# services with Cloud Run. When I try to insert a firestore document the application crashes in the cloud. Locally it works with the same firestore connection. One service worked well yesterday. What can I do to debug this problem?

The provided C# code shows

"Uncaught signal: 11, pid=1, tid=13, fault_addr=453942."

as error message in the log of Cloud Run. The crash happens at the line documentRef.SetAsync(plan);. Uncaught signal 11 sounds like a segfault.

The services uses the nuget package Google Cloud Firestore (1.0.0) and Grpc.Core (1.22.1).

[FirestoreData]
public class Plan
{
        [FirestoreProperty]
        public string PlanId{ get; set; }
}

[...]

using Google.Cloud.Firestore;

[...]

var plan = new Plan() { PlanId = "testId"};
Database = FirestoreDb.Create("testing-profile-crawler");
var documentRef = Database.Collection("crawler-plan").Document("test");
documentRef.SetAsync(plan);
like image 364
simsi Avatar asked Nov 30 '25 07:11

simsi


1 Answers

The answer from November 2019 works for Alpine 3.9, but not for 3.10 or 3.11.

There's a new gRPC issue covering that, but I've certainly had success by downgrading libc6-compat as shown in the issue:

RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.8/main' >> /etc/apk/repositories && \
    apk update --no-cache && \
    apk add --no-cache bash libc6-compat=1.1.19-r11

Obviously downgrading a library version is a pretty drastic thing to do - so it's worth testing thoroughly. But it at least works for a test app, so might be helpful to anyone experiencing the same issue.

like image 51
Jon Skeet Avatar answered Dec 02 '25 20:12

Jon Skeet