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
3
votes
3 answers

Heap dump != virtual memory?

Not really being knowledgeable about Java and especially about debugging in Java, but taking a heap dump in Jenkins using Monitoring and then decoding it in Eclipse with MAT shows total memory used 169.4 MB, while in Jenkins monitoring the memory…
Zloj
  • 2,235
  • 2
  • 18
  • 28
3
votes
1 answer

Why can't I see GC roots?

I have an application that crashed with an OutOfMemory. I loaded the phd file from the crash into Eclipse Memory Analyzer. I promptly identified a rather suspicious ArrayList with about 5,700,000 entries, each being a String with the content of 16…
Jens Schauder
  • 77,657
  • 34
  • 181
  • 348
3
votes
2 answers

Error Opening heap dump

I'm unable to open a heap dump using the standalone eclipse memory analyzer, or visualVM. I've tried two different hprof files. VisualVM just hangs at loading heap dump, and eclipse memory analyzer gives me the below error. Error opening heap…
SwimJim
  • 89
  • 3
  • 19
3
votes
1 answer

JMap.java - Timed out while attempting to connect to debug server - SwDbgSrv.exe

I'm trying to run and debug the utilies from sun.jvm.hotspot.tools and sun.jvm.hotspot.utilities (like JMap.java) in order to understand better what is going on. Unfortunately I get stuck very early with the following error message and don't even…
Haasip Satang
  • 457
  • 3
  • 17
3
votes
3 answers

while during npm install with heapdump faciing below error

while install heapdump using nodejs I am facing below error message. I have installed python on the system also. I have to install heapdump package in node_module. Below is the part of package.json where i have specified the heapdump version. …
user3118131
  • 71
  • 1
  • 6
3
votes
2 answers

What is the best format for Heapdump file to analyze? Is it hprof?

I was assigned to find the root cause for Full GC issue (Garbage Collector) in our production environment. It occurs randomly and I believe the most probable case as a memory leak present in the current application. I hope to take a memory dump from…
Asanka Siriwardena
  • 871
  • 13
  • 18
3
votes
0 answers

heroku R14 errors with java Play 1 app running on OpenJDK 1.8

I recently updated a Play v1 app to use OpenJDK v1.8 on Heroku and am finding that after typical load I start getting R14 errors relatively quickly - the physical memory has exceeded the 512MB limit and is now swapping impacting performance. I need…
tazmaniax
  • 406
  • 1
  • 6
  • 13
3
votes
1 answer

VisualVM 1.3.8 OQL - TypeError: [RegExp /java.lang./] is not a function

When executing below OQL, it gives TypeError: [RegExp /java.lang./] is not a function select filter(heap.classes(), "/java.lang./(it.name)") Should that work? Refer to OQL all instances from a package Also, may I know if OQL is a "standard" for…
Lewis Wong
  • 269
  • 1
  • 3
  • 17
3
votes
3 answers

how to disable creating java heap dump after VM crashes?

JVM runs on FreeBSD with 18Gb memory. creating core file takes about hour, which is very slow, so i need some way to disable it.
antony
  • 162
  • 2
  • 10
3
votes
2 answers

Java Eclipse Create Heap-Dump on Breakpoint

How do I make a heapdump at a breakpoint in eclipse? My Java program has 2 versions that do the same thing with 2 different methods. One of these methods runs into a Heap Space Exception but the other doesn't. I was able to get the heapdump for the…
user3376293
  • 89
  • 1
  • 4
3
votes
1 answer

Preview heap from dump file using Visual Studio

I'm very new on debugging dumps so still have some questions. I've read some questions about debugging dumps and now I've attached my code to dump and can see some values of variables. My question is how to preview raw heap data. I want this because…
ST3
  • 8,826
  • 3
  • 68
  • 92
3
votes
8 answers

How to resolve java.lang.OutOfMemoryError error by "java.lang.String", loaded by "" Eclipse Memory Analyzer

I am Reading Some Large XML files and Storing them into Database. It is arond 800 mb. It stores many records and then terminates and gives an exception: Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at…
Shiv
  • 4,569
  • 4
  • 25
  • 39
3
votes
1 answer

allocation annotated heap dump

Is there any existing tool that can take Java heap dumps with allocation site annotations? With such a heap dump, we can aggregate runtime objects by their allocation site (roughly speaking, the new statement that creates the object), in addition to…
dacongy
  • 2,504
  • 3
  • 30
  • 48
3
votes
3 answers

Detect root cause in heap dumps in java

In a java heap dump how do I know exactly where in the code/which thread caused the dump?
Jim
  • 18,826
  • 34
  • 135
  • 254
3
votes
4 answers

how to take jave heap dump every 30 seconds using kill -3 command

Please help in this, i want to run a shell script where it should take jave heap dump every 30 seconds using kill -3 command. Thanks in advance.