Running jmap through Jenkins on a slave machine
I have a machine running Tomcat7 in the Remote Desktop Session. I want to
be able to disconnect from the machine but to be able to get heap dumps
every now and then through Jenkins. When I run jmap from the command line
on that machine, it succeeds. However trying to run it through Jenkins
slave causes following error:
c:\Software\jdk\bin>jmap -F
-dump:file=d:\hudson\workspace\heapdump67\dump_67_19.jmap 27660
Attaching to process ID 27660, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 23.3-b01
Dumping heap to d:\hudson\workspace\heapdump67\dump_67_19.jmap ...
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at sun.tools.jmap.JMap.runTool(JMap.java:197)
at sun.tools.jmap.JMap.main(JMap.java:128)
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:231)
at sun.jvm.hotspot.oops.ObjectHeap.newOop(ObjectHeap.java:380)
at
sun.jvm.hotspot.oops.ObjectHeap.iterateLiveRegions(ObjectHeap.java:466)
at sun.jvm.hotspot.oops.ObjectHeap.iterate(ObjectHeap.java:244)
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
At this point I just do not know what to do.
No comments:
Post a Comment