[jira] [Commented] (UIMA-6058) Pear destroy does not destroy the resourceManagers

2019-07-12 Thread Matthias Koch (JIRA)


[ 
https://issues.apache.org/jira/browse/UIMA-6058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16883564#comment-16883564
 ] 

Matthias Koch commented on UIMA-6058:
-

I'll get into it, as soon as possible.

> Pear destroy does not destroy the resourceManagers
> --
>
> Key: UIMA-6058
> URL: https://issues.apache.org/jira/browse/UIMA-6058
> Project: UIMA
>  Issue Type: Bug
>Reporter: Matthias Koch
>Priority: Major
> Attachments: Screenshot_20190614_095220.png, UIMA-6058.diff
>
>
> the pear wrapper is caching resourceManagers which are not getting destroyed 
> on destroy of the pear wrapper.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (UIMA-6058) Pear destroy does not destroy the resourceManagers

2019-07-10 Thread Marshall Schor (JIRA)


[ 
https://issues.apache.org/jira/browse/UIMA-6058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16882431#comment-16882431
 ] 

Marshall Schor commented on UIMA-6058:
--

hi, any chance of getting a nice test case for this?

> Pear destroy does not destroy the resourceManagers
> --
>
> Key: UIMA-6058
> URL: https://issues.apache.org/jira/browse/UIMA-6058
> Project: UIMA
>  Issue Type: Bug
>Reporter: Matthias Koch
>Priority: Major
> Attachments: Screenshot_20190614_095220.png, UIMA-6058.diff
>
>
> the pear wrapper is caching resourceManagers which are not getting destroyed 
> on destroy of the pear wrapper.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (UIMA-6058) Pear destroy does not destroy the resourceManagers

2019-06-17 Thread Marshall Schor (JIRA)


[ 
https://issues.apache.org/jira/browse/UIMA-6058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16865698#comment-16865698
 ] 

Marshall Schor commented on UIMA-6058:
--

Thanks.  Is this Jira now a request to diagnose / fix why the mMetaDataList in 
CasManager_impl got so large? If so, I think this might be due to a bug in the 
fix for UIMA-1249.  I suspect that the code added for UIMA-1249 is missing some 
things.  

To diagnose this, it would be helpful to see what the value of the 
mMetaDataList is when it grows large in your application.  Can you do this and 
attach it to this Jira?  (Doesn't have to be big amount, but something that 
shows some duplication which ought not to be happening...)

Also, let me know if I'm going down the wrong path, and this Jira is about 
fixing something else :) .

> Pear destroy does not destroy the resourceManagers
> --
>
> Key: UIMA-6058
> URL: https://issues.apache.org/jira/browse/UIMA-6058
> Project: UIMA
>  Issue Type: Bug
>Reporter: Matthias Koch
>Priority: Major
> Attachments: Screenshot_20190614_095220.png, UIMA-6058.diff
>
>
> the pear wrapper is caching resourceManagers which are not getting destroyed 
> on destroy of the pear wrapper.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (UIMA-6058) Pear destroy does not destroy the resourceManagers

2019-06-17 Thread Matthias Koch (JIRA)


[ 
https://issues.apache.org/jira/browse/UIMA-6058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16865401#comment-16865401
 ] 

Matthias Koch commented on UIMA-6058:
-

[~schor]

"But, if you know (in your particular application instance) when calling a 
ResourceManager instance's destroy(), that the referenced CasManager is not 
shared, and won't be used again, you could null out the reference:  e.g. 
my_resource_mgr.setCasManager(null);"

"Would this method work for your use case?"

Thats exactly what we are doing right now and it fixes the problem.

> Pear destroy does not destroy the resourceManagers
> --
>
> Key: UIMA-6058
> URL: https://issues.apache.org/jira/browse/UIMA-6058
> Project: UIMA
>  Issue Type: Bug
>Reporter: Matthias Koch
>Priority: Major
> Attachments: Screenshot_20190614_095220.png, UIMA-6058.diff
>
>
> the pear wrapper is caching resourceManagers which are not getting destroyed 
> on destroy of the pear wrapper.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (UIMA-6058) Pear destroy does not destroy the resourceManagers

2019-06-14 Thread Marshall Schor (JIRA)


[ 
https://issues.apache.org/jira/browse/UIMA-6058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16864400#comment-16864400
 ] 

Marshall Schor commented on UIMA-6058:
--

hmm, I think it could be pretty easy to have a shared implicitly - created one:
 * create a ResourceManager, call its getCasManager() - creates an implicit one.
 * create another resource manager, call its setCasManager() which would then 
have that cas manager shared by two resource managers.

> Pear destroy does not destroy the resourceManagers
> --
>
> Key: UIMA-6058
> URL: https://issues.apache.org/jira/browse/UIMA-6058
> Project: UIMA
>  Issue Type: Bug
>Reporter: Matthias Koch
>Priority: Major
> Attachments: Screenshot_20190614_095220.png, UIMA-6058.diff
>
>
> the pear wrapper is caching resourceManagers which are not getting destroyed 
> on destroy of the pear wrapper.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (UIMA-6058) Pear destroy does not destroy the resourceManagers

2019-06-14 Thread Richard Eckart de Castilho (JIRA)


[ 
https://issues.apache.org/jira/browse/UIMA-6058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16864375#comment-16864375
 ] 

Richard Eckart de Castilho commented on UIMA-6058:
--

Does the possibility that the CasManager_Impl is shared only exist if it has 
been created explicitly? 
If yes, would there  be a way to have it be released automatically if it was 
created implicitly?

> Pear destroy does not destroy the resourceManagers
> --
>
> Key: UIMA-6058
> URL: https://issues.apache.org/jira/browse/UIMA-6058
> Project: UIMA
>  Issue Type: Bug
>Reporter: Matthias Koch
>Priority: Major
> Attachments: Screenshot_20190614_095220.png, UIMA-6058.diff
>
>
> the pear wrapper is caching resourceManagers which are not getting destroyed 
> on destroy of the pear wrapper.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (UIMA-6058) Pear destroy does not destroy the resourceManagers

2019-06-14 Thread Marshall Schor (JIRA)


[ 
https://issues.apache.org/jira/browse/UIMA-6058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16864345#comment-16864345
 ] 

Marshall Schor commented on UIMA-6058:
--

The ResourceManager_impl has a reference to a CasManager_impl.  When the 
ResourceManger destroy() method is called, it doesn't do anything to the 
referenced CasManager, because that instance could be shared with other 
(non-destroyed) ResourceManagers.

If, in your application, you know when calling a ResourceManager instance's 
destroy(), that the referenced CasManager is not shared, and won't be used 
again, you could null out the reference:  e.g. 
my_resource_mgr.setCasManager(null);

This ought to allow the garbage collector to collect the CasManager (and 
therefore, it's mMetaDataList).

Would this method work for your use case?

> Pear destroy does not destroy the resourceManagers
> --
>
> Key: UIMA-6058
> URL: https://issues.apache.org/jira/browse/UIMA-6058
> Project: UIMA
>  Issue Type: Bug
>Reporter: Matthias Koch
>Priority: Major
> Attachments: Screenshot_20190614_095220.png, UIMA-6058.diff
>
>
> the pear wrapper is caching resourceManagers which are not getting destroyed 
> on destroy of the pear wrapper.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (UIMA-6058) Pear destroy does not destroy the resourceManagers

2019-06-14 Thread Marshall Schor (JIRA)


[ 
https://issues.apache.org/jira/browse/UIMA-6058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16864299#comment-16864299
 ] 

Marshall Schor commented on UIMA-6058:
--

Thanks for clarifying.  It looks from your trace that the part not getting 
cleaned is mMetaDataList, which has the comment:
{code:java}
  /**
   * accumulates the metadata needed for shared CASes for this resource manager
   * Starts out "empty" when this is created; is added to (but never removed)
   * Duplicates may be in the list.
   *
   * Threading: This list is always accessed under the class instance lock.
   */
  private final List mMetaDataList = new 
ArrayList();
{code}
I'll have to investigate why the design was such that things are never 
removed...

 

> Pear destroy does not destroy the resourceManagers
> --
>
> Key: UIMA-6058
> URL: https://issues.apache.org/jira/browse/UIMA-6058
> Project: UIMA
>  Issue Type: Bug
>Reporter: Matthias Koch
>Priority: Major
> Attachments: Screenshot_20190614_095220.png, UIMA-6058.diff
>
>
> the pear wrapper is caching resourceManagers which are not getting destroyed 
> on destroy of the pear wrapper.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (UIMA-6058) Pear destroy does not destroy the resourceManagers

2019-06-14 Thread Matthias Koch (JIRA)


[ 
https://issues.apache.org/jira/browse/UIMA-6058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16863804#comment-16863804
 ] 

Matthias Koch commented on UIMA-6058:
-

[~schor] the pear resourceManagers are destroyed correctly in 2.10.4. your fix 
worked for us. But the destroy of the resourceManager does not clean the 
casManager( > 100MB). i added a screenshot of my heap dump.

> Pear destroy does not destroy the resourceManagers
> --
>
> Key: UIMA-6058
> URL: https://issues.apache.org/jira/browse/UIMA-6058
> Project: UIMA
>  Issue Type: Bug
>Reporter: Matthias Koch
>Priority: Major
> Attachments: UIMA-6058.diff
>
>
> the pear wrapper is caching resourceManagers which are not getting destroyed 
> on destroy of the pear wrapper.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (UIMA-6058) Pear destroy does not destroy the resourceManagers

2019-06-12 Thread Marshall Schor (JIRA)


[ 
https://issues.apache.org/jira/browse/UIMA-6058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16862396#comment-16862396
 ] 

Marshall Schor commented on UIMA-6058:
--

This seems closely related to UIMA-5935.  Did that Jira resolve this issue 
already, or is there something missed?

 

> Pear destroy does not destroy the resourceManagers
> --
>
> Key: UIMA-6058
> URL: https://issues.apache.org/jira/browse/UIMA-6058
> Project: UIMA
>  Issue Type: Bug
>Reporter: Matthias Koch
>Priority: Major
> Attachments: UIMA-6058.diff
>
>
> the pear wrapper is caching resourceManagers which are not getting destroyed 
> on destroy of the pear wrapper.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)