users@glassfish.java.net

Re: Memory Leaks in Glassfish v3

From: Alexis Moussine-Pouchkine <alexis.mp_at_sun.com>
Date: Thu, 24 Jun 2010 10:56:35 +0200

Hi,

It sounds like you have plenty of data to file a bug, could you do that ?
https://glassfish.dev.java.net/issues/enter_bug.cgi?issue_type=DEFECT
We are aware of a number of issues but I'm sure your investigation will help out as well.

thanks!
-Alexis

On 23 juin 2010, at 22:41, glassfish_at_javadesktop.org wrote:

> Glassfish 3.0 has a memory leak caused by a bug in Weld 1.0.0.SP4. In that version, they registered a new singleton CDI Container on every redeployment of an application and forgot to release it.
>
> In jvisualvm heap dumps, I could see multiple copies of these "singletons" hanging around somewhere in the Felix registry, each holding indirect references to WebappClassLoaders, which caused OutOfMemoryErrors after a couple of redeployments.
>
> This bug has been fixed in Weld 1.0.1, so a while ago, I upgraded my application to the unreleased Glassfish version 3.0.1b21 using Weld 1.0.1.SP3, and the problem was gone.
>
> Now when deploying exactly the same version of my application on the released Glassfish version 3.0.1, the memory leaks are back, and even worse than before. After redeploying my application 5 or 6 times and taking a heap dump, I see 8 WebappClassLoader instances, and 5 of them do not have a GC root at all, the other ones are referenced as thread context class loaders.
>
> Any ideas anyone?
> [Message sent by forum member 'hwellmann']
>
> http://forums.java.net/jive/thread.jspa?messageID=475587
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>