jvisualvm: Stuck on “Loading Heap Dump...” screen
Asked Answered
T

5

5

I am using jdk64 and my java version is "1.6.0_24". My tomcat is running with -Xmx7196m, and jvisualvm is running with -J-Xms2048m -J-Xmx3072m. I took a heap dump of my tomcat java process and size of my .hprof file is around 5.5 GB. When I try to open this heap dump, it just stuck on Loading Heap Dump... screen.

I also looked at the heap consumption of VisualVM while it is trying to open the heap dump, but that goes around 500MB only.

NOTE: I did look at jvisualvm: Stuck on “Loading Heap Dump” screen question but it is different and does not address my question.

Tog answered 11/3, 2014 at 6:40 Comment(2)
That's a pretty massive file. How long did you wait for it to load the dump, and was there any drive / CPU activity during that time?Haiti
I waited for almost 20 minutes or more. CPU activity is quite minimal.Tog
A
6

These symptoms also occured when I tried to load a large heap dump and had low disk space ( I assume for temporary file use by visual vm), running on a Mac. After I freed up diskspace the file loaded.

Arnold answered 7/12, 2015 at 9:17 Comment(1)
Fixed my issue, ThanksFlorindaflorine
D
3

I hit a similar snag but realized that there was an exception; it can be hard to spot:

enter image description here

I don't know whether it will always displays an error like that (I'm using v1.3.9).

Diapason answered 30/11, 2016 at 21:38 Comment(0)
O
2

You can try several things:

  1. Java VisualVM in bundled with JDK 1.6.0_24 is several years old. Try to use latest version from https://visualvm.github.io.
  2. VisualVM uses memory-mapped files so you don't need to start it with 3G heap. I would start with 1G heap. How much free memory does have your OS when you try to open the heap dump?
  3. There should be progress bar in the right corner of VisualVM, which will show you the progress of loading of the heap. This should give you a clue how long it can take.
Obovate answered 27/3, 2014 at 8:32 Comment(2)
Also check if you can actually open the hprof file. I had an issue with permissions after copying it from the server to my laptop. Visualvm error handling is horrible, it never tells anything.Revolution
That link is broken, any alternative?Discontinuous
B
2

I also noticed if jvisualvm doesn't have permission to read the file, then there is no feedback indicating the problem. (Java 7)

Brindabrindell answered 26/4, 2018 at 12:52 Comment(1)
same on visualvm 1.4.4 on java 8. jhat gives the right errorHornstone
C
0

If the opened file is not considered a valid heap dump, the JvisualVM will also be stuck on this screen.

Opening the same (invalid) file on MAT (from Eclipse), the error happens:

Error opening heap dump 'heap.hprof'. Check the error log for further details.

Not a HPROF heap dump (java.io.IOException)

Not a HPROF heap dump

Canoe answered 14/1, 2019 at 19:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.