Commons Logging
  1. Commons Logging
  2. LOGGING-51

[logging] Memory leaks in JBoss due to LogFactory cache

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.4
    • Fix Version/s: 1.1.0
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      LogFactory.java maintains a static cache (Hashtable) of LogFactories, keyed by
      context ClassLoader. In JBoss, and may be in many other J2EE containers, each
      hot-redeployment of a J2EE application makes a new class loader for the
      application, destroying all references to the old one. However, commons-logging.
      jar is loaded by a parent classloader which is common for all applications, and
      still maintains hard references to would-be-dead ClassLoaders of undeployed
      applications. This leads to significant memory leaks, because all static members
      of all classes of the undeployed applications do not become a subject for GC. It
      would be excellent if this LogFactory caching could be disabled through a config
      or a WeakHashMap is used instead of Hashtable.

      1. ASF.LICENSE.NOT.GRANTED--JCL-guide.diff
        9 kB
        Brian Stansberry
      2. ASF.LICENSE.NOT.GRANTED--LogFactory.diff
        2 kB
        Brian Stansberry
      3. ASF.LICENSE.NOT.GRANTED--LogFactoryTest.diff
        15 kB
        Brian Stansberry
      4. ASF.LICENSE.NOT.GRANTED--memoryleaktest.zip
        5 kB
        Brian Stansberry
      5. ASF.LICENSE.NOT.GRANTED--patch.txt
        9 kB
        Brian Stansberry
      6. ASF.LICENSE.NOT.GRANTED--WeakHashtable_javadoc.txt
        3 kB
        Brian Stansberry
      7. ASF.LICENSE.NOT.GRANTED--WeakHashtable.java
        21 kB
        Brian Stansberry

        Activity

        Dennis Lundberg made changes -
        Fix Version/s 1.1.0 [ 12311848 ]
        Henri Yandell made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Henri Yandell made changes -
        Affects Version/s 1.0.4 [ 12311713 ]
        Henri Yandell made changes -
        Project Commons [ 12310458 ] Commons Logging [ 12310484 ]
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Component/s Logging [ 12311124 ]
        Key COM-1578 LOGGING-51
        Affects Version/s 1.0.4 [ 12311678 ]
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 31286 12341730
        Alexei Yudichev created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Alexei Yudichev
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development