Struts 2
  1. Struts 2
  2. WW-3768

XWork ContainerImpl causes ThreadLocal memory leak

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.1.2
    • Fix Version/s: 2.3.3
    • Component/s: Core Actions
    • Labels:
      None

      Description

      The localContext ThreadLocal is not cleaned up properly when stopping / undeploying / redeploying a S2 application. This will in most cases cause the web application ClassLoader not to be garbage collected, thus leaving a redeployment memory leak.

        Issue Links

          Activity

          Hide
          Lukasz Lenart added a comment -

          It looks ok for me, I've tested struts2-showcase application with Apache Tomcat/7.0.19, deploy, undeploy, redeploy - everything went smoothly, without warnings. JConsole showed normal memory consumption, I mean when I'd undeployed the application memory usage went down, redeployed went up and so on.

          Show
          Lukasz Lenart added a comment - It looks ok for me, I've tested struts2-showcase application with Apache Tomcat/7.0.19, deploy, undeploy, redeploy - everything went smoothly, without warnings. JConsole showed normal memory consumption, I mean when I'd undeployed the application memory usage went down, redeployed went up and so on.
          Hide
          Hudson added a comment -

          Integrated in Struts2 #435 (See https://builds.apache.org/job/Struts2/435/)
          WW-3768:
          ThreadLocal was created but not removed appropriately (Revision 1304070)

          Result = SUCCESS
          rgielen :
          Files :

          • /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/inject/ContainerImpl.java
          Show
          Hudson added a comment - Integrated in Struts2 #435 (See https://builds.apache.org/job/Struts2/435/ ) WW-3768 : ThreadLocal was created but not removed appropriately (Revision 1304070) Result = SUCCESS rgielen : Files : /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/inject/ContainerImpl.java
          Hide
          Rene Gielen added a comment -

          The issue should be fixed. If problems arise, we should re-open it.

          Show
          Rene Gielen added a comment - The issue should be fixed. If problems arise, we should re-open it.
          Hide
          Rene Gielen added a comment -

          The ThreadLocal is removed now, and after careful consideration it should be correct that way.
          Nevertheless, please crosscheck since there is next to no automated testing possibility for this issue.

          Show
          Rene Gielen added a comment - The ThreadLocal is removed now, and after careful consideration it should be correct that way. Nevertheless, please crosscheck since there is next to no automated testing possibility for this issue.
          Hide
          Lukasz Lenart added a comment -

          Is it solved by the last commit ?

          Show
          Lukasz Lenart added a comment - Is it solved by the last commit ?

            People

            • Assignee:
              Rene Gielen
              Reporter:
              Rene Gielen
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development