You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ode.apache.org by "Ciaran Jessup (JIRA)" <ji...@apache.org> on 2009/04/09 17:23:14 UTC

[jira] Created: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

ProcessDaoImpl objects get leaked when using in-memory-processes
----------------------------------------------------------------

                 Key: ODE-576
                 URL: https://issues.apache.org/jira/browse/ODE-576
             Project: ODE
          Issue Type: Bug
          Components: BPEL Runtime
         Environment: n/a
            Reporter: Ciaran Jessup


It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.

Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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


[jira] Updated: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

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

Ciaran Jessup updated ODE-576:
------------------------------

    Attachment: InMemoryProcessesLeakMemory.patch

This patch contains a 'fix' (I could completely have mis-understood the problem please understand!) to the leaked ProcessDaoImpl object instances.  It seems to me that the BpelProcess.deleteProcessDAO has been implemented as a copy'n'paste of the createProcessDAO and doesn't actually do anything !   Also I *think* the dehydrate method should call into this method to get things deleted.

I've fixed it for the in-memory stuff, but I suspect there is a bigger issue here, someone cleverer than me should probably take a look ;) 

> ProcessDaoImpl objects get leaked when using in-memory-processes
> ----------------------------------------------------------------
>
>                 Key: ODE-576
>                 URL: https://issues.apache.org/jira/browse/ODE-576
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: n/a
>            Reporter: Ciaran Jessup
>         Attachments: InMemoryProcessesLeakMemory.patch
>
>
> It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.
> Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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


[jira] Commented: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

Posted by "Karthick Sankarachary (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ODE-576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700987#action_12700987 ] 

Karthick Sankarachary commented on ODE-576:
-------------------------------------------

Ciaran,

I worked around the above issue by delaying the removal of the process from the master list until after it has been cleaned up. I got a chance to test it out myself and it seems to behave as expected now.

Karthick

> ProcessDaoImpl objects get leaked when using in-memory-processes
> ----------------------------------------------------------------
>
>                 Key: ODE-576
>                 URL: https://issues.apache.org/jira/browse/ODE-576
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.1
>         Environment: n/a
>            Reporter: Ciaran Jessup
>            Assignee: Karthick Sankarachary
>             Fix For: 1.3.1
>
>         Attachments: InMemoryProcessesLeakMemory.patch, process-dao-cleanup.patch
>
>
> It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.
> Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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


[jira] Commented: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

Posted by "Ciaran Jessup (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ODE-576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701129#action_12701129 ] 

Ciaran Jessup commented on ODE-576:
-----------------------------------

Hi Karthick,
I'm happy to report that your latest patch works flawlessly for me, many thanks for your hard work, I appreciate this was a tricky/messy one :)
-Cj.

> ProcessDaoImpl objects get leaked when using in-memory-processes
> ----------------------------------------------------------------
>
>                 Key: ODE-576
>                 URL: https://issues.apache.org/jira/browse/ODE-576
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.1
>         Environment: n/a
>            Reporter: Ciaran Jessup
>            Assignee: Karthick Sankarachary
>             Fix For: 1.3.1
>
>         Attachments: InMemoryProcessesLeakMemory.patch, process-dao-cleanup.patch
>
>
> It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.
> Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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


[jira] Updated: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

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

Karthick Sankarachary updated ODE-576:
--------------------------------------

    Attachment:     (was: process-dao-cleanup.patch)

> ProcessDaoImpl objects get leaked when using in-memory-processes
> ----------------------------------------------------------------
>
>                 Key: ODE-576
>                 URL: https://issues.apache.org/jira/browse/ODE-576
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: n/a
>            Reporter: Ciaran Jessup
>         Attachments: InMemoryProcessesLeakMemory.patch, process-dao-cleanup.patch
>
>
> It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.
> Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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


[jira] Commented: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

Posted by "Ciaran Jessup (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ODE-576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699792#action_12699792 ] 

Ciaran Jessup commented on ODE-576:
-----------------------------------

Thanks Karthick, I appreciate your quick turnaround on this one :)  Unfortunately I won't be able to test it for another 12 hours (stupid timezones!), but I'll feedback asap :)

> ProcessDaoImpl objects get leaked when using in-memory-processes
> ----------------------------------------------------------------
>
>                 Key: ODE-576
>                 URL: https://issues.apache.org/jira/browse/ODE-576
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: n/a
>            Reporter: Ciaran Jessup
>         Attachments: InMemoryProcessesLeakMemory.patch, process-dao-cleanup.patch
>
>
> It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.
> Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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


[jira] Updated: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

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

Karthick Sankarachary updated ODE-576:
--------------------------------------

    Attachment:     (was: process-dao-cleanup.patch)

> ProcessDaoImpl objects get leaked when using in-memory-processes
> ----------------------------------------------------------------
>
>                 Key: ODE-576
>                 URL: https://issues.apache.org/jira/browse/ODE-576
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: n/a
>            Reporter: Ciaran Jessup
>         Attachments: InMemoryProcessesLeakMemory.patch, process-dao-cleanup.patch
>
>
> It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.
> Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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


[jira] Commented: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

Posted by "Ciaran Jessup (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ODE-576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699579#action_12699579 ] 

Ciaran Jessup commented on ODE-576:
-----------------------------------

Hi Karthick,
Unfortunately your patch doesn't seem to actually do anything :) 

The reason it doesn't do anything is because the new BpelEngineImpl.isInMemory call relies on the passed process Id being stored in the _activeProcesses list in order to determine whether or not the process is in memory or not.

Unfortunately when an UNDEPLOYED event occurs and is caught in ODEServer.handleEvent code, this code executes:
                 _bpelServer.unregister(pse.pid);
                 _bpelServer.cleanupProcess(pse.pid);

The 'unregister' code *removes* the process from the _activeProcesses list that is later checked transitively from within the cleanupProcess, because it is never there, the process is never found, so it can never be checked as being 'in-memory'.

Hope this helps :)

> ProcessDaoImpl objects get leaked when using in-memory-processes
> ----------------------------------------------------------------
>
>                 Key: ODE-576
>                 URL: https://issues.apache.org/jira/browse/ODE-576
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: n/a
>            Reporter: Ciaran Jessup
>         Attachments: InMemoryProcessesLeakMemory.patch, process-dao-cleanup.patch
>
>
> It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.
> Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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


[jira] Commented: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

Posted by "Ciaran Jessup (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ODE-576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700162#action_12700162 ] 

Ciaran Jessup commented on ODE-576:
-----------------------------------

Hi Karthick,
Unfortunately this patch also doesn't work, this time it is because the _processes array which  you're relying on being populated with the process to determin its in-memory state is being cleared out  ( _processes.keySet().removeAll(undeployed); ) in the ProcessStoreImpl.undeploy  method a couple of lines before that method actually fires the UNDEPLOYED event to which you've associated the cleanup code.

When that UNDEPLOYED event is process, the line :

                _bpelServer.cleanupProcess(pse.pid, pconf.isTransient());

Falls over with a NPE as 'pconf' is now a null reference.

Hope this helps
 - Cj.


> ProcessDaoImpl objects get leaked when using in-memory-processes
> ----------------------------------------------------------------
>
>                 Key: ODE-576
>                 URL: https://issues.apache.org/jira/browse/ODE-576
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: n/a
>            Reporter: Ciaran Jessup
>         Attachments: InMemoryProcessesLeakMemory.patch, process-dao-cleanup.patch
>
>
> It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.
> Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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


[jira] Updated: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

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

Karthick Sankarachary updated ODE-576:
--------------------------------------

    Attachment: process-dao-cleanup.patch

> ProcessDaoImpl objects get leaked when using in-memory-processes
> ----------------------------------------------------------------
>
>                 Key: ODE-576
>                 URL: https://issues.apache.org/jira/browse/ODE-576
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: n/a
>            Reporter: Ciaran Jessup
>         Attachments: InMemoryProcessesLeakMemory.patch, process-dao-cleanup.patch
>
>
> It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.
> Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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


[jira] Resolved: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

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

Karthick Sankarachary resolved ODE-576.
---------------------------------------

    Resolution: Invalid

The deleteProcessDAO and createProcessDAO methods of BpelProcess go hand in hand. In other words, you use the former in conjunction with the latter. We re-create the process DAO if and only If the GUIDs don't match. If they do match, we do nothing.

When you undeploy a process, we do clean up its DAO objects. And, that happens through the following function: org.apache.ode.bpel.engine.BpelServerImpl.cleanupProcess(QName).

> ProcessDaoImpl objects get leaked when using in-memory-processes
> ----------------------------------------------------------------
>
>                 Key: ODE-576
>                 URL: https://issues.apache.org/jira/browse/ODE-576
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: n/a
>            Reporter: Ciaran Jessup
>         Attachments: InMemoryProcessesLeakMemory.patch
>
>
> It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.
> Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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


[jira] Updated: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

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

Karthick Sankarachary updated ODE-576:
--------------------------------------

    Attachment: process-dao-cleanup.patch

> ProcessDaoImpl objects get leaked when using in-memory-processes
> ----------------------------------------------------------------
>
>                 Key: ODE-576
>                 URL: https://issues.apache.org/jira/browse/ODE-576
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.1
>         Environment: n/a
>            Reporter: Ciaran Jessup
>            Assignee: Karthick Sankarachary
>             Fix For: 1.3.1
>
>         Attachments: InMemoryProcessesLeakMemory.patch, process-dao-cleanup.patch
>
>
> It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.
> Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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


[jira] Resolved: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

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

Karthick Sankarachary resolved ODE-576.
---------------------------------------

    Resolution: Fixed

The patch has been committed at revision 767234.

> ProcessDaoImpl objects get leaked when using in-memory-processes
> ----------------------------------------------------------------
>
>                 Key: ODE-576
>                 URL: https://issues.apache.org/jira/browse/ODE-576
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.1
>         Environment: n/a
>            Reporter: Ciaran Jessup
>            Assignee: Karthick Sankarachary
>             Fix For: 1.3.1
>
>         Attachments: InMemoryProcessesLeakMemory.patch, process-dao-cleanup.patch
>
>
> It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.
> Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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


[jira] Updated: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

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

Karthick Sankarachary updated ODE-576:
--------------------------------------

    Attachment:     (was: process-dao-cleanup.patch)

> ProcessDaoImpl objects get leaked when using in-memory-processes
> ----------------------------------------------------------------
>
>                 Key: ODE-576
>                 URL: https://issues.apache.org/jira/browse/ODE-576
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.1
>         Environment: n/a
>            Reporter: Ciaran Jessup
>            Assignee: Karthick Sankarachary
>             Fix For: 1.3.1
>
>         Attachments: InMemoryProcessesLeakMemory.patch
>
>
> It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.
> Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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


[jira] Commented: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

Posted by "Karthick Sankarachary (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ODE-576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699789#action_12699789 ] 

Karthick Sankarachary commented on ODE-576:
-------------------------------------------

Ciaran,

I have updated the patch so that it does not rely on the engine to figure out whether or not the process is "in-memory". In fact, the version that is attached right now was what I wanted to give you initially. However, against my better judgement, it was decided that it would not be a good idea to change the interface of the bpel server. In light of your observations, it seems like we have no choice but to pass the "in-memory" flag from the integration layer to the bpel server. And that is what my current patch does. I'm hoping that second time is the charm...

Regards,
Karthick

> ProcessDaoImpl objects get leaked when using in-memory-processes
> ----------------------------------------------------------------
>
>                 Key: ODE-576
>                 URL: https://issues.apache.org/jira/browse/ODE-576
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: n/a
>            Reporter: Ciaran Jessup
>         Attachments: InMemoryProcessesLeakMemory.patch, process-dao-cleanup.patch
>
>
> It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.
> Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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


[jira] Updated: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

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

Karthick Sankarachary updated ODE-576:
--------------------------------------

    Attachment: process-dao-cleanup.patch

> ProcessDaoImpl objects get leaked when using in-memory-processes
> ----------------------------------------------------------------
>
>                 Key: ODE-576
>                 URL: https://issues.apache.org/jira/browse/ODE-576
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: n/a
>            Reporter: Ciaran Jessup
>         Attachments: InMemoryProcessesLeakMemory.patch, process-dao-cleanup.patch
>
>
> It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.
> Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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


[jira] Updated: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

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

Alexis Midon updated ODE-576:
-----------------------------

    Affects Version/s: 1.3.1
        Fix Version/s: 1.3.1
             Assignee: Karthick Sankarachary

> ProcessDaoImpl objects get leaked when using in-memory-processes
> ----------------------------------------------------------------
>
>                 Key: ODE-576
>                 URL: https://issues.apache.org/jira/browse/ODE-576
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.1
>         Environment: n/a
>            Reporter: Ciaran Jessup
>            Assignee: Karthick Sankarachary
>             Fix For: 1.3.1
>
>         Attachments: InMemoryProcessesLeakMemory.patch, process-dao-cleanup.patch
>
>
> It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.
> Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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


[jira] Updated: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

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

Karthick Sankarachary updated ODE-576:
--------------------------------------

    Attachment: process-dao-cleanup.patch

> ProcessDaoImpl objects get leaked when using in-memory-processes
> ----------------------------------------------------------------
>
>                 Key: ODE-576
>                 URL: https://issues.apache.org/jira/browse/ODE-576
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: n/a
>            Reporter: Ciaran Jessup
>         Attachments: InMemoryProcessesLeakMemory.patch, process-dao-cleanup.patch
>
>
> It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.
> Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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


[jira] Issue Comment Edited: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

Posted by "Ciaran Jessup (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ODE-576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697651#action_12697651 ] 

Ciaran Jessup edited comment on ODE-576 at 4/9/09 2:32 PM:
-----------------------------------------------------------

Ok, with the patch I have no memory leaks, without the patch I lose memory, badly ... when I traced the route you described (that was my starting place), the 'conn' object in the deleteProcessDAO method that the cleanupProcess delegates onto is an instance of org.apache.ode.dao.jpa.BpelDAOConnectionImpl, this is *NOT* the same instance as the org.apache.ode.bpel.memdao.BpelDAOConnectionImpl, where the processDAO instance was *actually* originally stored.  I appreciate that my patch may not resolve the issue in the correct way, but I am *certain* there is an issue here and I need to resolve it in order to use ODE even lightly :(   

I'm still also not convinced that the code in BpelProcess deleteProcessDao definately is correct, if it is then its very strange, why on earth would you choose *not* to delete a reference to an object which had a matching id in a method called 'delete' (plus the logging comment is an inccorect cut'n'paste)  ??  (sorry)


      was (Author: javajunky):
    Ok, with the patch I have no memory leaks, without the patch I lose memory, badly ... when I traced the route you described (that was my starting place), the 'conn' object in the deleteProcessDAO method that the cleanupProcess delegates onto is an instance of org.apache.ode.dao.jpa.BpelDAOConnectionImpl, this is *NOT* the same instance as the org.apache.ode.bpel.memdao.BpelDAOConnectionImpl, where the processDAO instance was *actually* originally stored.  I appreciate that my patch may resolve the issue in the correct way, but I am *certain* there is an issue here and I need to resolve it in order to use ODE even lightly :(   

I'm still also not convinced that the code in BpelProcess deleteProcessDao definately is correct, if it is then its very strange, why on earth would you choose *not* to delete a reference to an object which had a matching id in a method called 'delete' (plus the logging comment is an inccorect cut'n'paste)  ??  (sorry)

  
> ProcessDaoImpl objects get leaked when using in-memory-processes
> ----------------------------------------------------------------
>
>                 Key: ODE-576
>                 URL: https://issues.apache.org/jira/browse/ODE-576
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: n/a
>            Reporter: Ciaran Jessup
>         Attachments: InMemoryProcessesLeakMemory.patch
>
>
> It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.
> Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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


[jira] Commented: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

Posted by "Ciaran Jessup (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ODE-576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697651#action_12697651 ] 

Ciaran Jessup commented on ODE-576:
-----------------------------------

Ok, with the patch I have no memory leaks, without the patch I lose memory, badly ... when I traced the route you described (that was my starting place), the 'conn' object in the deleteProcessDAO method that the cleanupProcess delegates onto is an instance of org.apache.ode.dao.jpa.BpelDAOConnectionImpl, this is *NOT* the same instance as the org.apache.ode.bpel.memdao.BpelDAOConnectionImpl, where the processDAO instance was *actually* originally stored.  I appreciate that my patch may resolve the issue in the correct way, but I am *certain* there is an issue here and I need to resolve it in order to use ODE even lightly :(   

I'm still also not convinced that the code in BpelProcess deleteProcessDao definately is correct, if it is then its very strange, why on earth would you choose *not* to delete a reference to an object which had a matching id in a method called 'delete' (plus the logging comment is an inccorect cut'n'paste)  ??  (sorry)


> ProcessDaoImpl objects get leaked when using in-memory-processes
> ----------------------------------------------------------------
>
>                 Key: ODE-576
>                 URL: https://issues.apache.org/jira/browse/ODE-576
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: n/a
>            Reporter: Ciaran Jessup
>         Attachments: InMemoryProcessesLeakMemory.patch
>
>
> It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.
> Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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


[jira] Reopened: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

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

Ciaran Jessup reopened ODE-576:
-------------------------------


Based on my comments above, the BpelConnectionDaoImpl instance that the 'delete' occurs on, is different to that which the 'create' occurs on, so the 'remove' that happens to the internal 'store' is happening on the JPA instance not the memdao instance, personally I've not got a clue what this means, but there *is* a leak there, sadly with the easter close down I can't get a screen shot to show you the before + after reference graphs w GC root routes highlighted, but its a very easy to find memory leak, just do multiple deply + un-deploy cycles of in-memory processes, you will see the _Store references in the BpelConnectionFactoryImpl object increase by one for each deployment, and never decrease.....

> ProcessDaoImpl objects get leaked when using in-memory-processes
> ----------------------------------------------------------------
>
>                 Key: ODE-576
>                 URL: https://issues.apache.org/jira/browse/ODE-576
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: n/a
>            Reporter: Ciaran Jessup
>         Attachments: InMemoryProcessesLeakMemory.patch
>
>
> It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.
> Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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


[jira] Commented: (ODE-576) ProcessDaoImpl objects get leaked when using in-memory-processes

Posted by "Karthick Sankarachary (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ODE-576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699488#action_12699488 ] 

Karthick Sankarachary commented on ODE-576:
-------------------------------------------

Ciaran,

The root cause of this issue probably stems from the process cleanup code. It seems that it does not release in-memory process DAO objects when they are undeployed or redeployed. I have put together a patch (called process-dao-cleanup.patch) that attempts to clean up such objects properly. Can you please check it out at your convenience? If it works, I'd rather leave the process hydration code alone.

Karthick

> ProcessDaoImpl objects get leaked when using in-memory-processes
> ----------------------------------------------------------------
>
>                 Key: ODE-576
>                 URL: https://issues.apache.org/jira/browse/ODE-576
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>         Environment: n/a
>            Reporter: Ciaran Jessup
>         Attachments: InMemoryProcessesLeakMemory.patch
>
>
> It seems that when I deploy and un-deploy in-memory processes ProcessDaoImpl objects stored in the __StateStore field of the BpelDAOConnectionFactoryImpl object are being left around.
> Over the course of several tens/hundreds of deployments the memory contained in these objects mounts up substantially :(

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