You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Richard Eckart de Castilho (Jira)" <de...@uima.apache.org> on 2021/12/10 14:58:00 UTC
[jira] [Resolved] (UIMA-6398) Classloader paradoxon and memory leak in UIMA loggers
[ https://issues.apache.org/jira/browse/UIMA-6398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard Eckart de Castilho resolved UIMA-6398.
----------------------------------------------
Resolution: Fixed
> Classloader paradoxon and memory leak in UIMA loggers
> -----------------------------------------------------
>
> Key: UIMA-6398
> URL: https://issues.apache.org/jira/browse/UIMA-6398
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Reporter: Richard Eckart de Castilho
> Assignee: Richard Eckart de Castilho
> Priority: Major
> Fix For: 3.2.1SDK
>
> Attachments: Screenshot 2021-12-09 at 12.42.41.png
>
>
> The {{UIMAFramework_impl}} singleton contains a map {{mLoggers}} which caches all the UIMA logger wrapper classes. The UIMA logger wrapper classes all inherit from {{org.apache.uima.util.impl.Logger_common_impl}} which in turn holds a reference to a resource manager.
> This resource manager is set in
> * {{FlowControllerContainer.initialize}}
> * {{PrimitiveAnalysisEngine.initialize}}
> * {{Resource_ImplBase.initialize}}
> to the resource manager from the {{UIMAContext}} available in the respective situation. However, the logger wrapper instances cached in {{UIMAFramework_impl}} are shared globally so that it is very likely in multi-threaded/multi-classloader that resource managers from different contexts override each other and that when a message in a given context is logged, the wrong resource manager is used.
> Furthermore, any resources registered in a resource manager that is attached to a logger won't be garbage collected - at least not until a new resource manager is set.
> !Screenshot 2021-12-09 at 12.42.41.png!
--
This message was sent by Atlassian Jira
(v8.20.1#820001)