ICEfaces
  1. ICEfaces
  2. ICE-6931

Serious memory leak in DynamicResourceDispatcher, no created Resources are freed up after session close or timeout

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.1-Beta, 3.0, EE-2.0.0.GA_P01
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Test
    • Assignee Priority:
      P1

      Description

      After performing deep memory profiling and analysis, there was encountered that IceFaces 2 doesn't seem to free Resource objects which were attached to a ice:outputResource component. After playing around and creating many outputResources, the same stay in memory forever and are never released.

      Session timeout is happening properly and all other objects (including our owns) are properly removed on logout (session.close) or timeout. But the Resource objects do remain forever.

      This is a very serious problem as it is a no go for a production environement.

      Attached a sample reference chain (one example of thousands remaining after test case execution). One could see that our object is only hold within the map owned by DynamicResourceDispatcher.

      Checked shortly the source of DynamicResourceDispatcher. There is no removing of the resources from the map (except on shutdown).

      So the question is: Is this a serious bug or should it be somehow documented how to get properly rid of sessions and Resource objects attached to that session.

        Activity

        Hide
        Mircea Toma added a comment -

        Looks like the resource dispatcher is saving its resources in the servlet/application context which effectively keeps the resources for the life of the application, hence the memory leak.

        Show
        Mircea Toma added a comment - Looks like the resource dispatcher is saving its resources in the servlet/application context which effectively keeps the resources for the life of the application, hence the memory leak.
        Hide
        Mircea Toma added a comment -

        Modified resource dispatcher to save its resource mappings into the session instead of the application context to allow resource disposal on session expiry.

        Show
        Mircea Toma added a comment - Modified resource dispatcher to save its resource mappings into the session instead of the application context to allow resource disposal on session expiry.
        Hide
        Ken Fyten added a comment -

        Re-open to add IF EE 2.0.0.GA_P01 fix version.

        Show
        Ken Fyten added a comment - Re-open to add IF EE 2.0.0.GA_P01 fix version.
        Hide
        Mircea Toma added a comment -

        Applied fix to maintenance branch.

        Show
        Mircea Toma added a comment - Applied fix to maintenance branch.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Markus Guenther
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: