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

        Markus Guenther created issue -
        Markus Guenther made changes -
        Field Original Value New Value
        Attachment icefaces2-memoryleak.pdf [ 13283 ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 2.1 [ 10241 ]
        Assignee Priority P1
        Assignee Mircea Toma [ mircea.toma ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24941 Mon Jul 04 07:18:10 MDT 2011 mircea.toma ICE-6931 Modified resource dispatcher to save its resource mappings into the session instead of the application context to allow resource disposal on session expiry.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/push/DynamicResourceDispatcher.java
        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.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24952 Tue Jul 05 16:17:40 MDT 2011 mircea.toma ICE-6931 Modified resource dispatcher to save its resource mappings into the session instead of the application context to allow resource disposal on session expiry.
        Files Changed
        Commit graph MODIFY /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/core/src/main/java/org/icefaces/impl/push/DynamicResourceDispatcher.java
        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.
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s EE-2.0.0.GA_P01 [ 10271 ]
        Priority Major [ 3 ] Critical [ 2 ]
        Hide
        Mircea Toma added a comment -

        Applied fix to maintenance branch.

        Show
        Mircea Toma added a comment - Applied fix to maintenance branch.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 2.1-Beta [ 10291 ]
        Fix Version/s 2.1 [ 10241 ]
        Ken Fyten made changes -
        Fix Version/s 3.0 [ 10241 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: