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

Add debug logging for tracking SystemRepositoryStrategy instances

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Neutral Neutral
    • 6.2.18
    • None
    • core
    • Yes

      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
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD