Questions tagged [heap-dump]

A heap dump is a snapshot of the memory of a Java process.

A heap dump is a snapshot of the memory of a Java process.

The snapshot contains information about the Java objects and classes in the heap at the moment the snapshot is triggered. Because there are different formats for persisting this data, there might be some differences in the information provided. Typically, a full garbage collection is triggered before the heap dump is written, so the dump contains information about the remaining objects in the heap.

All Objects: Class, fields, primitive values, and references.

All Classes: Class loader, name, super class, and static fields.

Garbage collection roots: Objects defined to be reachable by the JVM.

Thread Stacks and Local Variables: Call-stacks of threads at the moment of the snapshot, and information about local objects on a frame by frame basis.

A heap dump does not contain allocation information, therefore you cannot work out what created the objects or where the objects were created.

Source

485 questions
5
votes
1 answer

Extracting Heap-dump (hprof) from Core-dump

Currently I have a core-dump file and I would like to extract the heap-dump. Whatever I tried I always get the following error message: god@heaven:~$ sudo /opt/java-MyApp/bin/jmap -dump:format=b,file=my-file.hprof /opt/java-MyApp/bin/java…
Francisco Spaeth
  • 23,493
  • 7
  • 67
  • 106
5
votes
5 answers

Location of Java dump heap file when using jconsole?

Well this is embarrassing ... I'm starting to play with the Eclipse Memory Analyzer to look for Java memory leaks on a Windows box. Step 1 is to obtain a heap dump file. To do this I start my Java (javaw.exe) process from within Eclipse and…
Jim Ferrans
  • 30,582
  • 12
  • 56
  • 83
5
votes
1 answer

Does not Java create heapdump when native allocation fails

The JVM is started using parameter -XX:+HeapDumpOnOutOfMemoryError. But its not creating heapdump on outofmemory. Does not Java create heapdump when native allocation fails? Following is the log: # There is insufficient memory for the Java Runtime…
5
votes
3 answers

Generate Java Heap Dump on uncaught Exception

I try to generate a Heap Dump when a uncaught exception is fired. I tried using jmap, but because the process is finished when the exception happens this is not possible. Using a UncaughtExceptionHandler is no option either, because I only have the…
skappler
  • 722
  • 1
  • 10
  • 26
5
votes
2 answers

Java 7 trigger heap dump without having JDK installed

How can I trigger a heap dump for a Java 7 VM running on Linux without having a JDK installed? In earlier versions of Java it was possible to set the -XX:+HeapDumpOnCtrlBreak JVM option and then trigger a heap dump by using kill -QUIT . I have…
Michael
  • 2,460
  • 3
  • 27
  • 47
5
votes
1 answer

Is it possible to choose whether to generate heap dump or not on the fly?

We have an application which is deployed to a WebSphere server running on UNIX, and we are experiencing two issues: a system hang which recovers after a few minutes - to investigate, we will need the thread dump (javacore). a system hang which does…
Andy
  • 2,770
  • 9
  • 35
  • 42
4
votes
1 answer

Can I run Java garbage collection against a heap dump file?

I have a huge Java heap dump file. It also contains (I believe) unreachable objects, that would be garbage collected by the JVM (or so one hopes). Is there a tool that allows me to run the garbage collector against this file, so that I can get rid…
Thilo
  • 257,207
  • 101
  • 511
  • 656
4
votes
1 answer

Java Memory issue : Java.lang.ref.finalizer object

In most of the research about the memory leak caused by finalizer object, either in our code or in a dependent library, one should be overriding the finalize method. But in my whole project its nowhere used. (I am using Java8) I am facing a memory…
arqam
  • 3,582
  • 5
  • 34
  • 69
4
votes
2 answers

How can I analyse large size heap dump around of 35-40 GB

I have to analyse java heap dump of size 35-40GB, which can't be loaded on local machine except of remote servers of large memory. I found Tool for analyzing large Java heap dumps as the best link till now. But after configuring all the things and…
4
votes
2 answers

Extract JVM uptime from binary heap dump

I am analyzing several heap dumps and am interested in a way that I can get the JVM uptime (or start time) from the heap dump. Using eclipse memory analyzer I can easy get the System Properties and class path but can't find a way to find uptime.
turbanoff
  • 2,439
  • 6
  • 42
  • 99
4
votes
1 answer

How to get heap dump in AdoptOpenJDK?

I am using CentOS. How to get heap dump in AdoptOpenJDK? Terminal commands like jcmd GC.heap_dump or jmap -dump:live,file= don't work. Is there a simple way to get dump of a Java application by using PID?
user8116296
4
votes
1 answer

How do I extract a timestamp from the heap dump

Unfortunately, I forgot to record the time that I took the heap dump. I hope that somewhere in the heap, the standard library caches something like System.currentTimeMillis(). Unfortunately, I do not have any business objects that cache it. One…
joseph
  • 2,429
  • 1
  • 22
  • 43
4
votes
1 answer

Dumping Java Heap File on OutOfMemoryError using Jmap

I've been trying to dump the heap file when an OutOfMemoryError occurs on a given Java process using Jmap. I have been able to dump the heap file but I want to add the HeapDumpOnOutOfMemoryError flag to Jmap but I think I'm doing something wrong. Am…
Eduardo Morales
  • 764
  • 7
  • 29
4
votes
1 answer

is JVM stopped while executing jmap -heap option?

usage) Jmap -heap [PID] Hello I have jmap question I want to view only size (-heap option) Heap Dump No... If I run [jmap -heap PID] running jvm process is STOP THE WORLD?
ChulK
  • 49
  • 6
4
votes
3 answers

IBM Heap Dump Analyzer | Out of memory

I am running on 7 GM Ram machine , I have a heap dump file of size 1.8 GB . I am using Java 8 of 64 bit and running on 64 bit machine. When i try to open the phd file from heap dump analyzer tool , it throws out of memory error. I am setting java vm…
Vinay b
  • 139
  • 1
  • 2
  • 15