我們有一個運行在Java 6更新45中的JBoss應用程序服務器。我們正在運行OutOfMemoryErrors,這是我們最有可能介紹的。我們想分析這些並想創建一個堆轉儲。這在下面的例外情況下失敗。由於ReadVirtual失敗而無法創建堆轉儲
谷歌搜索和搜索stackoverflow並沒有幫助我很多,有沒有人有關於如何從這臺機器獲得堆轉儲的想法?
謝謝!
馬丁
唯一的例外是:
C:\>"d:\Program Files\Java\bin\"jmap -F "-dump:format=b,file=D:\heapdumps\20130620_085902_heap.dump" 1832
Attaching to process ID 1832, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 20.45-b01
Dumping heap to D:\heapdumps\20130620_085902_heap.dump ...
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: sun.jvm.hotspot.debugger.DebuggerException: Windbg Error: ReadVirtual failed!
at sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.readBytesFromProcess0(Native Method)
at sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.readBytesFromProcess(WindbgDebuggerLocal.java:485)
at sun.jvm.hotspot.debugger.DebuggerBase$Fetcher.fetchPage(DebuggerBase.java:76)
at sun.jvm.hotspot.debugger.PageCache.getPage(PageCache.java:178)
at sun.jvm.hotspot.debugger.PageCache.getInt(PageCache.java:96)
at sun.jvm.hotspot.debugger.DebuggerBase.readCInteger(DebuggerBase.java:355)
at sun.jvm.hotspot.debugger.DebuggerBase.readCompOopAddressValue(DebuggerBase.java:459)
at sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.readCompOopHandle(WindbgDebuggerLocal.java:332)
at sun.jvm.hotspot.debugger.windbg.WindbgAddress.getCompOopHandleAt(WindbgAddress.java:122)
at sun.jvm.hotspot.oops.Oop.getKlassForOopHandle(Oop.java:235)
at sun.jvm.hotspot.oops.ObjectHeap.newOop(ObjectHeap.java:378)
at sun.jvm.hotspot.oops.ObjectHeap.iterateLiveRegions(ObjectHeap.java:464)
at sun.jvm.hotspot.oops.ObjectHeap.iterate(ObjectHeap.java:249)
at sun.jvm.hotspot.utilities.AbstractHeapGraphWriter.write(AbstractHeapGraphWriter.java:51)
at sun.jvm.hotspot.utilities.HeapHprofBinWriter.write(HeapHprofBinWriter.java:416)
at sun.jvm.hotspot.tools.HeapDumper.run(HeapDumper.java:56)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:221)
at sun.jvm.hotspot.tools.HeapDumper.main(HeapDumper.java:77)
... 6 more
[此錯誤](http://bugs.sun.com/view_bug.do ?bug_id = 6987812)似乎相關,但它已被標記爲固定... – fge
是的,這是我在谷歌搜索中發現的帖子,但它不應該是6u45 JDK中的問題...... – SunSear
也許你可以嘗試使用OpenJDK 6重現問題,並且如果可重現的話,可以打開一個bug。 – fge