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

Why does Android allocate more memory than needed when loading images

Folks, I don't think that this is a duplicate and is NOT one of those how do I avoid OOMs questions. This is a genuine quest for knowledge so hold off on those down votes please... Imagine I have a JPEG of 500x500 pixels. I load it as ARGB_8888…
Simon
  • 14,407
  • 8
  • 46
  • 61
11
votes
2 answers

Java Heap dump permissions

The java heap dumps generated in a Linux Machine (and most probably Unix machines as well) have restricted access. The heap can only be read by the owner of the process (ACL mask is set to 600). I understand that this is for security reasons.…
Abhilash Koneri
  • 121
  • 1
  • 4
10
votes
1 answer

why there is difference in Heap dump size generated by jmap and jcmd?

I am trying to take heap dump using below 2 commands jcmd $pid GC.heap_dump /tmp/filename.dump jmap -dump:format=b,file=/tmp/filename.dump $pid jcmd produces file size of ~300M and jmap produces file size of ~1.4G. why these are different sizes,…
Vipin
  • 4,851
  • 3
  • 35
  • 65
10
votes
4 answers

How to get heap dump from a remote server jvm?

How can I get aheap dump from a remote JVM which runs on linux with WL application server? When I run locally on a windows machine I know how to get a dump. But, how do I get a dump from the user acceptance test server? Thanks in advance.
Srisfti
  • 157
  • 2
  • 3
  • 10
10
votes
1 answer

Garbage Collector First and JMap EOF bug

We are working over our client's production server heap to detect and solve memory leaks. For this we are using jmap periodically to collect the necessary information. But last week we couldn't take the dump, because it triggered a EOF error and…
vkrausser
  • 393
  • 1
  • 3
  • 17
10
votes
5 answers

eclipse memory analyzer sees small part (363,2MB) of entire heap dump (8GB)

I was trying to investigate java.lang.OutOfMemoryError: GC limit exceeded which occurs at high load of our web app deployed in tomcat. Heap size was set to 8GB (-Xms2048m -Xmx8192m) At some point in time our application become unresponsive due to GC…
10
votes
5 answers

Generate a Java thread dump without restarting.

I'd like to create a thread that keeps track of the memory usage and cpu usage. If the application reaches a high level, I want to generate an heap dump or a thread dump. Is there a way to generate a Thread dump runtime without restarting?
Matteo Gatto
  • 616
  • 11
  • 28
9
votes
2 answers

Java Heap Dump : How to find the objects/class that is taking memory by 1. io.netty.buffer.ByteBufUtil 2. byte[] array

I found that one of my spring boot project's memory (RAM consumption) is increasing day by day. When I uploaded the jar file to the AWS server, it was taking 582 MB of RAM (Max Allocated RAM is 1500 MB), but each day, the RAM is increasing by 50MB…
Kishan Solanki
  • 13,761
  • 4
  • 85
  • 82
9
votes
1 answer

How to collect heap dumps of any java process

I am new to Heaps , can anyone suggest how can i take heap dump of any java process (like Jmeter). I read about jmap command , but i am not getting where and how to execute / write it (in eclipse or cmd). It might be a very basic question but still…
Pratha
  • 147
  • 1
  • 1
  • 11
9
votes
1 answer

Why would I want to find "Duplicate Strings" with HPROF Viewer and Analyzer?

Using the Android Memory Monitor, especially its "Dump Java Heap" feature, I am currently hunting down memory leaks in my app. On the left of Android Studio's dump/HPROF view there is an option to open "Analyzer Tasks" and there you can tell the…
kalabalik
  • 3,792
  • 2
  • 21
  • 50
9
votes
3 answers

High memory usage when using Hibernate

I code a server side application with java run on linux server. I use hibernate to open session to database, use native sql to query it and always close this session by try, catch, finally. My server query DB using hibernate with very high…
Viet
  • 443
  • 1
  • 5
  • 16
9
votes
3 answers

Increasing the max size of jvisualVM OQL resultset

I have a memory dump file which has nearly 5000 instances of a particular object. These objects are to be written into a DB, and the way i am doing this is to write an OQL query in jvisualvm to generate a string that will serve as an SQL insert for…
Mukul Jain
  • 1,807
  • 9
  • 26
  • 38
9
votes
4 answers

Can I print the entire program state in PHP?

PHP provides some impressive introspection facilities: get_defined_vars, get_defined_functions, get_defined_constants, debug_backtrace, and others. Essentially, these provide views of the entire program state: the stack and the heap. I wonder how…
jameshfisher
  • 34,029
  • 31
  • 121
  • 167
9
votes
7 answers

Is it possible to view threads from hprof dump / threads in heap dump

I have got a large (5GB) hprof dump, created by application when OutOfMemoryError occurred. (Using XX: HeapDumpOnOutOfMemoryError ). Unfortunately there are no logs collected when this error happened. Re-creating this will take couple of hours. …
Jayan
  • 18,003
  • 15
  • 89
  • 143
8
votes
2 answers

How to analyse Websphere core*.dmp file and Snap*.trc files?

All, I have my application running on websphere app server 7.0. I get some of these core dumps and trace files like core.20110909.164930.3828.0001.dmp and Snap.20110909.164930.3828.0003.trc. My question is, just like the thread dumps generated by…
Ayusman
  • 8,509
  • 21
  • 79
  • 132
1 2
3
32 33