ICEfaces
  1. ICEfaces
  2. ICE-5053

Mutating session ids in WebLogic cluster lead to small memory leak in SessionDispatcher

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.2-EE-Beta
    • Fix Version/s: 1.8.2-EE-GA, 1.8.3
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      WebLogic cluster
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)

      Description

      In a WebLogic cluster, the HttpSession.getId() call returns a string that not only includes the session ID but also what WebLogic refers to as JVMIDs. These values indicate which nodes in the cluster are the active and which one is preferred. For example, getId() might return a value that looks like this:

      xdp5KfxT0VhR8WJJFcphQZCTQ1GdlH6T5g392NVlpdZm1qvdTVPT!-2015310958!-1301377968!1256157555082

      The entire string is made up of the actual session id PLUS a couple of unique identifiers (delimited by '!') for cluster nodes (the final value is something else). The JVMIDs are used by the WebLogic plugin (at least) for routing requests. If you shut a cluster node down, the getId() call will return something like this - the node that is down is now indicated as 'NONE':

      xdp5KfxT0VhR8WJJFcphQZCTQ1GdlH6T5g392NVlpdZm1qvdTVPT!-1301377968!NONE!1256157555082

      Starting the node back up shows that a new JVMID is used to indicate the recently restarted node:

      xdp5KfxT0VhR8WJJFcphQZCTQ1GdlH6T5g392NVlpdZm1qvdTVPT!-1301377968!1294882958!1256157555082

      Our SessionDispatcher relies on the session ID as a key to store information in a couple of different collections. The result is that, when the session ID mutates as nodes go up and down, the values that are mapped to the session ID keys can get orphaned. The SessionDispatcher will simply add a new entry to the map, keyed on the the new sessionID. So far I haven't seen and detrimental behaviour (the proper session always appear to be used) but the orphaned values in the map may never be properly garbage collected even when the session expires because the same session ID may never be provided by the container.

      My question is, is this mutating session ID going to cause problems for anything in the core (like the Session Dispatcher) or the EPS?

        Issue Links

          Activity

          Hide
          Jack Van Ooststroom added a comment -

          The SessionDispatcher now has the ability to strip off any extra information from the JSESSIONID as this extra information especially in a WebLogic Server Cluster mutates as nodes are going down and starting up causing an eventual reload of the page. This seems to cause some issues with EPS in a WebLogic Server cluster eventually resulting into a Network Connection Interrupted message. As only the extra information of the JSESSIONID is mutating, the SessionDispatcher is now able to strip this off only when the com.icesoft.faces.sessionIdDelimiter context parameter is defined in the ICEfaces application's web.xml. If this context parameter is not defined the stripping off logic is not executed. Marking this one as FIXED.

          Show
          Jack Van Ooststroom added a comment - The SessionDispatcher now has the ability to strip off any extra information from the JSESSIONID as this extra information especially in a WebLogic Server Cluster mutates as nodes are going down and starting up causing an eventual reload of the page. This seems to cause some issues with EPS in a WebLogic Server cluster eventually resulting into a Network Connection Interrupted message. As only the extra information of the JSESSIONID is mutating, the SessionDispatcher is now able to strip this off only when the com.icesoft.faces.sessionIdDelimiter context parameter is defined in the ICEfaces application's web.xml. If this context parameter is not defined the stripping off logic is not executed. Marking this one as FIXED.

            People

            • Assignee:
              Unassigned
              Reporter:
              Deryk Sinotte
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: