Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-1129

ThreadLocal leak in new RequestContext code prevents clean undeploy of Wicket application

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3.0-beta4
    • 1.3.0-rc2
    • wicket
    • None
    • Tomcat 5.5.23, Wicket 1.3.0-beta4

    Description

      Analyzing heap dumps of Tomcat running my Wicket webapp shows that the webapp ClassLoader is not becoming unreferenced and garbage-collectable when the webapp is undeployed. The cause is the RequestContext ThreadLocal - this ThreadLocal is not being cleared before the WicketFilter returns control to Tomcat - as a result, Wicket RequestContext instances remain attached to Tomcat theadpool threads. Thus the reference chain of Thread -> threadLocalsMap -> RequestContext instance prevents the JVM from unloading the undeployed webapp classes.

      Attachments

        Activity

          People

            ate Ate Douma
            maxb Max Oliver Bowsher
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: