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

Finding a Java lambda from its mangled name in a heap dump

I'm hunting a memory leak, and the heap dump shows me a number of lambda instances are holding the offending objects. The name of the lambda is the surrounding class name with $$lambda$107 at the end. I can also see that it has a single field (it…
ExMathGuy
  • 208
  • 2
  • 8
17
votes
5 answers

Java heap dump and the heap size after the heap analysis differs

I am experiencing memory leak and here goes some detail. At the time of after-leak, top shows 50GB memory as residential heap dump file size is 25GB eclipse MAT analyzer tells me the heap size is 10GB At the time of before-leak, top shows 30GB…
jaeyong
  • 8,951
  • 14
  • 50
  • 63
17
votes
6 answers

Heap dump error on Centos 64bit and openjdk 7

I'm trying to generate a heap dump on my machine that is running a glassfish 3.1.2 using a open-jdk7 java. I'm using the following command : jmap -dump:live,format=b,file=dump.t -F 24935 But I keep getting this error : Attaching to process ID…
ufasoli
  • 1,038
  • 2
  • 19
  • 41
17
votes
5 answers

create heap dump from within application, without HotSpotDiagnosticMXBean

How can i create a heap dump from within my application, without using the class HotSpotDiagnosticMXBean. Due to access restriction of java/rt.jar i am not able to compile it with a dependency to HotSpotDiagnosticMXBean. I know how solve the…
Chriss
  • 5,157
  • 7
  • 41
  • 75
15
votes
1 answer

How to get jmap histogram programmatically?

I would like to get the equivalent of the ouput of jmap -histo programmatically, from inside the monitored application. I see triggering a heap dump is possible through the HotSpot diagnostic bean, but I can't see how to get the histogram data. Is…
nicoulaj
  • 3,463
  • 4
  • 27
  • 32
15
votes
2 answers

V8 Javascript Heap Dump Schema

I'm trying to understand the contents of a heapdump generated by google chrome tools. I understand that there is already a in-browser heap dump inspector but I'm interested in writing a CLI that parses a JS heap dump as an exercise. I'm not able to…
Schneems
  • 14,918
  • 9
  • 57
  • 84
13
votes
1 answer

How to find what is in unmanaged memory in Dump by WinDBG

I run for Dump File in WinDbg command !address -summary I results are something like this Usage Summary RgnCount Total Size %ofBusy %ofTota Free 3739 7ff5`dbbae000 ( 127.960 Tb) 99.97%
justromagod
  • 933
  • 9
  • 20
13
votes
7 answers

Tools available for debugging production Issues in Java applications

Just wondering what are various tools & techniques out there to debug production issues on Java applications. Like, What are the ways and tools to take thread dumps? What are the ways and tools to take heap dumps? What are the tools to analyse the…
Java Guy
  • 3,391
  • 14
  • 49
  • 55
13
votes
1 answer

Java - GC running but not reclaiming anything

Over the last couple of days, we are seeing JVM's on our servers get into a state where they are spending 100% CPU time in GC of OldGen, when: A. They don't need to because there is plenty of space left on the heap and B. They are not reclaiming…
Dave
  • 1,068
  • 12
  • 26
12
votes
1 answer

How can I know whether a Java object is in tenure or eden space from heap dump

I have a Hotspot JVM heap dump and I tried to find out whether an object is live in tenure space, eden space, or survivor space, but I could not. Appreciate if someone can help me.
James
  • 1,001
  • 2
  • 15
  • 23
12
votes
2 answers

Analyzing a heap dump with leaked SSLSocketImpl

I have an application that runs on Amazon EC2 (using several AWS products such as S3, DynamoDB, etc.) and has a memory leak. I collected some heap dumps and ran them through Eclipse's Memory Analyzer Tool, which pinpointed several hundred instances…
ur-vogel
  • 414
  • 1
  • 5
  • 11
12
votes
1 answer

Java heap dump error with jmap command : Premature EOF

I have encountered below exception during execution of below command jmap -dump:format=b,file=heap_dump.bin output: Dumping heap to Exception in thread "main" java.io.IOException: Premature EOF at…
Ravindra babu
  • 37,698
  • 11
  • 250
  • 211
11
votes
1 answer

node.js heap memory dump, why the String memory is too high?

I am having some memory leak in my code. so i took memory snapshot using heapdump nodemodule. using heapdump i have fixed something then its fine. But why string buffer size is still too high and its keep on increasing ? I have attached screen shot…
balaphp
  • 1,306
  • 5
  • 20
  • 40
11
votes
1 answer

How can I find the local variables in Heap file

I have a j2ee application and monitoring it by visualVM. Lets say that I have a method like this: public void doStuff(int param) { String s = getStringVariable(param); StringBuilder sb = new StringBuilder(); //Do stuff with sb…
Sam
  • 133
  • 1
  • 8
11
votes
3 answers

ways how to get heap dump from running tomcat 7

I've tried this Get a heapdump on JVM from Tomcat 6 but it doesn't work for me, Is there other ways to get heap dump from tomcat server? Thanks in advance!
emdhie
  • 379
  • 1
  • 3
  • 10
1
2
3
32 33