当我在 AIX 7.1 上使用 --agentpath:libxxx.so 启动 Java 应用程序时,收到 SIGILL 并且 JVM 崩溃

当我在 AIX 7.1 上使用 --agentpath:libxxx.so 启动 Java 应用程序时,收到 SIGILL 并且 JVM 崩溃

我的动态共享库符合 CPPFlAGS: -q64 -G。编译器版本是

IBM XL C/C++ for AIX, V11.1 (5724-X13)
Version: 11.01.0000.0024

当它启动后崩溃时,以下是 hs_err*.log 中的部分信息。似乎这个错误是由dlopen

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x0000000000000000, pid=4194314, tid=0x0000000000000102
#
# JRE version:  (8.0) (build )
# Java VM: OpenJDK 64-Bit Server VM (0x8898-b00 mixed mode aix-ppc64 compressed oops)
# Problematic frame:
# C  [libC.a+0xffffffff]  std::char_traits<char>::length(const char*)+0x10

这是崩溃时的完整堆栈。

Stack: [0x000000011001b000,0x000000011021a000],  sp=0x0000000110217a80,  free space=2034k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libC.a+0xffffffff]  std::char_traits<char>::length(const char*)+0x10
C  [libC.a+0xffffffff]  std::basic_ostream<char,std::char_traits<char> >& std::operator<<<std::char_traits<char> >(std::basic_ostream<char,std::char_traits<char> >&,const char*)+0x1cc
C  0x090000000c793038
C  0x090000000c78e3b8
C  0x090000000c78dfec
C  0x090000000c784498
C  [libC.a+0xffffffff]  <nameless function>+0x64
C  [libc.a+0xffffffff]  initialize_one_library+0x1c0
C  [libc.a+0xffffffff]  initialize_libs+0x98
C  [libc.a+0xffffffff]  load_libs+0x438
C  [libc.a+0xffffffff]  loadAndInit+0x260
C  [libc.a+0xffffffff]  dlopen+0x3a4
V  [libjvm.so+0xffffffff]  os::dll_load(const char*,char*,int)+0x130
V  [libjvm.so+0xffffffff]  lookup_on_load(AgentLibrary*,const char**,unsigned long)+0x94
V  [libjvm.so+0xffffffff]  Threads::create_vm(JavaVMInitArgs*,bool*)+0x1708
V  [libjvm.so+0xffffffff]  JNI_CreateJavaVM+0xac
C  [java+0xffffffff]  <nameless function>+0x94
C  [java+0xffffffff]  <nameless function>+0x88
C  [libpthreads.a+0xffffffff]  _pthread_body+0xf4

相关内容