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
8
votes
1 answer

Why is Java11 keeping java.util.zip.ZipFile$Source on heap?

Can somebody help me understand if what I see is deliberate, correct behaviour or some kind of leak in Java11? Let's take a stupid-simple hello world app: package com.example; public class HelloWorld { public static void main(String[] args)…
tporeba
  • 867
  • 10
  • 23
8
votes
1 answer

How to pipe a JVM heap dump

I want to heap dump on Linux, but I don't have enough local disk space to hold the multi-gigabyte heap dump. Instead, it will be posted to another server. | curl -X POST -d @- http://otherlocation Attempted solutions: (1) Heap dump to…
Paul Draper
  • 78,542
  • 46
  • 206
  • 285
8
votes
2 answers

How to visualize heapdump?

We have developed a server using golang which will receive concurrent request and process the request(creates big object - a tree) and then send back reply. But the objects are not garbage collected. So I decided to analyze the objects that live in…
IhtkaS
  • 1,314
  • 3
  • 15
  • 31
8
votes
3 answers

Is it possible to trigger an Android heap dump from the command line?

I would like to be able to trigger an Android heap dump from the command line. Is there a command for that? Specifically, from the command line, not via Montior or DDMS GUIs Maybe something like using ddms or adb, e.g. ddms -head-dump or adb shell…
nmr
  • 16,625
  • 10
  • 53
  • 67
8
votes
0 answers

Export (or serialize) object from Java Heap Dump

I have a heap dump from a (formerly) running Java process. At the time the dump was taken, the process was hung communicating with another server. I would like to be able to reconstruct the exact request that was made by my application. Although my…
Adam Batkin
  • 51,711
  • 9
  • 123
  • 115
8
votes
2 answers

java heap dump is not getting generated

not getting java heap dump on outofmemoryerror: Tried this (one.exe is my java rcp app): one.exe -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=C:\Temp but didn't help, the folder path is accessible. I even tried giving name like heap.hprof, but…
user1782807
  • 151
  • 3
  • 13
7
votes
1 answer

How to create heap dump in golang when out of memory?

Is there a way in go to cause an application to write a heapdump to a file when it is out of memory? I am looking for a global solution to the application.
galusben
  • 5,948
  • 6
  • 33
  • 52
7
votes
2 answers

Lots of hibernate queries in heap dump. How can I limit?

I'm dealing with a big application that have hundreds of hibernate entities and EAGER associations. When I start this application the memory consumption is very high (more than 1 GB). Looking in the JVM heap dump of the application just after…
Dherik
  • 17,757
  • 11
  • 115
  • 164
7
votes
4 answers

How to analyze heap data from .hprof file and use it to reduce memory leaks?

In recent times, I have encountered java.lang.OutOfMemoryError exception while running an application. During one such instance, I was able to get the heap dump using jvisualvm. I am able to open the .hprof heap dump file obtained from the heap dump…
Anjan Baradwaj
  • 1,219
  • 5
  • 27
  • 54
7
votes
1 answer

Java heap dump analysis for lambda expressions

My Java application heap dump shows that a specific lambda used in my class has locked up some amount of memory and its not being released during GC. Heap shows the specific anonymous lambda class as ParentClass$$Lambda$ID and in current case, the…
Pavan Kumar
  • 4,182
  • 1
  • 30
  • 45
7
votes
0 answers

How to inspect File descriptors leaks in a heap dump hprof file

I have an instance of an app server's heap dump (hprof). How do I use visualvm or any other tool to inspect leaking File descriptors? I did check the file descriptors in use by running sudo lsof | grep java | wc -l When I run the following OOQL I…
user6123723
  • 10,546
  • 18
  • 67
  • 109
7
votes
2 answers

Java Memory "Leak" with ConcurrentLinkedQueue$Node

I am having an interesting dilemma where I appear to have a memory leak (or growing data structure). I get the typical "raising linearly over time" graph when I analyse my memory usage. Trying to figure out what the cause of the problem is, I did a…
Nick Humrich
  • 14,905
  • 8
  • 62
  • 85
7
votes
3 answers

How to stop creating Heap files ,java core files which are creating in JVM instance.?

In One of the instance of our server,heapdump, javacore ,Snap files are getting created. How to stop creating these files.Please assist me on this.because heap files makes our application slow and have to delete it and recycle instances.
Adi
  • 119
  • 1
  • 1
  • 10
6
votes
2 answers

How to take a heap dump with Eclipse OpenJ9?

With Oracle's Hotspot JVM, it looks like jmap -dump:file=/tmp/dump.txt can be used to take a heap dump. However, Eclipse OpenJ9 doesn't include the jmap tool - and if you try to use the regular jmap with OpenJ9's jvm, it gives the…
Ali
  • 261,656
  • 265
  • 575
  • 769
6
votes
1 answer

what are "live" objects in java heap? (heap dump with jmap)

jmap help shows: ... -dump: to dump java heap in hprof binary format dump-options: live dump only live objects; if not specified, all objects in the…
auntyellow
  • 2,423
  • 2
  • 20
  • 47