Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Memory Analyzer » Untraceable GC path?
Untraceable GC path? [message #638735] Fri, 12 November 2010 12:00 Go to next message
Rob Denison is currently offline Rob DenisonFriend
Messages: 2
Registered: November 2010
Junior Member
I'm debugging a mem leak using tomcat 6.0.28 and a smallest possible spring 3.0.5 servlet.

From MAT:

Tomcat on it's own has the expected 4 WebappClassLoaders all with tiny mem usage.

After deploying and undeploying my servlet I have the 4 expected ones and an extra larger WebappClassLoader which is clearly my undeployed one that's leaked.

So I run Path to GC roots on it excluding weak and soft references. It returns "Found 0 paths".

There are some weak refs paths but they can't be keeping the classloader alive.

I'm assuming this is the classloader for my servlet because it has the right name. I also ran tomcats "find leaks" feature to cause a gc to be run first before taking the dump.

Can anyone explain how there can be 0 paths?
Re: Untraceable GC path? [message #638777 is a reply to message #638735] Fri, 12 November 2010 15:00 Go to previous messageGo to next message
Rob Denison is currently offline Rob DenisonFriend
Messages: 2
Registered: November 2010
Junior Member
or perhaps written another way:

How can any object that is not being GCd have 0 paths to GC root?

Thanks for any help.

Rob.
Re: Untraceable GC path? [message #640373 is a reply to message #638777] Sun, 21 November 2010 08:30 Go to previous messageGo to next message
Krum Tsvetkov is currently offline Krum TsvetkovFriend
Messages: 161
Registered: July 2009
Senior Member
Hi Rob,

>> How can any object that is not being GCd have 0 paths to GC root?

I think the correct question here is "why is the weak reference not cleared, if there is no other ref?"

Within the tool we do not simulate the VMs behaviour for weak/soft references. All references in the heap dump we treat as "normal". And we offer in some of the commands specific options (like the one you used for the paths).

So your classloader is there and it is referenced by a weak reference. I can't tell why it hasn't been cleared. May be it is a matter of time (?) or... I can't tell.

What you probably could do is take this ClassLoader instance and look at the incoming references (list objects -> with incoming references). I can't exclude that in the tool we did something wrog (although I hope that after several years of existance we've managed to get all this functionality correct).

Can you also paste the (weak) paths here (selecting the rows in the GUI and pasting them should work)?

Krum
Re: Untraceable GC path? [message #643374 is a reply to message #640373] Mon, 06 December 2010 16:53 Go to previous messageGo to next message
Scott Marlow is currently offline Scott MarlowFriend
Messages: 2
Registered: December 2010
Junior Member
I'm seeing a similar issue. Path to GC roots, shows 0 paths (if I exclude weak references). Same for merge shortest path to gc roots.

I copied the output of Path to GC roots with all references included here: http://pastebin.com/zhDbmbK5

Re: Untraceable GC path? [message #644518 is a reply to message #638735] Sun, 12 December 2010 20:49 Go to previous messageGo to next message
slaurent is currently offline slaurentFriend
Messages: 5
Registered: February 2010
Junior Member
Which JVM are you using ? if it's Hotspot server before 1.6.0_21, try to upgrade it, there were problems in the GC that were corrected in 21...
Re: Untraceable GC path? [message #644637 is a reply to message #644518] Mon, 13 December 2010 15:02 Go to previous messageGo to next message
Scott Marlow is currently offline Scott MarlowFriend
Messages: 2
Registered: December 2010
Junior Member
I used sun jdk 1.6.0_21. It will be interesting if this turns out to be a JVM bug.

For going deeper into the cause, any suggestions for diagnosing? Maybe there are places in the standard jdk java src, shipped with the jdk. Or perhaps, in jvm source that comes with openjdk. If no one knows the cause, it might be helpful to at least identify what the next step to nailing this would be.

Re: Untraceable GC path? [message #644719 is a reply to message #644637] Mon, 13 December 2010 22:26 Go to previous message
slaurent is currently offline slaurentFriend
Messages: 5
Registered: February 2010
Junior Member
It might be this JVM bug : http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6916498
Previous Topic:Requested features
Next Topic:Installing MAT on Linux
Goto Forum:
  


Current Time: Thu Sep 20 00:04:31 GMT 2018

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

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

Back to the top