Untraceable GC path? [message #638735] |
Fri, 12 November 2010 12:00  |
Eclipse User |
|
|
|
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 #640373 is a reply to message #638777] |
Sun, 21 November 2010 08:30   |
Eclipse User |
|
|
|
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 #644637 is a reply to message #644518] |
Mon, 13 December 2010 15:02   |
Eclipse User |
|
|
|
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.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03608 seconds