Uploaded image for project: 'JSFUnit'
  1. JSFUnit
  2. JSFUNIT-275

JSFUnit is leaking ThreadLocals and Threads

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: JSFUnit.2.0.0.Beta1
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None

      Description

      Running JSFUnit with Tomcat 6 you can see a lot of ThreadLocal and Thread leakage during undeploy.

      Mar 30, 2011 7:00:41 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
      SEVERE: The web application [/3f5e01a9-450c-45ba-ade7-2eef83592a40] appears to have started a thread named [JS executor for com.gargoylesoftware.htmlunit.WebClient@424c2849] but has failed to stop it. This is very likely to create a memory leak.

      Mar 30, 2011 7:00:41 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
      SEVERE: The web application [/3f5e01a9-450c-45ba-ade7-2eef83592a40] created a ThreadLocal with key of type [null] (value [com.sun.faces.util.Util$1@3c2465e5]) and a value of type [java.util.HashMap] (value [{com.sun.faces.patternCache={ = }}]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.

      Mar 30, 2011 7:00:41 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
      SEVERE: The web application [/3f5e01a9-450c-45ba-ade7-2eef83592a40] created a ThreadLocal with key of type [org.apache.commons.lang.builder.HashCodeBuilder$1] (value [org.apache.commons.lang.builder.HashCodeBuilder$1@799dbc3b]) and a value of type [java.util.HashSet] (value [[]]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.

      Mar 30, 2011 7:00:41 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
      SEVERE: The web application [/3f5e01a9-450c-45ba-ade7-2eef83592a40] created a ThreadLocal with key of type [null] (value [com.gargoylesoftware.htmlunit.html.xpath.XPathUtils$1@1b3e02ed]) and a value of type [java.lang.Boolean] (value [false]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
      Mar 30, 2011 7:00:41 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap

      SEVERE: The web application [/3f5e01a9-450c-45ba-ade7-2eef83592a40] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@4322394]) and a value of type [com.sun.faces.context.FacesContextImpl] (value [com.sun.faces.context.FacesContextImpl@77bdcbb2]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.

        Gliffy Diagrams

          Activity

          Hide
          ssilvert Stan Silvert added a comment -

          Note to self: I know that at least some of this is due to a known bug in Mojarra 2.0. It is fixed in Mojarra 2.1, so I need to retest with Mojarra 2.1 when I get a chance.

          Show
          ssilvert Stan Silvert added a comment - Note to self: I know that at least some of this is due to a known bug in Mojarra 2.0. It is fixed in Mojarra 2.1, so I need to retest with Mojarra 2.1 when I get a chance.
          Hide
          aslak Aslak Knutsen added a comment -

          Committed fixed for clearReferencesThread of thread [JS executor for com.gargoylesoftware.htmlunit.WebClient@424c2849] by adding webClient.closeAllWindows(); to WebClientSpec.valueUnbound

          Show
          aslak Aslak Knutsen added a comment - Committed fixed for clearReferencesThread of thread [JS executor for com.gargoylesoftware.htmlunit.WebClient@424c2849] by adding webClient.closeAllWindows(); to WebClientSpec.valueUnbound
          Hide
          ssilvert Stan Silvert added a comment -

          Aslak, I see your commit. Do you consider this one resolved?

          Show
          ssilvert Stan Silvert added a comment - Aslak, I see your commit. Do you consider this one resolved?
          Hide
          aslak Aslak Knutsen added a comment -

          No, the clearReferencesThread fix is only part of it

          Show
          aslak Aslak Knutsen added a comment - No, the clearReferencesThread fix is only part of it

            People

            • Assignee:
              ssilvert Stan Silvert
              Reporter:
              aslak Aslak Knutsen
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Development