<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
<table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tbody>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tbody>
<tr>
<td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
<h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
<!-- To have a header image/logo replace the name below with your img tag -->
<!-- Email clients will render the images when the message is read so any image -->
<!-- must be made available on a public server, so that all recipients can load the image. -->
<a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Unable to generate heapdump with jmap
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/dfresh4130">Doug S</a> in <i>Beginner's Corner</i> - <a href="http://community.jboss.org/message/580678#580678">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hey All,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I wasn't sure where this topic belongs so I figured I'd try here and let it be moved if it needs to.  </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I have an environment running JbossAS 4.2.0.GA_CP05_EAP with ATG on top on a virtualized redhat linux OS.  I believe we have memory leak issues in the code and am trying to generate a heapdump manually with the jmap command but having issues.  I'm running the command jmap -heap:format=b <pid> and let it write the heapdump to my current directory.  The command starts up fine and the heapdump starts writing, but it's writing extremely slow.  It only writes about 120KB/second and just stops when the heapdump file gets to around 21MB.  After that the session where I initiated the command just starts spitting out data like below to the stdout.  The exception at the end is what happens when I ctrl-c. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: courier new,courier; font-size: 8pt;">Free chunk in CMS heap, size=64</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">Free chunk in CMS heap, size=64</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">Free chunk in CMS heap, size=64</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">Free chunk in CMS heap, size=64</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">Free chunk in CMS heap, size=64</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">Free chunk in CMS heap, size=64</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">Free chunk in CMS heap, size=64</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">Free chunk in CMS heap, size=64</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">Free chunk in CMS heap, size=64</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">Free chunk in CMS heap, size=544550792</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">Exception in thread "main" java.lang.RuntimeException: VM.initialize() was not yet called</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">        at sun.jvm.hotspot.runtime.VM.getVM(VM.java:313)</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">        at sun.jvm.hotspot.oops.Oop.alignObjectOffset(Oop.java:104)</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">        at sun.jvm.hotspot.oops.InstanceKlass.getObjectSize(InstanceKlass.java:656)</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">        at sun.jvm.hotspot.memory.CompactibleFreeListSpace.getLiveRegions(CompactibleFreeListSpace.java:123)</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">        at sun.jvm.hotspot.oops.ObjectHeap$LiveRegionsCollector.doSpace(ObjectHeap.java:514)</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">        at sun.jvm.hotspot.memory.ConcurrentMarkSweepGeneration.spaceIterate(ConcurrentMarkSweepGeneration.java:49)</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">        at sun.jvm.hotspot.oops.ObjectHeap.addPermGenLiveRegions(ObjectHeap.java:479)</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">        at sun.jvm.hotspot.oops.ObjectHeap.collectLiveRegions(ObjectHeap.java:559)</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">        at sun.jvm.hotspot.oops.ObjectHeap.iterate(ObjectHeap.java:226)</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">        at sun.jvm.hotspot.utilities.AbstractHeapGraphWriter.write(AbstractHeapGraphWriter.java:34)</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">        at sun.jvm.hotspot.utilities.HeapHprofBinWriter.write(HeapHprofBinWriter.java:399)</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">        at sun.jvm.hotspot.tools.JMap.writeHeapHprofBin(JMap.java:133)</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">        at sun.jvm.hotspot.tools.JMap.writeHeapHprofBin(JMap.java:143)</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">        at sun.jvm.hotspot.tools.JMap.run(JMap.java:71)</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">        at sun.jvm.hotspot.tools.Tool.start(Tool.java:204)</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">        at sun.jvm.hotspot.tools.JMap.main(JMap.java:126)</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I'm not sure where to go from this point.  I need to generate them on the fly because I'm not running into any OOM scenarios.  Below is my java version info as well.  Can anyone point me in the right direction?  Thanks</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: courier new,courier; font-size: 8pt;">$ /tools/jdk1.5.0_16_64bit/bin/java -version</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">java version "1.5.0_16"</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_16-b02, mixed mode)</span></p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/580678#580678">going to Community</a></p>
<p style="margin: 0;">Start a new discussion in Beginner's Corner at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>