2013-11-20 24 views
17
kullanarak heapDump çekerken

Benİstisna JMAP

JMAP -F -dump kullanarak heapDump alırken aşağıdaki özel durum almak: format = b file =/tmp/heapDump/before.hprof 10737

Attaching to process ID 10737, 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:361) 
    at sun.jvm.hotspot.HotSpotTypeDataBase.readVMStructs(HotSpotTypeDataBase.java:252) 
    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.HeapDumper.main(HeapDumper.java:77) 

Bunu nasıl çözeceğini bilen var mı?

cevap

28

Aynı hatayı görüyordum çünkü jmap yolum, java işleminin yolu ile aynı değildi (yani, iki farklı sürümü hedefliyor).

Jmap'i JDK'mın tam yolu ile çalıştırmak onu çözdü.

+0

Teşekkür, ben aynı sorunu koştum ve ben farklı jdk sürümünü kullanarak çünkü öyleydi jmap'i çalıştır. – Scot

+2

Sadece bir JDK yüklüyse ve işlemin kullandığıyla aynı olsa da bu hatayı görüyorum. – jan