Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Memory Analyzer (MAT) » help to interpret results
help to interpret results [message #3970] Tue, 02 September 2008 13:44 Go to next message
Clovis Wichoski is currently offline Clovis WichoskiFriend
Messages: 1
Registered: July 2009
Junior Member
Hi,

I discovered Memory Analyzer yesterday on JavaOne on-line, at
http://developers.sun.com/learning/javaoneonline/j1sessn.jsp ?sessn=TS-5729&yr=2008&track=tools
and i have a dump from a production system that crashed after an
OutOfMemory Exception, i take the dump using jmap, and have some doubts
about my problem, i dont know if this is the right place to discuss this,
but maybe my doubt or problem can be shared with another beginner users.

Lets start, i run a Leak Suspects reports, and get the follow result:

Problem Suspect 1
The class "java.lang.ref.Finalizer", loaded by "<system class loader>",
occupies 993,232,720 (84.34%) bytes. The memory is accumulated in class
"java.lang.ref.Finalizer", loaded by "<system class loader>".
Keywords
java.lang.ref.Finalizer


Accumulated Objects
Class name Shallow Heap Retained Heap Percentage
class java.lang.ref.Finalizer @ 0x2a996901d8 24 993,232,720 84.34%
org.exolab.castor.jdo.engine.DatabaseImpl @
0x2ab31fcd40 88 252,699,544 21.46%
org.apache.xml.dtm.ref.DTMManagerDefault @ 0x2aa5bd74b8 48 22,663,312 1.92%
org.apache.xml.dtm.ref.DTMManagerDefault @ 0x2aa562d310 48 2,759,432 0.23%
org.apache.xml.dtm.ref.sax2dtm.SAX2DTM @ 0x2aaad130a0 312 2,290,104 0.19%
org.apache.xml.dtm.ref.sax2dtm.SAX2DTM @ 0x2aa94d57c0 312 2,289,872 0.19%
org.apache.xml.dtm.ref.sax2dtm.SAX2DTM @ 0x2aa78e0678 312 2,289,632 0.19%
org.apache.xml.dtm.ref.DTMManagerDefault @ 0x2aa99c7d58 48 1,114,392 0.09%
org.apache.xml.dtm.ref.sax2dtm.SAX2DTM @ 0x2aa8680418 312 1,095,624 0.09%
org.apache.xml.dtm.ref.sax2dtm.SAX2DTM @ 0x2ab8a1ee98 312 1,039,056 0.09%
java.lang.ref.Finalizer @ 0x2ae40a6000 64 660,392 0.06%
java.lang.ref.Finalizer @ 0x2ae44edf60 64 660,392 0.06%
java.lang.ref.Finalizer @ 0x2ae4608130 64 660,368 0.06%
java.lang.ref.Finalizer @ 0x2aa9076dc0 64 659,104 0.06%
java.lang.ref.Finalizer @ 0x2ae4e1b428 64 656,928 0.06%
java.lang.ref.Finalizer @ 0x2ab08412c0 64 655,840 0.06%
java.lang.ref.Finalizer @ 0x2aaf299f60 64 626,320 0.05%
java.lang.ref.Finalizer @ 0x2ab733bf28 64 625,584 0.05%
java.lang.ref.Finalizer @ 0x2ae22604e8 64 622,864 0.05%
java.lang.ref.Finalizer @ 0x2aae8bfb78 64 559,608 0.05%
java.lang.ref.Finalizer @ 0x2abac58378 64 557,800 0.05%
Total: 20 entries 2,496 295,186,168 0.251

Accumulated Objects by Class
Label Number Of Objects Used Heap Size Retained Heap Size
org.exolab.castor.jdo.engine.DatabaseImpl 4,757 418,616 253,118,072
com.sap.dbtech.jdbc.ColumnInfo 1,280,189 61,449,072 164,247,360
java.lang.ref.Finalizer 1,025,758 65,648,512 97,918,408
com.sap.dbtech.jdbc.translators.DBTechTranslator[] 176,122 14,468,440 96,665,160
com.sap.dbtech.jdbc.CallableStatementSapDB 179,613 41,670,216 94,770,072
com.sap.dbtech.jdbc.Parseinfo 179,629 21,555,480 65,033,496
com.sap.dbtech.jdbc.ConnectionSapDB 254 54,864 64,875,384
com.sap.dbtech.jdbc.ResultSetSapDB 199,457 23,934,840 44,686,776
org.apache.xml.dtm.ref.DTMManagerDefault 39 1,872 26,855,952
com.sap.dbtech.jdbc.trace.PreparedStatement 174,694 13,975,520 22,351,760
java.lang.String 149,174 5,966,960 15,928,704
org.apache.xml.dtm.ref.sax2dtm.SAX2DTM 70 21,840 15,819,712
org.apache.xpath.XPathContext 39 7,800 7,644,416
com.sap.dbtech.jdbc.StatementSapDB 21,596 2,591,520 6,671,632
org.apache.xalan.templates.ElemTemplate 662 100,624 3,071,408
org.apache.xalan.transformer.TransformerImpl 39 10,920 2,974,880
com.sap.dbtech.jdbc.trace.Statement 21,369 1,367,616 2,395,904
org.apache.xalan.templates.ElemLiteralResult 306 48,960 1,672,768
org.apache.xalan.templates.ElemIf 137 12,056 774,496
org.apache.xalan.templates.StylesheetRoot 39 15,912 763,896
Total: 20 entries 3,413,943 253,321,640 988,240,256

I'm using SUN JVM version on a linux 64bit linux machine:
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)

any idea how i can inspect this problem, what path i must follow?

thanks for any help.

Clóvis
Re: help to interpret results [message #3980 is a reply to message #3970] Tue, 02 September 2008 15:43 Go to previous message
Krum Tsvetkov is currently offline Krum TsvetkovFriend
Messages: 149
Registered: July 2009
Senior Member
Hi,

What the report shows is the memory is accumulated in the finalizer. I've
seen this several times, and I'm afraid you may need more than a heap dump
to find the root cause.

The fact that the Finalizer is so huge, means that finalizing the objects
took too long and memory couldn't be freed on time. There could be various
reasons for it - the finalize() method of some concrete classes is taking
too long to execute or the finalize() method of a class could be
infinitely hanging (which effectively blocks the finalizer and leads to an
OOM error). The last I've seen several times.

Therefore to further analyze the problem, you also need to get a thread
dump when the problem occurs and look what the finalizer thread is doing.
Normally you would see then which method is blocking it.

The report has also shown you some of the objects which the finalizer
retains, i.e. they are only referenced by the finalizer and have to be
finalized. I see there some pretty large XML objects, but I don't know to
what extent this hint helps you.

Some more details from the heap dump you can get by executing the
finalizer overview query (from the query browser choose "Java Basics ->
Finalizer Overview", or press Ctrl+H and then pasete "finalizer_overview"
in the line). This query should show you also the object which is in
processing by the finalizer thread, which can be a good hint where to look
next.

I hope this gives you some ideas how to proceed.

Krum
Previous Topic:Allegedly invalid HPROF file
Next Topic:error report
Goto Forum:
  


Current Time: Thu Nov 27 12:18:25 GMT 2014

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

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