Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-8380

CLONE - Add debug logging for tracking SystemRepositoryStrategy instances


    • Icon: Improvement Improvement
    • Resolution: Not an issue
    • Icon: Neutral Neutral
    • 6.3.0
    • None
    • core
    • Yes

      This ticket was opened to be sure this get's ported to 6.3. (see MAGNOLIA-8362)

      Original Description

      MGNLEE-645 reported a thread local leak of SystemRepositoryStrategy instances on shutdown:

      org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [magnoliaAuthor] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@7d3d101b]) 
      and a value of type [info.magnolia.context.SystemRepositoryStrategy] (value [info.magnolia.context.SystemRepositoryStrategy@5cdec700]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

      So far we were not able to reliably reproduce the problem.

      For making it easier to diagnose the problem we should implement additional logging to make above warning more helpful. Instead of logging SystemRepositoryStrategy@5cdec700 we should log the stack trace from the time the affected SystemRepositoryStrategy instance was created.

        Acceptance criteria

              mduerig Michael Duerig
              mduerig Michael Duerig
              0 Vote for this issue
              2 Start watching this issue


                  Task DoD