Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Memory Analyzer » Analyzing metaspace memory OOME
Analyzing metaspace memory OOME [message #1772377] Fri, 08 September 2017 13:04 Go to next message
Gerrit Schulz is currently offline Gerrit SchulzFriend
Messages: 1
Registered: September 2017
Junior Member
We recently had a problem with frequent metaspace OOMEs and found out, it happened due to JaxbAccessor-classes getting generated repeately on webservice calls. We managed to do so with the help of the Java VisualVM and a heap dump of the affected application. After loading the heap dump within the Java VisualVM, we went to the "Classes" view, sorted the list by class name and found certain classes being listed 100+ times.
index.php/fa/30663/0/

After we got rid of that specific issue, we now would like to figure out, if we possibly have any further, more subtle problems left, that still might lead to metaspace OOMEs in the long run. To do so, we would like to compare the list of classes held within the metaspace of two heamp dumps made with a certain temporal distance, so we would see, what classes have been added to the metaspace over time.

Unfortunately, the Java VisualVM does not seem to provide any mechanism to export the list of classes obtained as described above, so that we can't use it for comparison's sake.

The eclipse MAT on the contrary seems to let us export every list of classes, we obtain from it, so we could easily compare two of those exported lists, but we didn't find a way of getting a list of all the classes held within the metaspace as we got it with the help of the Java VisualVM.

We tried the Histogram view as well as the Duplicate Classes view, but the former lists the dupliacted JaxbAccessor-classes mentioned above only once (no matter, if we group by class or package) and the latter doesn't list those classes at all.

index.php/fa/30664/0/
index.php/fa/30665/0/
index.php/fa/30666/0/

Is there any way to achieve, what we want, with the help of the eclipse MAT? Or are there possibly even better ways of figuring out the classes that have been added to the metaspace?
Re: Analyzing metaspace memory OOME [message #1790783 is a reply to message #1772377] Sun, 17 June 2018 08:42 Go to previous message
Andrew Johnson is currently offline Andrew JohnsonFriend
Messages: 142
Registered: July 2009
Senior Member
I sorry that this is probably too late for the original poster, but for anyone else reading, here are my thoughts:

If Memory Analyzer knows about multiple classes then each class should appear in the 'Histogram' query.
The class name should also appear in the 'Duplicate Classes' query, and right clicking on the class name will give a menu to run a query on all those classes, such as 'List objects' which will list each class (as the class is also an object). Clicking on the class name in the 'Duplicate Classes' query will expand to list all the class loaders.

As the duplicate classes don't appear all I can think is that they were removed in the remove unreachable objects stage of heap dump parsing. The 'Heap Dump Overview' report has an 'Unreachable objects' query. If there are 'java.lang.Class' objects listed there then you could reparse the dump with the Window > Preferences > Memory Analyzer > Keep unreachable objects option and see if the duplicate classes do appear. In that case the duplicate classes should not be a problem as they should be removed by a garbage collection.
Previous Topic:Unable to see objects when clicking classes from class histogram
Next Topic:Memory Analyzer 1.8.0 was released!
Goto Forum:
  


Current Time: Mon Nov 12 22:54:30 GMT 2018

Powered by FUDForum. Page generated in 0.01980 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top