geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevan Miller (JIRA)" <>
Subject [jira] Commented: (GERONIMO-983) Memory used by proxies isn't released by dereferencing the proxy (I speculate)
Date Thu, 15 Sep 2005 04:04:54 GMT
    [ ] 

Kevan Miller commented on GERONIMO-983:

Aaron's diagnosis is correct...

o.a.g.kernel.basic.BasicProxyManager.interceptors (an IdentityHashMap) is holding onto the
Proxies (around 30 objects per 5 second sampling interval).

o.a.g.console.Jsr77Lookup is gathering data to return Server statistics. Which is done by
retrieving Domains, Servers, and JVMs from oag.console.util.KernelManagementHelper. KernelManagementHelper
is calling createProxy() for these objects. However, users of KernelManagementHelper don't
really know that they are retrieving proxies. Nor does it provide a method which would allow
proxies to be destroyed. Since there is no caching of these objects, the process is repeated
every n-seconds.

I discussed with David Jencks on IRC. Options seem to be:

1. Update the console code to explicitly destroy the proxies
2. Implement a WeakIdentityHashMap (or is that an IdentityWeakHashMap?) that could be used
by BasicProxyManager.
3. Use a WeakHashMap with keys that are suitably unique (i.e. they don't implement equals(Object);

2 and 3 are predicated on the requirement that the Callback object (or any objects that it
refers to) cannot refer to the Proxy object (the key).

> Memory used by proxies isn't released by dereferencing the proxy (I speculate)
> ------------------------------------------------------------------------------
>          Key: GERONIMO-983
>          URL:
>      Project: Geronimo
>         Type: Bug
>   Components: console, kernel
>     Versions: 1.0-M5
>     Reporter: Aaron Mulder
>     Priority: Critical
>      Fix For: 1.0-M5

> On Wed, 7 Sep 2005, Neal Sanche wrote:
> > I compiled up a new Geronimo, and then I left it running with the Server 
> > Info page displayed so I could see the cool AJX work there... and then I 
> > forgot about it for a day or so. When I got back it was saying:
> > 
> > 20:56:53,219 WARN  [ThreadedServer] EXCEPTION
> > java.lang.OutOfMemoryError: Java heap space                                    

> On Wed, 7 Sep 2005, Neal Sanche wrote:
> > Well, I did some profiling, and found that the predominant object that 
> > was being retained was:
> > 
> > org.apache.geronimo.kernel.basic.RawGetAttributeInvoker
> > 
> > There are also another slowly growing group of geronimo classes that
> > seem to pile up, and they aren't getting garbage collected either:
> > 
> > org.apache.geronimo.kernel.basic.ProxyMethodInterceptor and many 
> > internal classes of this class.
> The console uses lots of proxies and doesn't manually close them, just releases the references.
 Seems like this leaks memory.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message