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

Segmentation fault and __strdup: symbol not found under Alpine Linux #2474

Open
mdemidchik opened this issue Jul 1, 2024 · 0 comments
Open
Labels
question Further information is requested

Comments

@mdemidchik
Copy link

mdemidchik commented Jul 1, 2024

I have .NET 8.0 application which uses NuGet package Grpc.Core 2.46.6 and runs under Alpine Linux (mcr.microsoft.com/dotnet/runtime:8.0-alpine).

I also have following packages preinstalled:
apk add --no-cache
aws-cli
gcompat
icu-data-full
icu-libs

The app crashes with segmentation fault rather often (dozens times a week).
Since the only native library in this app is grpc I tried to investigate what could be wrong with that:

ldd /app/2.46.6/runtimes/linux-x64/native/libgrpc_csharp_ext.x64.so
/lib/ld-musl-x86_64.so.1 (0x7f7475914000)
libdl.so.2 => /lib/ld-musl-x86_64.so.1 (0x7f7475914000)
librt.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f7475914000)
libm.so.6 => /lib/ld-musl-x86_64.so.1 (0x7f7475914000)
libpthread.so.0 => /lib/ld-musl-x86_64.so.1 (0x7f7475914000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7f7474c9f000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f7474c7b000)
libc.so.6 => /lib/ld-musl-x86_64.so.1 (0x7f7475914000)
ld-linux-x86-64.so.2 => /lib/ld-linux-x86-64.so.2 (0x7f7474c74000)
Error relocating /app/2.46.6/runtimes/linux-x64/native/libgrpc_csharp_ext.x64.so: __strdup: symbol not found

Installing additional packages did not help:
apk add --no-cache
cmake
curl
g++
gcc
jpeg-dev
libffi-dev
libjpeg
make
musl-dev
musl
postgresql-dev
python3-dev
tzdata
zlib
zlib-dev
libc6-compat
libc-dev
alpine-sdk
build-base
linux-headers
cython
c-ares-dev
gdbm
libffi
aws-cli
gcompat
icu-data-full
icu-libs

Could, please, anyone provide full list of native dependencies required for Grpc.Core 2.46.6?
Also, could anyone provide any other suggestions on how to resolve that issue other than migrating to the new Grpc.Net.Client?

@mdemidchik mdemidchik added the question Further information is requested label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant