Tapestry 5
  1. Tapestry 5
  2. TAP5-1977

Memory leak (perm gen) in component reloading

    Details

      Description

      I think I found a memory leak in components reloading. The ComponentEventResultProcessor uses a StrategyBuilder to find the correct behavior to apply on events methods results.
      If a "onEvent" method returns a component instance, then the StrategyBuilder will keep the component class in its cache. When reloading components, this cache should be cleared to let GC clear the classLoader and all the corresponding classes.

      1. memoryleak.patch
        3 kB
        Denis Delangle

        Activity

        Hide
        Denis Delangle added a comment -

        Here is a patch that fixes the leak (using git diff). Sorry, I couldn't find an easy way to create a regression test.

        Show
        Denis Delangle added a comment - Here is a patch that fixes the leak (using git diff). Sorry, I couldn't find an easy way to create a regression test.
        Hide
        Howard M. Lewis Ship added a comment -

        Glad this was a development-time only bug. Good catch!

        Show
        Howard M. Lewis Ship added a comment - Glad this was a development-time only bug. Good catch!
        Hide
        Howard M. Lewis Ship added a comment -

        Fixed in the 5.4-js-rewrite branch as well; will update here when that is merged.

        Show
        Howard M. Lewis Ship added a comment - Fixed in the 5.4-js-rewrite branch as well; will update here when that is merged.
        Hide
        Hudson added a comment -

        Integrated in tapestry-trunk-freestyle #977 (See https://builds.apache.org/job/tapestry-trunk-freestyle/977/)
        TAP5-1977: Memory leak (perm gen) in component reloading (Revision f0a72c48904eee28e95f3ddd1f7847004aefd766)
        Note fixed bug TAP5-1977 (Revision ea240ddf29814a234edfde900d867872b08630c9)

        Result = FAILURE
        hlship :
        Files :

        • tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java

        hlship :
        Files :

        • 54_RELEASE_NOTES.txt
        Show
        Hudson added a comment - Integrated in tapestry-trunk-freestyle #977 (See https://builds.apache.org/job/tapestry-trunk-freestyle/977/ ) TAP5-1977 : Memory leak (perm gen) in component reloading (Revision f0a72c48904eee28e95f3ddd1f7847004aefd766) Note fixed bug TAP5-1977 (Revision ea240ddf29814a234edfde900d867872b08630c9) Result = FAILURE hlship : Files : tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java hlship : Files : 54_RELEASE_NOTES.txt

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Denis Delangle
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development