Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-6398

Classloader paradoxon and memory leak in UIMA loggers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.3.0SDK
    • Core Java Framework
    • None

    Description

      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.

      Attachments

        1. Screenshot 2021-12-09 at 12.42.41.png
          77 kB
          Richard Eckart de Castilho

        Issue Links

          Activity

            People

              rec Richard Eckart de Castilho
              rec Richard Eckart de Castilho
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: