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
    
Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐