Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-7591

Session leak when a ResourceResolver is created from a Session then gets cloned

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • JCR Resource 3.0.8
    • JCR Resource 3.0.14
    • JCR
    • None

    Description

      The following steps will cause a new JCR session to be opened then leaked:

      1. Create a ResourceResolver out of an existing JCR session (using AUTHENTICATION_INFO_SESSION)
      2. Call clone() on the ResourceResolver created in step 1, passing the ResourceResolverFactory.USER_IMPERSONATION key with a username to impersonate
      3. Close the ResourceResolver created in step 2.

      The expected behavior is that since step 2 opened a new JCR Session in the background, step 3 should close it. The actual behavior is that the JCR session stays open without an obvious way to close it, and these leaked sessions can pile up if this sequence is executed often.

      Attachments

        Activity

          People

            cziegeler Carsten Ziegeler
            Csaba Varga Csaba Varga
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: