1

I'm trying to collect the heap dump on AWS ec2-instance. The file size of the heap dump was more than 6G. So my AWS linux Filesystem looks like this.

Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1      7.8G  1.7G  6.0G  22% /
devtmpfs         16G  4.9M   16G   1% /dev
tmpfs            16G     0   16G   0% /dev/shm

Whenever I tried to capture the heap dump using jmap, it uses /de/xvda1 Filesystem which id of 7.8G. Since my heap dump was big, I tried to capture the heapdump in another Filesystem devtmpfs 16G 4.9M 16G 1% /dev which is 16G. But I'm facing some user related issues. I'm trying to collect heap dump using sudo jmap -F -dump:format=b,file=mock-dump.hprof 8089 this command. But I got the following error

Attaching to process ID 8089, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.111-b15
Dumping heap to mock-dump.hprof ...
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.tools.jmap.JMap.runTool(JMap.java:201)
at sun.tools.jmap.JMap.main(JMap.java:130)
Caused by: java.lang.InternalError: Metadata does not appear to be polymorphic
at sun.jvm.hotspot.types.basic.BasicTypeDataBase.findDynamicTypeForAddress(BasicTypeDataBase.java:278)
at sun.jvm.hotspot.runtime.VirtualBaseConstructor.instantiateWrapperFor(VirtualBaseConstructor.java:102)
at sun.jvm.hotspot.oops.Metadata.instantiateWrapperFor(Metadata.java:68)

The java process I'm running is as follows: ec2-user 8089 8035 0 03:53 pts/2 00:00:09 java -jar xxxx.jar -c test.csv So I tried to capture the heap dump as the ec2-user sudo -u ec2-user sudo jmap -F -dump:format=b,file=mock-dump.hprof 8089 but still I did not see any change. I was unable to capture the heapmdump. If anyone faced this situation before and may have solution for this which would really help. Please kindly respond and help me. Thanks in advance

krish
  • 349
  • 3
  • 17
  • @Jim Garrison, I looked into that question already which did not helped. I specified that as well in my question. Please remove the duplicate tag – krish Dec 14 '16 at 11:52

0 Answers0