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
267
votes
20 answers

How to get a thread and heap dump of a Java process on Windows that's not running in a console

I have a Java application that I run from a console which in turn executes an another Java process. I want to get a thread/heap dump of that child process. On Unix, I could do a kill -3 but on Windows AFAIK the only way to get a thread dump is…
macgreg
77
votes
8 answers

How can I analyze a heap dump in IntelliJ? (memory leak)

I have generated a heap dump from my java application which has been running for some days with the jmap tool -> this results in a large binary heap dump file. How can I perform memory analysis of this heap dump within IntellIJ IDEA? I know that…
vikingsteve
  • 38,481
  • 23
  • 112
  • 156
66
votes
5 answers

Difference between javacore, thread dump and heap dump in Websphere

Can someone tell me the exact difference between javacore, thread dump and heap dump? Under which situation each of these are used??
Sargunan
46
votes
3 answers

Android ==> Memory Analysing ==> Eclipse memory analyzer?

I need to check my application for memory leaks, i also need to see the memory allocation of my application. I downloaded and installed eclipse memory analyzer, and it looks like the first step is to open a heap dump. But what is a heap dump, how…
aryaxt
  • 76,198
  • 92
  • 293
  • 442
35
votes
4 answers

Java Heap Dump error - Metadata does not appear to be polymorphic

I get this Stacktrace when trying to take a heap dump from a running Java process. What causes this and what do I have to do to make a proper heap dump? Dumping heap to dump.bin ... Exception in thread "main"…
Rob Audenaerde
  • 19,195
  • 10
  • 76
  • 121
27
votes
7 answers

Tool or tricks to analyze offline Java heap dumps (.hprof)

Are there any tools that allow offline analysis (including summary/sorting/sifting) of an .hprof file? Or can you run VisualVM, hat etc in batch mode? I'm interested in something that can take an input .hprof file, crunch it and generate reports.…
user331465
  • 2,984
  • 13
  • 47
  • 77
27
votes
5 answers

how to increase java heap memory permanently?

I have one problem with java heap memory. I developed one client server application in java which is run as a windows service it requires more than 512MB of memory. I have 2GB of RAM but when I run my application it throws an exception Out of…
Mr.Cool
  • 1,525
  • 10
  • 32
  • 51
25
votes
2 answers

Java Out of memory automatic heap dump file name

I have several Java processes and I am trying to manage the heap dumps created when OOM error occur. When I say manage I mean name the heap dump differently, based on the originating process delete older heap dumps to preserve disk space When…
Dan M
  • 770
  • 1
  • 9
  • 18
23
votes
2 answers

Why is my Java heap dump size much smaller than used memory?

Problem We are trying to find the culprit of a big memory leak in our web application. We have pretty limited experience with finding a memory leak, but we found out how to make a java heap dump using jmap and analyze it in Eclipse MAT. However,…
Thermometer
  • 2,567
  • 3
  • 20
  • 41
21
votes
3 answers

Is it possible to instantiate a jvm from a heap dump?

Everyone knows that a heap dump can be obtained from a running JVM. Is the other way possible? Can we start a JVM using a heap dump? I have been having this question in mind for a long time now. If this is possible it would solve a lot of time and…
Siva
  • 219
  • 1
  • 5
19
votes
3 answers

How do I produce a heap dump with only a JRE?

We have a JRE installed on our production environment, but not a JDK. The versions of the JRE and OS are below. [me@mymachine ~]$ java -version java version "1.6.0_45" Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot(TM) 64-Bit…
Dave
  • 15,639
  • 133
  • 442
  • 830
18
votes
2 answers

What do the Android Studio HPROF reference tree element colours represent?

Can someone tell me what does bold, blue one and red one positions in HPROF Viewer in Android Studio means exactly ? I ask about one in Reference Tree panel. Best regards.
Pawel Urban
  • 1,316
  • 1
  • 12
  • 28
18
votes
2 answers

Using -XX:HeapDumpPath option but want to integrate the process id

When using -XX:+HeapDumpOnOutOfMemoryError the JVM will not overwrite the heap dump if there is already a dump file under the specified path. I want to be able to have multiple heap dumps in a non-default location, and was planning on using the pid…
Nina
  • 181
  • 1
  • 2
  • 3
18
votes
2 answers

How to convert a heap dump in android to eclipse format

Im attempting to analyze a memory leak that has been driving me crazy for weeks, I found out about the eclipse MAT tool that helps you to figure out what is wrong, the problem is every single tutorial I have found says that I need to convert the…
Edmund Rojas
  • 6,376
  • 16
  • 61
  • 92
17
votes
1 answer

How to get a heap dump from Kubernetes k8s pod?

Please provide a simple step by step guide to looking into java heap dump from a Kubernetes pod.
1
2 3
32 33