You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Kevan Miller (JIRA)" <ji...@apache.org> on 2007/07/29 17:18:52 UTC

[jira] Created: (OPENEJB-622) EntityEJBObjectHandler memory leak

EntityEJBObjectHandler memory leak
----------------------------------

                 Key: OPENEJB-622
                 URL: https://issues.apache.org/jira/browse/OPENEJB-622
             Project: OpenEJB
          Issue Type: Bug
    Affects Versions: 3.0
            Reporter: Kevan Miller
            Priority: Critical
             Fix For: 3.0


I'm seeing Geronimo ClassLoader memory leaks in deploy, use, undeploy scenarios using Daytrader. When Daytrader is configured to run in EJB mode, ClassLoaders are not being GC'ed. 

A sample reference pattern from GC roots to the ClassLoader is here: http://people.apache.org/~kevan/EntityEjbObjectHandlerMemoryLeak.html

BaseEjbProxyHandler.liveHandleRegistry is maintaining sets of BaseEjbProxyHandlers. References to EntityEJb handlers are never being cleared.

I never see EjbHomeProxyHandler._invoke() called with a REMOVE operation (which looks like it would drive the necessary cleanup).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (OPENEJB-622) EntityEJBObjectHandler memory leak

Posted by "David Blevins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Blevins resolved OPENEJB-622.
-----------------------------------

    Resolution: Fixed

Committed a change:
$ svn ci container 
Sending        container/openejb-core/src/main/java/org/apache/openejb/core/ivm/BaseEjbProxyHandler.java
Transmitting file data .
Committed revision 561163.

... that moves the registry into the deploymentinfo (which is destroyed on undeploy) so the related refs should die.

Give this fix a try and if this leak is gone, close the issue.

> EntityEJBObjectHandler memory leak
> ----------------------------------
>
>                 Key: OPENEJB-622
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-622
>             Project: OpenEJB
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Kevan Miller
>            Assignee: David Blevins
>            Priority: Critical
>             Fix For: 3.0
>
>
> I'm seeing Geronimo ClassLoader memory leaks in deploy, use, undeploy scenarios using Daytrader. When Daytrader is configured to run in EJB mode, ClassLoaders are not being GC'ed. 
> A sample reference pattern from GC roots to the ClassLoader is here: http://people.apache.org/~kevan/EntityEjbObjectHandlerMemoryLeak.html
> BaseEjbProxyHandler.liveHandleRegistry is maintaining sets of BaseEjbProxyHandlers. References to EntityEJb handlers are never being cleared.
> I never see EjbHomeProxyHandler._invoke() called with a REMOVE operation (which looks like it would drive the necessary cleanup).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OPENEJB-622) EntityEJBObjectHandler memory leak

Posted by "David Blevins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Blevins closed OPENEJB-622.
---------------------------------


> EntityEJBObjectHandler memory leak
> ----------------------------------
>
>                 Key: OPENEJB-622
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-622
>             Project: OpenEJB
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Kevan Miller
>            Assignee: David Blevins
>            Priority: Critical
>             Fix For: 3.0
>
>
> I'm seeing Geronimo ClassLoader memory leaks in deploy, use, undeploy scenarios using Daytrader. When Daytrader is configured to run in EJB mode, ClassLoaders are not being GC'ed. 
> A sample reference pattern from GC roots to the ClassLoader is here: http://people.apache.org/~kevan/EntityEjbObjectHandlerMemoryLeak.html
> BaseEjbProxyHandler.liveHandleRegistry is maintaining sets of BaseEjbProxyHandlers. References to EntityEJb handlers are never being cleared.
> I never see EjbHomeProxyHandler._invoke() called with a REMOVE operation (which looks like it would drive the necessary cleanup).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENEJB-622) EntityEJBObjectHandler memory leak

Posted by "Tim McConnell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim McConnell updated OPENEJB-622:
----------------------------------


It appears that the EntityEJbObjectHandler memory leak has been fixed with R561163. The before and after snapshots are availalbe here: 

http://people.apache.org/~mcconne/08-02-2007/

There is still a memory leak somewhere as I can still force an OOM condition if I do enough iterations of the scenario that Kevan listed. 


> EntityEJBObjectHandler memory leak
> ----------------------------------
>
>                 Key: OPENEJB-622
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-622
>             Project: OpenEJB
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Kevan Miller
>            Assignee: David Blevins
>            Priority: Critical
>             Fix For: 3.0
>
>
> I'm seeing Geronimo ClassLoader memory leaks in deploy, use, undeploy scenarios using Daytrader. When Daytrader is configured to run in EJB mode, ClassLoaders are not being GC'ed. 
> A sample reference pattern from GC roots to the ClassLoader is here: http://people.apache.org/~kevan/EntityEjbObjectHandlerMemoryLeak.html
> BaseEjbProxyHandler.liveHandleRegistry is maintaining sets of BaseEjbProxyHandlers. References to EntityEJb handlers are never being cleared.
> I never see EjbHomeProxyHandler._invoke() called with a REMOVE operation (which looks like it would drive the necessary cleanup).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (OPENEJB-622) EntityEJBObjectHandler memory leak

Posted by "David Blevins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Blevins reassigned OPENEJB-622:
-------------------------------------

    Assignee: David Blevins

> EntityEJBObjectHandler memory leak
> ----------------------------------
>
>                 Key: OPENEJB-622
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-622
>             Project: OpenEJB
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Kevan Miller
>            Assignee: David Blevins
>            Priority: Critical
>             Fix For: 3.0
>
>
> I'm seeing Geronimo ClassLoader memory leaks in deploy, use, undeploy scenarios using Daytrader. When Daytrader is configured to run in EJB mode, ClassLoaders are not being GC'ed. 
> A sample reference pattern from GC roots to the ClassLoader is here: http://people.apache.org/~kevan/EntityEjbObjectHandlerMemoryLeak.html
> BaseEjbProxyHandler.liveHandleRegistry is maintaining sets of BaseEjbProxyHandlers. References to EntityEJb handlers are never being cleared.
> I never see EjbHomeProxyHandler._invoke() called with a REMOVE operation (which looks like it would drive the necessary cleanup).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENEJB-622) EntityEJBObjectHandler memory leak

Posted by "Tim McConnell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim McConnell updated OPENEJB-622:
----------------------------------


Hi David, I've captured some "Before" the fix snapshots of the heap with JProbe just to ensure that your fix eliminates the leak. They are at:

http://people.apache.org/~mcconne/08-01-2007/

The scenario I'm using (that hopefully is exactly the same as Kevan was using) is:
	1 - Logon Geronimo 
	2 - Deploy DT
	3 - Populate tables
	4 - Restart server
	5 - Configure DT for EJB3
	6 - Start profiling
	5 - Login DT
	6 - Logoff DT
	7 - Undeploy
                     8 - Stop profiling

So you can see in the before snapshot that BaseEjbProxyHandler has accumulated almost 2mb of storage on the heap at the end of this scenario..... I'm profiling the "After" fix scenario now and will post the results shortly to the same URL. Thanks

> EntityEJBObjectHandler memory leak
> ----------------------------------
>
>                 Key: OPENEJB-622
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-622
>             Project: OpenEJB
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Kevan Miller
>            Assignee: David Blevins
>            Priority: Critical
>             Fix For: 3.0
>
>
> I'm seeing Geronimo ClassLoader memory leaks in deploy, use, undeploy scenarios using Daytrader. When Daytrader is configured to run in EJB mode, ClassLoaders are not being GC'ed. 
> A sample reference pattern from GC roots to the ClassLoader is here: http://people.apache.org/~kevan/EntityEjbObjectHandlerMemoryLeak.html
> BaseEjbProxyHandler.liveHandleRegistry is maintaining sets of BaseEjbProxyHandlers. References to EntityEJb handlers are never being cleared.
> I never see EjbHomeProxyHandler._invoke() called with a REMOVE operation (which looks like it would drive the necessary cleanup).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.