admin管理员组

文章数量:1641785

Linux下在调试JVM虚拟机时遇到的问题


  1. Exception in thread "main" java.lang.RuntimeException: Type "GrowableArrayBase", referenced in VMStructs::localHotSpotVMStructs in the remote VM, was not present in the remote VMStructs::localHotSpotVMTypes table (should have been caught in the debug build of that VM). Can not continue.

    解决方法: 应该是虚拟机版本不对应

  2. Exception in thread "AWT-EventQueue-1" java.lang.RuntimeException: Unable to deduce type of thread from address 0x00007fad300e5000 (expected type JavaThread, CompilerThread, ServiceThread, JvmtiAgentThread, or SurrogateLockerThread)

    解决方法: 必须得安装对应版本的debug软件包,比如如果安装了openjdk-11-jdk,就必须还得安装openjdk-11-dbg

  3. ptrace(PTRACE_ATTACH, ..) failed for 219: Operation not permitted,

    解决方法: 必须得在/etc/sysctl.conf下输入这个参数

    kernel.yama.ptrace_scope = 0
    

    使参数立即生效

    sysctl -p
    

本文标签: 机时LinuxJVM