JDK7 perm gen leak

Tom Rodriguez tom.rodriguez at oracle.com
Mon Sep 12 12:35:55 PDT 2011

On Sep 12, 2011, at 8:03 AM, Scott Oaks wrote:

> I am trying to track down a permgen leak in an app we have running JDK 7. When I run jmap -permstat, I'm a little confused by the output.
> The first line of the jmap output is:
> 304286 intern Strings occupying 48081424 bytes.
> But I thought that the interned strings were moved out of permgen in JDK 7? Maybe that output is just left over from JDK 6.
> The bigger issue is the output from the class loaders -- every line in the output says that the classloader in question is dead, e.g:
> 0x000000019a1c2770      0       0       0x000000019a1c27d0      dead    weblogic/utils/classloaders/GenericClassLoader at 0x0000000140ae6950
> Well, there is one exception; the bootstrap classloader is still showing that it is live. Still, at least some of those weblogic class loaders must still be alive, as the app is still running and using classes loaded by them. I hope that many more are actually dead (else they are the source of the leak) -- but I am not sure how to tell how many are actually dead vs. alive. I have to go look at the dump and trace the classloaders back anyway, so it isn't really a big issue -- but it is a little curious to me.

The liveness analysis of the SA is somewhat suspect since it has to visit exactly the same roots that the JVM does and there's no cross validation that the SA and JVM agree on these kinds of things.  Which collector are you using?  You should get a dump using an agent like hprof instead and use that to figure out liveness.


> -Scott

More information about the hotspot-dev mailing list