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

          Rene Gielen created issue -
          Rene Gielen made changes -
          Field Original Value New Value
          Link This issue is duplicated by WW-3772 [ WW-3772 ]
          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 ?
          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
          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.
          Rene Gielen made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          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
          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.
          Rene Gielen made changes -
          Link This issue is duplicated by WW-3789 [ WW-3789 ]
          Lukasz Lenart made changes -
          Fix Version/s 2.3.3 [ 12320642 ]
          Fix Version/s 2.3.2 [ 12319199 ]
          Lukasz Lenart made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Boris Morris made changes -
          Link This issue is a clone of WW-4058 [ WW-4058 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          23d 21h 31m 1 Rene Gielen 22/Mar/12 21:45
          Resolved Resolved Closed Closed
          22d 9h 29m 1 Lukasz Lenart 14/Apr/12 08:15

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development