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);
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With