-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
grpc-java upgrade from 1.53.0 to 1.54.0 crashes JVM on Alpine #10096
Comments
Guessing, I'd say it is a linking problem. musl refuses to tell you "symbol can't be found" and instead just crashes. With glibc these issues are caught and handled. But I've fought it before #8751 (comment) , so now I know. From the log, yeah, that's a very early failure.
Yep. Linking. Friends don't let friends use musl outside the embedded space, because it can't be bothered to give a useful error:
Newer versions of netty-tcnative (2.0.57 looks the same) have that fixed, but a new issue:
But looks like you can workaround it, just like glibc.
So looks like a regular netty-tcnative upgrade will fix this. |
Thanks for looking in to it @ejona86 ! So if I understand you correctly I should just wait for the next release and it should be fixed? (or use the workaround of course) No need to open a ticket over at Netty? |
Since you are using grpc-netty-shaded, yeah, just stay on 1.53. 1.55 won't have the Netty upgrade, but I expect 1.56 will. I don't think it will be too hard for us to upgrade netty-tcnative, but I don't want to do it just before the 1.55 release (a week away). When you do get on 1.56, I think you will need that workaround for libunwind. Obviously, your other option is to stop using Alpine. The non-Alpine Temurin image is "just" 28% larger. Or if you are serious about container size you might be able to use distroless which is Debian-based |
netty-tcnative-boringssl-static was upgraded to 2.0.61.Final in 1.56.0. That should fix the linking problem. (But you'll still need all that LD_PRELOAD for gcompat and unwind.) |
Hit this issue on a
Debugging shows any version of |
LD_PRELOAD has been needed for a while for gcompat. Now it is also needed for libunwind. The problem is gcompat doesn't automatically trigger when using a musl-compiled java, because that is triggered by the linker name and the linker for the java process is the musl-named linker. gcompat is basically just a LD_PRELOAD shim, so the explicit LD_PRELOAD is a bit ugly, but no more hacky than trying to have glibc compat on alpine in general. |
An attempt to upgrade from grpc-java 1.53.0 to 1.54.0 ends with JVM crash. I see this issue only running on docker using an Alpine image:
eclipse-temurin:17-alpine
. On my local machine (OSX, ARM) I can't reproduce this issue.I'm getting this error:
Full error log: java_error1.log
The text was updated successfully, but these errors were encountered: