[ https://issues.apache.org/jira/browse/UIMA-6398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on UIMA-6398 started by Richard Eckart de Castilho. -------------------------------------------------------- > 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)