混合模式下的jstack:WrongTypeException:地址类型不匹配 [英] jstack in mixed mode: WrongTypeException: No suitable match for type of address

查看:925
本文介绍了混合模式下的jstack:WrongTypeException:地址类型不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试以混合模式在ubuntu上运行jstack:

I'm trying to run jstack on ubuntu in mixed mode:

 $ jstack -m 7219     

结果是此异常:

Attaching to process ID 7219, please wait...
Debugger attached successfully.
Server compiler detected.
  JVM version is 25.162-b12
  Exception in thread "main" java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)        
    at java.lang.reflect.Method.invoke(Method.java:498)
    at sun.tools.jstack.JStack.runJStackTool(JStack.java:140)
    at sun.tools.jstack.JStack.main(JStack.java:106)
 Caused by: java.lang.RuntimeException: Unable to deduce type of thread from address 0x00007f02cc002800 (expected type JavaThread, CompilerThread, ServiceThread, JvmtiAgentThread, or SurrogateLockerThread)
    at sun.jvm.hotspot.runtime.Threads.createJavaThreadWrapper(Threads.java:166)
    at sun.jvm.hotspot.runtime.Threads.first(Threads.java:150)
    at sun.jvm.hotspot.tools.PStack.initJFrameCache(PStack.java:200)
    at sun.jvm.hotspot.tools.PStack.run(PStack.java:71)
    at sun.jvm.hotspot.tools.PStack.run(PStack.java:58)
    at sun.jvm.hotspot.tools.PStack.run(PStack.java:53)
    at sun.jvm.hotspot.tools.JStack.run(JStack.java:66)
    at sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:260)
    at sun.jvm.hotspot.tools.Tool.start(Tool.java:223)
    at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
    at sun.jvm.hotspot.tools.JStack.main(JStack.java:92)
    ... 6 more
  Caused by: sun.jvm.hotspot.types.WrongTypeException: No suitable match for type of address 0x00007f02cc002800
    at sun.jvm.hotspot.runtime.InstanceConstructor.newWrongTypeException(InstanceConstructor.java:62)
    at sun.jvm.hotspot.runtime.VirtualConstructor.instantiateWrapperFor(VirtualConstructor.java:80)
    at sun.jvm.hotspot.runtime.Threads.createJavaThreadWrapper(Threads.java:162)
    ... 16 more

使用与jstack相同的用户启动PID 7219的过程.

The process with PID 7219 was started with the same user as jstack.

推荐答案

我在Ubuntu上也遇到了同样的问题,安装了openjdk-9-jdk-headless,仅jstack可以正常工作,但是jstack -m会失败,并出现与以下相同的错误你.

I've had the same issue on Ubuntu, with openjdk-9-jdk-headless installed, jstack alone would work fine but jstack -m would fail with same error as you.

安装openjdk-9-dbg(带有调试符号的软件包)可以解决此问题.

Installing openjdk-9-dbg (package that brings debug symbols) solved it.

这篇关于混合模式下的jstack:WrongTypeException:地址类型不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆