代码之家  ›  专栏  ›  技术社区  ›  Horcrux7

如何使用jffi/jnr处理SIGSEGV?

  •  0
  • Horcrux7  · 技术社区  · 3 年前

    Java虚拟机与docker容器中的SIGSEGV一起崩溃。在所有其他系统上,它都按预期工作。

    # A fatal error has been detected by the Java Runtime Environment:
    #
    #  SIGSEGV (0xb) at pc=0x0000000000007966, pid=188, tid=189
    #
    # JRE version: OpenJDK Runtime Environment Temurin-17.0.2+8 (17.0.2+8) (build 17.0.2+8)
    # Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.2+8 (17.0.2+8, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
    # Problematic frame:
    # C  0x0000000000007966
    

    还有堆栈跟踪

    Current thread (0x00007fbdfa103040):  JavaThread "main" [_thread_in_native, id=189, stack(0x00007fbdff179000,0x00007fbdff279ac8)]
    
    Stack: [0x00007fbdff179000,0x00007fbdff279ac8],  sp=0x00007fbdff277c38,  free space=1019k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C  0x0000000000007966
    
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j  com.kenai.jffi.Foreign.invokeN3O1(JJJJJLjava/lang/Object;III)J+0
    j  com.kenai.jffi.Invoker.invokeN3(Lcom/kenai/jffi/CallContext;JJJJILjava/lang/Object;Lcom/kenai/jffi/ObjectParameterStrategy;Lcom/kenai/jffi/ObjectParameterInfo;Ljava/lang/Object;Lcom/kenai/jffi/ObjectParameterStrategy;Lcom/kenai/jffi/ObjectParameterInfo;Ljava/lang/Object;Lcom/kenai/jffi/ObjectParameterStrategy;Lcom/kenai/jffi/ObjectParameterInfo;)J+126
    j  de.digitalcollections.openjpeg.lib.libopenjp2$jnr$ffi$1.opj_read_header(Ljnr/ffi/Pointer;Ljnr/ffi/Pointer;Ljnr/ffi/byref/PointerByReference;)Z+190
    

    我可以用jffi/jnr做些什么来解决这个问题?我怎样才能收到有关该问题的更多详细信息?

    0 回复  |  直到 3 年前