You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Aaron Mulder (JIRA)" <de...@geronimo.apache.org> on 2005/09/08 07:17:30 UTC
[jira] Created: (GERONIMO-983) Memory used by proxies isn't released by dereferencing the proxy (I speculate)
Memory used by proxies isn't released by dereferencing the proxy (I speculate)
------------------------------------------------------------------------------
Key: GERONIMO-983
URL: http://issues.apache.org/jira/browse/GERONIMO-983
Project: Geronimo
Type: Bug
Components: kernel, console
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:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (GERONIMO-983) Memory used by proxies isn't released by dereferencing the proxy (I speculate)
Posted by "Gianny Damour (JIRA)" <de...@geronimo.apache.org>.
[ http://issues.apache.org/jira/browse/GERONIMO-983?page=all ]
Gianny Damour closed GERONIMO-983:
----------------------------------
Resolution: Fixed
Thanks for this patch Kevan! And sorry for the delay.
Sending modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicProxyManager.java
Adding modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicProxyMap.java
Adding modules/kernel/src/test/org/apache/geronimo/kernel/basic
Adding modules/kernel/src/test/org/apache/geronimo/kernel/basic/BasicProxyMapTest.java
Transmitting file data ...
Committed revision 328153.
> Memory used by proxies isn't released by dereferencing the proxy (I speculate)
> ------------------------------------------------------------------------------
>
> Key: GERONIMO-983
> URL: http://issues.apache.org/jira/browse/GERONIMO-983
> Project: Geronimo
> Type: Bug
> Components: console, kernel
> Versions: 1.0-M5
> Reporter: Aaron Mulder
> Assignee: Gianny Damour
> Priority: Critical
> Fix For: 1.0
> Attachments: BasicProxyMap.patch, ConsoleFix.txt, ReferenceIdentityMap.patch, basicProxyManager.patch
>
> 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:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (GERONIMO-983) Memory used by proxies isn't released by dereferencing the proxy (I speculate)
Posted by "Kevan Miller (JIRA)" <de...@geronimo.apache.org>.
[ http://issues.apache.org/jira/browse/GERONIMO-983?page=all ]
Kevan Miller updated GERONIMO-983:
----------------------------------
Attachment: ReferenceIdentityMap.patch
This patch file allows Proxies to be GC'ed without explicit calls to destroyProxy(). The existing IdentityHashMap is replaced with a ReferenceIdentityMap from Commons Collections. The ReferenceIdentityMap is configured to use WeakReferences for the proxy "keys" -- allowing a proxy and associated MethodInterceptor to be GC'ed. Builds, tests/itests pass, and basic deploy/undeploy of web apps all work. I've also verified that proxies, MethodInterceptors, etc are being automatically reclaimed by GC.
I'll ping Dain to weigh in on this issue. It's time to get this closed out...
> Memory used by proxies isn't released by dereferencing the proxy (I speculate)
> ------------------------------------------------------------------------------
>
> Key: GERONIMO-983
> URL: http://issues.apache.org/jira/browse/GERONIMO-983
> Project: Geronimo
> Type: Bug
> Components: console, kernel
> Versions: 1.0-M5
> Reporter: Aaron Mulder
> Priority: Critical
> Fix For: 1.0
> Attachments: ConsoleFix.txt, ReferenceIdentityMap.patch, basicProxyManager.patch
>
> 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:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (GERONIMO-983) Memory used by proxies isn't released by dereferencing the proxy (I speculate)
Posted by "Kevan Miller (JIRA)" <de...@geronimo.apache.org>.
[ http://issues.apache.org/jira/browse/GERONIMO-983?page=comments#action_12329687 ]
Kevan Miller commented on GERONIMO-983:
---------------------------------------
I certainly didn't intend to imply that GC'able proxies wasn't a good thing (although I can't vouch for it, yet, either). I'd just be hesitant to make that kind of change to the kernel at this point of time.
Another option (with similar behavior to Gianny's proposal) is to use a map with WeakReferences -- Jakarta Commons Collections has a ReferenceIdentityMap (http://jakarta.apache.org/commons/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/map/ReferenceIdentityMap.html) which should fill the bill.
In either case, I have not yet convinced myself that either proposal works (or doesn't work). I note that Gianny has maintained the destroyProxy method. Is that to ease migration? Or are there instances where destroyProxy() must be invoked?
> Memory used by proxies isn't released by dereferencing the proxy (I speculate)
> ------------------------------------------------------------------------------
>
> Key: GERONIMO-983
> URL: http://issues.apache.org/jira/browse/GERONIMO-983
> Project: Geronimo
> Type: Bug
> Components: console, kernel
> Versions: 1.0-M5
> Reporter: Aaron Mulder
> Priority: Critical
> Fix For: 1.0-M5
> Attachments: ConsoleFix.txt, basicProxyManager.patch
>
> 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:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (GERONIMO-983) Memory used by proxies isn't released by dereferencing the proxy (I speculate)
Posted by "Gianny Damour (JIRA)" <de...@geronimo.apache.org>.
[ http://issues.apache.org/jira/browse/GERONIMO-983?page=comments#action_12329672 ]
Gianny Damour commented on GERONIMO-983:
----------------------------------------
I think that there is a 4th option. We can remove the IdentityHashMap and add an extra interface to the proxies, which allows to retrieve the target ObjectName and destroy the proxy.
> Memory used by proxies isn't released by dereferencing the proxy (I speculate)
> ------------------------------------------------------------------------------
>
> Key: GERONIMO-983
> URL: http://issues.apache.org/jira/browse/GERONIMO-983
> 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:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (GERONIMO-983) Memory used by proxies isn't released by dereferencing the proxy (I speculate)
Posted by "Kevan Miller (JIRA)" <de...@geronimo.apache.org>.
[ http://issues.apache.org/jira/browse/GERONIMO-983?page=all ]
Kevan Miller updated GERONIMO-983:
----------------------------------
Attachment: ConsoleFix.txt
This is a much less ambitious fix to the problem. The Console will explicitly release the proxies that it allocates for the Server Info Portlet. I ran it overnight without any problems.
IMO, we should patch the problem for M5 and fix post-M5.
Note that other Console Portlets will still leak proxies -- only ServerInfo is "fixed". However, ServerInfo is the only portlet which refreshes itself. So, it's extremely unlikely that users will notice a problem with other portlets...
> Memory used by proxies isn't released by dereferencing the proxy (I speculate)
> ------------------------------------------------------------------------------
>
> Key: GERONIMO-983
> URL: http://issues.apache.org/jira/browse/GERONIMO-983
> Project: Geronimo
> Type: Bug
> Components: console, kernel
> Versions: 1.0-M5
> Reporter: Aaron Mulder
> Priority: Critical
> Fix For: 1.0-M5
> Attachments: ConsoleFix.txt, basicProxyManager.patch
>
> 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:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (GERONIMO-983) Memory used by proxies isn't released by dereferencing the proxy (I speculate)
Posted by "Gianny Damour (JIRA)" <de...@geronimo.apache.org>.
[ http://issues.apache.org/jira/browse/GERONIMO-983?page=all ]
Gianny Damour updated GERONIMO-983:
-----------------------------------
Attachment: basicProxyManager.patch
Drop the IdentityHashMap and add an extra interface to the proxies.
> Memory used by proxies isn't released by dereferencing the proxy (I speculate)
> ------------------------------------------------------------------------------
>
> Key: GERONIMO-983
> URL: http://issues.apache.org/jira/browse/GERONIMO-983
> Project: Geronimo
> Type: Bug
> Components: console, kernel
> Versions: 1.0-M5
> Reporter: Aaron Mulder
> Priority: Critical
> Fix For: 1.0-M5
> Attachments: basicProxyManager.patch
>
> 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:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (GERONIMO-983) Memory used by proxies isn't released by dereferencing the proxy (I speculate)
Posted by "Gianny Damour (JIRA)" <de...@geronimo.apache.org>.
[ http://issues.apache.org/jira/browse/GERONIMO-983?page=comments#action_12331863 ]
Gianny Damour commented on GERONIMO-983:
----------------------------------------
Kevan, many thanks for this patch.
As a matter of fact, I pinged Dain over the week-end to get his input on this issue.
It seems that the best solution is to implement ourself a weak identity map as we do not want to add commons-collection as a kernel dependency due to its size.
Meanwhile, it seems that the proposed CGLIB approach is better than the current impl. and I will commit it this week-end.
> Memory used by proxies isn't released by dereferencing the proxy (I speculate)
> ------------------------------------------------------------------------------
>
> Key: GERONIMO-983
> URL: http://issues.apache.org/jira/browse/GERONIMO-983
> Project: Geronimo
> Type: Bug
> Components: console, kernel
> Versions: 1.0-M5
> Reporter: Aaron Mulder
> Priority: Critical
> Fix For: 1.0
> Attachments: ConsoleFix.txt, ReferenceIdentityMap.patch, basicProxyManager.patch
>
> 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:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (GERONIMO-983) Memory used by proxies isn't released by dereferencing the proxy (I speculate)
Posted by "Kevan Miller (JIRA)" <de...@geronimo.apache.org>.
[ http://issues.apache.org/jira/browse/GERONIMO-983?page=comments#action_12329382 ]
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: http://issues.apache.org/jira/browse/GERONIMO-983
> 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:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (GERONIMO-983) Memory used by proxies isn't released by dereferencing the proxy (I speculate)
Posted by "David Blevins (JIRA)" <de...@geronimo.apache.org>.
[ http://issues.apache.org/jira/browse/GERONIMO-983?page=all ]
David Blevins updated GERONIMO-983:
-----------------------------------
Fix Version: 1.0
(was: 1.0-M5)
> Memory used by proxies isn't released by dereferencing the proxy (I speculate)
> ------------------------------------------------------------------------------
>
> Key: GERONIMO-983
> URL: http://issues.apache.org/jira/browse/GERONIMO-983
> Project: Geronimo
> Type: Bug
> Components: console, kernel
> Versions: 1.0-M5
> Reporter: Aaron Mulder
> Priority: Critical
> Fix For: 1.0
> Attachments: ConsoleFix.txt, basicProxyManager.patch
>
> 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:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (GERONIMO-983) Memory used by proxies isn't released by dereferencing the proxy (I speculate)
Posted by "Gianny Damour (JIRA)" <de...@geronimo.apache.org>.
[ http://issues.apache.org/jira/browse/GERONIMO-983?page=comments#action_12329674 ]
Gianny Damour commented on GERONIMO-983:
----------------------------------------
As a matter of fact, the attached patch does not work with the JMX based kernel. However, I can easily extend it if this approach is OK.
> Memory used by proxies isn't released by dereferencing the proxy (I speculate)
> ------------------------------------------------------------------------------
>
> Key: GERONIMO-983
> URL: http://issues.apache.org/jira/browse/GERONIMO-983
> Project: Geronimo
> Type: Bug
> Components: console, kernel
> Versions: 1.0-M5
> Reporter: Aaron Mulder
> Priority: Critical
> Fix For: 1.0-M5
> Attachments: basicProxyManager.patch
>
> 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:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (GERONIMO-983) Memory used by proxies isn't released by dereferencing the proxy (I speculate)
Posted by "Kevan Miller (JIRA)" <de...@geronimo.apache.org>.
[ http://issues.apache.org/jira/browse/GERONIMO-983?page=all ]
Kevan Miller updated GERONIMO-983:
----------------------------------
Attachment: BasicProxyMap.patch
Yet another solution to this problem... ;-)
BasicProxyMap is an implementation of a WeakIdentityHashMap (class size ~10k). This allows proxy keys to be GC'ed without being explicitly destroyed. In the interest of minimalism, BasicProxyMap is not a full Map implementation -- it does not provide the Iterator or Collection support specified by the Map interface.
I "borrowed" code from Commons Collection ReferenceIdentityMap and pared it down. Copyright date and code should indicate this...
Associated Junit test validates basic functionality.
> Memory used by proxies isn't released by dereferencing the proxy (I speculate)
> ------------------------------------------------------------------------------
>
> Key: GERONIMO-983
> URL: http://issues.apache.org/jira/browse/GERONIMO-983
> Project: Geronimo
> Type: Bug
> Components: console, kernel
> Versions: 1.0-M5
> Reporter: Aaron Mulder
> Priority: Critical
> Fix For: 1.0
> Attachments: BasicProxyMap.patch, ConsoleFix.txt, ReferenceIdentityMap.patch, basicProxyManager.patch
>
> 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:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (GERONIMO-983) Memory used by proxies isn't released by dereferencing the proxy (I speculate)
Posted by "David Jencks (JIRA)" <de...@geronimo.apache.org>.
[ http://issues.apache.org/jira/browse/GERONIMO-983?page=comments#action_12329691 ]
David Jencks commented on GERONIMO-983:
---------------------------------------
destroyProxy is primarily invoked by a gbean when it shuts down to make sure all proxies to it cannot contact it. This is IIUC essential.
I believe dain has some philosophical objections to moving the getObjectName code into the proxy. I think we should hear from Dain before applying gianny's patch.
I would not object to a GC solution in m5 if it is reviewed by a couple people and doesn't break the tck and solves the ServerInfo problem.
> Memory used by proxies isn't released by dereferencing the proxy (I speculate)
> ------------------------------------------------------------------------------
>
> Key: GERONIMO-983
> URL: http://issues.apache.org/jira/browse/GERONIMO-983
> Project: Geronimo
> Type: Bug
> Components: console, kernel
> Versions: 1.0-M5
> Reporter: Aaron Mulder
> Priority: Critical
> Fix For: 1.0-M5
> Attachments: ConsoleFix.txt, basicProxyManager.patch
>
> 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:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (GERONIMO-983) Memory used by proxies isn't released by dereferencing the proxy (I speculate)
Posted by "Aaron Mulder (JIRA)" <de...@geronimo.apache.org>.
[ http://issues.apache.org/jira/browse/GERONIMO-983?page=comments#action_12329683 ]
Aaron Mulder commented on GERONIMO-983:
---------------------------------------
We can do what we have to do for M5, but I don't like a long-term solution that requires a proxy client to manually release every proxy it uses. That's soo C++! I think a solution like what Gianny outlined is better.
> Memory used by proxies isn't released by dereferencing the proxy (I speculate)
> ------------------------------------------------------------------------------
>
> Key: GERONIMO-983
> URL: http://issues.apache.org/jira/browse/GERONIMO-983
> Project: Geronimo
> Type: Bug
> Components: console, kernel
> Versions: 1.0-M5
> Reporter: Aaron Mulder
> Priority: Critical
> Fix For: 1.0-M5
> Attachments: ConsoleFix.txt, basicProxyManager.patch
>
> 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:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Assigned: (GERONIMO-983) Memory used by proxies isn't released by dereferencing the proxy (I speculate)
Posted by "Gianny Damour (JIRA)" <de...@geronimo.apache.org>.
[ http://issues.apache.org/jira/browse/GERONIMO-983?page=all ]
Gianny Damour reassigned GERONIMO-983:
--------------------------------------
Assign To: Gianny Damour
> Memory used by proxies isn't released by dereferencing the proxy (I speculate)
> ------------------------------------------------------------------------------
>
> Key: GERONIMO-983
> URL: http://issues.apache.org/jira/browse/GERONIMO-983
> Project: Geronimo
> Type: Bug
> Components: console, kernel
> Versions: 1.0-M5
> Reporter: Aaron Mulder
> Assignee: Gianny Damour
> Priority: Critical
> Fix For: 1.0
> Attachments: BasicProxyMap.patch, ConsoleFix.txt, ReferenceIdentityMap.patch, basicProxyManager.patch
>
> 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:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira