-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Pubsub Subscriber initialization crashes JVM on Alpine Linux with libc6-compat #3536
Comments
@garrettjonesgoogle Do you happen to know what our story is on Alpine support? @vitaly-sourikov seems to have libc installed. |
We're having the same issue. cc @ahmetsemsettinozdemirden |
I have the same problem and have been using openjdk:8-jre-slim instead of openjdk:8-jre-alpine, which is unfortunate because it doubles the final size of my applications final image. |
We believe that the problem relates to grpc and SSL. You can see some information about the issue here. I haven't tried it myself, but as best I can tell, you would have to exclude |
In case it helps anyone else: we just switched to gcr.io/distroless/java as our base image and it has most of the space benefits of Alpine (it's only 34MB larger) without the Musl incompatibility issues (since it uses glibc). The pubsub library seems to work fine with this image. |
@chrisribble Here is how you can make this work. |
@ajaaym the issue you linked to suggests installing libc-compat, but this issue clearly states that the issue happens with libc-compat installed. It's been a while since we moved away from Alpine, but IIRC the issue is that the netty tcnative needs to be built specially for Alpine's SSL implementation (i.e. https://github.com/pires/netty-tcnative-alpine) and gRPC is pulling in a netty-tcnative implementation that uses JNI against the symbols in OpenSSL in a way that doesn't work on Alpine. I played around with trying to get that netty-tcnative-alpine project to build and figured I would force the dependency resolution to use my built version instead of the version of netty-tcnative that was specified by the gRPC pom, but I couldn't get the netty-tcnative-alpine build to work so I gave up and switched to grc distroless (as noted above). |
Pubsub Subscriber initialization crashes JVM on Alpine Linux with libc6-compat. Here is the stacktrace from hs_err crash log:
The text was updated successfully, but these errors were encountered: