• RuntimeException: Type "nmethodBucket*", referenced in VMStructs::localHotSpotVMStructs in the remot


    问题:使用jmap命令查看某个进程的堆情况时(jmap -heap 198376),抛异常如下:

    Attaching to process ID 198376, please wait...
    Exception in thread "main" java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at sun.tools.jmap.JMap.runTool(JMap.java:179)
            at sun.tools.jmap.JMap.main(JMap.java:110)
    Caused by: java.lang.RuntimeException: Type "nmethodBucket*", 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.
            at sun.jvm.hotspot.HotSpotTypeDataBase.lookupOrFail(HotSpotTypeDataBase.java:362)
            at sun.jvm.hotspot.HotSpotTypeDataBase.readVMStructs(HotSpotTypeDataBase.java:253)
            at sun.jvm.hotspot.HotSpotTypeDataBase.<init>(HotSpotTypeDataBase.java:87)
            at sun.jvm.hotspot.bugspot.BugSpotAgent.setupVM(BugSpotAgent.java:568)
            at sun.jvm.hotspot.bugspot.BugSpotAgent.go(BugSpotAgent.java:494)
            at sun.jvm.hotspot.bugspot.BugSpotAgent.attach(BugSpotAgent.java:332)
            at sun.jvm.hotspot.tools.Tool.start(Tool.java:163)
            at sun.jvm.hotspot.tools.HeapSummary.main(HeapSummary.java:39)
            ... 6 more

    解决方法:

    抛异常原因是该进程运行所用的java和使用jmap时的java不是同一个版本,使用和所运行程序相同的java版本即可。很可能是因为机器上装有多个jdk,默认路径下的jmap和所运行进程使用的不是同一个jdk,所以抛异常了。解决办法是使用全路径,如/usr/local/jdk1.7.0_80/bin/jmap -heap 198376

    http://blog.csdn.net/prstaxy/article/details/51097605

  • 相关阅读:
    JS中数组去除重复的方法
    ember.js里的实用方法
    Ember入门指南——教程目录
    如何解决问题?
    Web前端开发工程师基本要求
    (转)轻松学习JavaScript三:JavaScript与HTML的结合
    (转)JavaScript二:JavaScript语言的基本语法要求
    HTML的checkbox和radio的美化
    C#串口通信—向串口发送数据,同步接收返回数据
    C#生成验证码
  • 原文地址:https://www.cnblogs.com/fuyuanming/p/7504963.html
Copyright © 2020-2023  润新知