You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Alpine环境下grpc-netty-shaded触发JVM SIGSEGV崩溃求助

问题描述
  • 运行环境:Alpine 3.16.2,OpenJDK 1.8.0_345
  • 使用组件:grpc-netty-shaded 1.51.0,已在Maven依赖中添加netty-tcnative-boringssl-static 2.0.54-Final
  • 已安装系统包:sgerrand/alpine-pkg-glibc

当前JVM触发SIGSEGV崩溃,堆栈信息如下:

Stack: [0x00007facd51a2000,0x00007facd51e2af0],  sp=0x00007facd51dfd28,  free space=247k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  0x00000000000207f6
C  [libio_grpc_netty_shaded_netty_tcnative_linux_x86_646225435557092813446.so+0x26eda]  _init+0x6b6a
C  [libio_grpc_netty_shaded_netty_tcnative_linux_x86_646225435557092813446.so+0x22934]  _init+0x25c4
C  [libio_grpc_netty_shaded_netty_tcnative_linux_x86_646225435557092813446.so+0x2741e]  JNI_OnLoad+0x1e
C  [libjava.so+0xebda]  Java_java_lang_ClassLoader_00024NativeLibrary_load+0xba
j  java.lang.ClassLoader$NativeLibrary.load(Ljava/lang/String;Z)V+0
j  java.lang.ClassLoader.loadLibrary0(Ljava/lang/Class;Ljava/io/File;)Z+328
j  java.lang.ClassLoader.loadLibrary(Ljava/lang/Class;Ljava/lang/String;Z)V+48
j  java.lang.Runtime.load0(Ljava/lang/Class;Ljava/lang/String;)V+57
j  java.lang.System.load(Ljava/lang/String;)V+7
j  io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(Ljava/lang/String;Z)V+5
v  ~StubRoutines::call_stub
V  [libjvm.so+0x67340d]  JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0xc7d
V  [libjvm.so+0x9b56b8]  Reflection::invoke(instanceKlassHandle, methodHandle, Handle, bool, objArrayHandle, BasicType, objArrayHandle, bool, Thread*)+0xb18
V  [libjvm.so+0x9b6902]  Reflection::invoke_method(oopDesc*, Handle, objArrayHandle, Thread*)+0x172
V  [libjvm.so+0x71efb1]  JVM_InvokeMethod+0x241
J 2506  sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (0 bytes) @ 0x00007face572450d [0x00007face5724420+0xed]
J 2505 C1 sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (104 bytes) @ 0x00007face572734c [0x00007face57261a0+0x11ac]
J 1910 C1 sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (10 bytes) @ 0x00007face557d484 [0x00007face557d380+0x104]
J 1909 C1 java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (62 bytes) @ 0x00007face557a70c [0x00007face557a320+0x3ec]
j  io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader$1.run()Ljava/lang/Object;+53
v  ~StubRoutines::call_stub
V  [libjvm.so+0x67340d]  JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0xc7d
V  [libjvm.so+0x722b44]  JVM_DoPrivileged+0x2b4
J 732  java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object; (0 bytes) @ 0x00007face52171df [0x00007face5217120+0xbf]
j  io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(Ljava/lang/Class;Ljava/lang/String;Z)V+10
j  io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibrary(Ljava/lang/ClassLoader;Ljava/lang/String;Z)V+15
j  io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(Ljava/lang/String;Ljava/lang/ClassLoader;)V+352
j  io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(Ljava/lang/ClassLoader;[Ljava/lang/String;)V+33
j  io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl.loadTcNative()V+307
j  io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl.<clinit>()V+183
v  ~StubRoutines::call_stub
V  [libjvm.so+0x67340d]  JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0xc7d
V  [libjvm.so+0x62a7b4]  InstanceKlass::call_class_initializer_impl(instanceKlassHandle, Thread*)+0x154
V  [libjvm.so+0x62acbb]  InstanceKlass::initialize_impl(instanceKlassHandle, Thread*)+0x43b
V  [libjvm.so+0x62afa0]  InstanceKlass::initialize(Thread*)+0x60
V  [libjvm.so+0x808eee]  LinkResolver::resolve_static_call(CallInfo&, KlassHandle&, Symbol*, Symbol*, KlassHandle, bool, bool, Thread*)+0x12e
V  [libjvm.so+0x8097a0]  LinkResolver::resolve_invokestatic(CallInfo&, constantPoolHandle, int, Thread*)+0x210
V  [libjvm.so+0x80a4a5]  LinkResolver::resolve_invoke(CallInfo&, Handle, constantPoolHandle, int, Bytecodes::Code, Thread*)+0x1a5
V  [libjvm.so+0x66ae3f]  InterpreterRuntime::resolve_invoke(JavaThread*, Bytecodes::Code)+0x2cf
j  io.grpc.netty.shaded.io.netty.handler.ssl.SslContext.defaultProvider()Lio/grpc/netty/shaded/io/netty/handler/ssl/SslProvider;+0
j  io.grpc.netty.shaded.io.netty.handler.ssl.SslContext.defaultClientProvider()Lio/grpc/netty/shaded/io/netty/handler/ssl/SslProvider;+0
j  io.grpc.netty.shaded.io.netty.handler.ssl.SslContext.newClientContextInternal(Lio/grpc/netty/shaded/io/netty/handler/ssl/SslProvider;Ljava/security/Provider;[Ljava/security/cert/X509Certificate;Ljavax/net/ssl/TrustManagerFactory;[Ljava/security/cert/X509Certificate;Ljava/security/Pr
ivateKey;Ljava/lang/String;Ljavax/net/ssl/KeyManagerFactory;Ljava/lang/Iterable;Lio/grpc/netty/shaded/io/netty/handler/ssl/CipherSuiteFilter;Lio/grpc/netty/shaded/io/netty/handler/ssl/ApplicationProtocolConfig;[Ljava/lang/String;JJZLjava/lang/String;[Ljava/util/Map$Entry;)Lio/grpc/nett
y/shaded/io/netty/handler/ssl/SslContext;+4
j  io.grpc.netty.shaded.io.netty.handler.ssl.SslContextBuilder.build()Lio/grpc/netty/shaded/io/netty/handler/ssl/SslContext;+183

尝试用gcompat解决该问题时,与已安装的glibc包冲突,报错信息:

ERROR: gcompat-1.0.0-r4: trying to overwrite lib/ld-linux-x86-64.so.2 owned by glibc-2.35-r0

因限制无法更换Alpine系统,求可行解决方案。


内容的提问来源于stack exchange,提问作者K-ous

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.08 20:40:44