1

I'm trying to track down what looks like a memory leak problem in an application, but I'm having a hard time getting a list of the loaded classes as per what's displayed from the JMX "LoadedClassCount" attribute value in java.lang.ClassLoading.

That value shows some 28million classes loaded and steadily increasing (thus the leak). But when doing any analysis of the heap dumps in either VisualVM or MAT neither show anywhere close that that number for loaded classes.

VisualVM reports 11,788 totals classes (unless this isn't the same as total loaded classes), with 2.5mill instances. VisualVM does show classes with 0 instances, it just doesn't seem to show the same number as what the JMX attribute reports.

Other than something like (How can I get information from JVM about what classes are loaded along with the specs of all the loaded class?) Is there a way to get an output of what those 28mill loaded classes are, preferably from the heap dumps?

Community
  • 1
  • 1
Doswell
  • 418
  • 3
  • 11
  • In case it's relevant or others have had similar issues, this is a grails app running in Tomcat 6 with HornetQ. I suspect the problem is somewhere in the groovy or json handling to the remote web app side loading proxy classes. Something similar to this; http://stackoverflow.com/questions/167740/possible-memory-leak-in-number-of-loaded-classes-in-java-application Sadly the answer doesn't give much details; is that code snippet the problem, fix, reuse the jax object etc.. – Doswell May 15 '14 at 18:02
  • You might try enabling verbose class loading logging (-verbose:class) and see if that gives you any clue. – Alcanzar May 15 '14 at 18:31
  • Thanks Alcanzar, I saw that around and was hoping for a method without needing additional parameters (ie just using the heap dump). I'll try it out in test and see what pops up. – Doswell May 16 '14 at 14:00

0 Answers0