ma_508346117 2022-11-10 11:09 采纳率: 0%
浏览 20

jna 调用崩溃问题调用崩溃问题

我在使用jna调用 so文件时, jvm 发生崩溃 我看您的帖子里有关这方面的提问 ,以下是我的日志

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fb084b55de4, pid=60103, tid=0x00007fb0856ed700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_201-b09) (build 1.8.0_201-b09)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.201-b09 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libc.so.6+0x55de4]  _IO_vfscanf+0x64
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

---------------  T H R E A D  ---------------

Current thread (0x00007fb07c009800):  JavaThread "main" [_thread_in_native, id=60104, stack(0x00007fb0855ed000,0x00007fb0856ee000)]

siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x00000000000000c0

Registers:
RAX=0x00007fb0856ebb90, RBX=0x00007fb0856ec4d0, RCX=0x0000000000000000, RDX=0x00007fb0856ebb78
RSP=0x00007fb0856eb8a0, RBP=0x00007fb0856ebb60, RSI=0x00007fb0518b8415, RDI=0x0000000000000000
R8 =0x00007fb0856ed700, R9 =0x00007fb0518b8415, R10=0x00007fb0856eba10, R11=0x00007fb084b668c0
R12=0x0000000000000000, R13=0x00007fb080a3e728, R14=0x00007fb0856ec758, R15=0x0000000000000000
RIP=0x00007fb084b55de4, EFLAGS=0x0000000000010206, CSGSFS=0x0000000000000033, ERR=0x0000000000000004
  TRAPNO=0x000000000000000e

Top of Stack: (sp=0x00007fb0856eb8a0)
0x00007fb0856eb8a0:   00007fb0856ec180 00007fb0854eea69
0x00007fb0856eb8b0:   00007fb06c0d95e8 0000000006e3bde1
0x00007fb0856eb8c0:   0000000000000000 0000000000000003
0x00007fb0856eb8d0:   00007fb064000f70 00007fb0854ef330
0x00007fb0856eb8e0:   00007fb07c081420 0000000000000000
0x00007fb0856eb8f0:   00007fb06c0d95e8 00007fb06c0d9d38
0x00007fb0856eb900:   00007fb0856eba30 00007fb0856eba20
0x00007fb0856eb910:   0000000200000000 00007fb0856ebb78
0x00007fb0856eb920:   0000000000000000 000000005c97b8e1
0x00007fb0856eb930:   0000000000000000 0000000000000019
0x00007fb0856eb940:   00007fb07c173ff0 00007fb0854ef4ae
0x00007fb0856eb950:   0000000000000000 00007fb084ea6f20
0x00007fb0856eb960:   00007fb0518a6e78 00007fb0518a7778
0x00007fb0856eb970:   00007fb0856ebaa0 0000000001725ee3
0x00007fb0856eb980:   00007fb0856eba90 00007fb0518a7f40
0x00007fb0856eb990:   0000000000000000 00007fb0854eeb3c
0x00007fb0856eb9a0:   00007fb07c16fbe0 00000000fe262b96
0x00007fb0856eb9b0:   0000000000000004 0000000000000008
0x00007fb0856eb9c0:   0000000001a4fa50 00007fb0854ef4ae
0x00007fb0856eb9d0:   00007fb0518a9a10 0000003000000010
0x00007fb0856eb9e0:   00007fb0856ebc50 00007fb0856ebb90
0x00007fb0856eb9f0:   00007fb0856ebb20 0000000003f898ae
0x00007fb0856eba00:   00007fb0856ebb10 00007fb0854ef65d
0x00007fb0856eba10:   0000000000000000 00007fb07c174108
0x00007fb0856eba20:   00007fb0856f19c8 00007fb0518aa1af
0x00007fb0856eba30:   00007fb084b10d48 00007fb0518a73b8
0x00007fb0856eba40:   0000000500000000 000000010000057d
0x00007fb0856eba50:   0000000000000001 00007fb07c174108
0x00007fb0856eba60:   00007fb0856ebbb0 00007fb07c16ff38
0x00007fb0856eba70:   00007fb0856ebbd8 00007fb07c16fbe0
0x00007fb0856eba80:   0000000000000001 00007fb0854ef65d
0x00007fb0856eba90:   0000000000000000 00007fb07c174108 

Instructions: (pc=0x00007fb084b55de4)
0x00007fb084b55dc4:   48 8b 02 48 89 85 78 fe ff ff 48 8b 42 08 48 89
0x00007fb084b55dd4:   85 80 fe ff ff 48 8b 42 10 48 89 85 88 fe ff ff
0x00007fb084b55de4:   8b 87 c0 00 00 00 85 c0 0f 85 a9 08 00 00 c7 87
0x00007fb084b55df4:   c0 00 00 00 ff ff ff ff 41 8b 07 a8 04 0f 85 b9 

Register to memory mapping:

RAX=0x00007fb0856ebb90 is pointing into the stack for thread: 0x00007fb07c009800
RBX=0x00007fb0856ec4d0 is pointing into the stack for thread: 0x00007fb07c009800
RCX=0x0000000000000000 is an unknown value
RDX=0x00007fb0856ebb78 is pointing into the stack for thread: 0x00007fb07c009800
RSP=0x00007fb0856eb8a0 is pointing into the stack for thread: 0x00007fb07c009800
RBP=0x00007fb0856ebb60 is pointing into the stack for thread: 0x00007fb07c009800
RSI=0x00007fb0518b8415: <offset 0x12415> in /usr/local/jna-test/libopencv_example.so at 0x00007fb0518a6000
RDI=0x0000000000000000 is an unknown value
R8 =0x00007fb0856ed700 is pointing into the stack for thread: 0x00007fb07c009800
R9 =0x00007fb0518b8415: <offset 0x12415> in /usr/local/jna-test/libopencv_example.so at 0x00007fb0518a6000
R10=0x00007fb0856eba10 is pointing into the stack for thread: 0x00007fb07c009800
R11=0x00007fb084b668c0: fscanf+0 in /lib64/libc.so.6 at 0x00007fb084b00000
R12=0x0000000000000000 is an unknown value
R13={method} {0x00007fb080a3e728} 'invokeInt' '(I[Ljava/lang/Object;)I' in 'com/sun/jna/Function'
R14=0x00007fb0856ec758 is pointing into the stack for thread: 0x00007fb07c009800
R15=0x0000000000000000 is an unknown value


Stack: [0x00007fb0855ed000,0x00007fb0856ee000],  sp=0x00007fb0856eb8a0,  free space=1018k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libc.so.6+0x55de4]  _IO_vfscanf+0x64
C  [libc.so.6+0x66947]  fscanf+0x87
C  [jna1626041547425739112.tmp+0x13f64]  ffi_call_unix64+0x4c
C  0x00007fb0856ec6b0

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.sun.jna.Function.invokeInt(I[Ljava/lang/Object;)I+0
j  com.sun.jna.Function.invoke([Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object;+309
j  com.sun.jna.Function.invoke(Ljava/lang/Class;[Ljava/lang/Object;Ljava/util/Map;)Ljava/lang/Object;+194
j  com.sun.jna.Library$Handler.invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;+344
j  com.sun.proxy.$Proxy0.getModel(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I+24
j  com.microservice.common.utils.so.MyLibOpenCv.main([Ljava/lang/String;)V+17
v  ~StubRoutines::call_stub
  • 写回答

2条回答 默认 最新

  • a1767028198 2022-11-10 11:23
    关注

    打开visualVM,看一下监控信息,这种问题看他自己导出来的东西意义不太大

    评论

报告相同问题?

问题事件

  • 创建了问题 11月10日

悬赏问题

  • ¥15 对于这个问题的代码运行
  • ¥50 三种调度算法报错 有实例
  • ¥15 关于#python#的问题,请各位专家解答!
  • ¥200 询问:python实现大地主题正反算的程序设计,有偿
  • ¥15 smptlib使用465端口发送邮件失败
  • ¥200 总是报错,能帮助用python实现程序实现高斯正反算吗?有偿
  • ¥15 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存
  • ¥15 CST保存项目时失败