glassfish
  1. glassfish
  2. GLASSFISH-18650

Memory leak with tag-files and CDI enabled

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.2
    • Fix Version/s: 4.0_b88_RC4
    • Component/s: web_container
    • Labels:
      None
    • Environment:

      Windows7 64bit with jdk7_u3, linux with jdk6, Glassifish Open Source 3.1.2

      Description

      When CDI is enabled on a web application which uses JSP tag files instances of tag files remain inside com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl in jcdiManagedBeanInstanceMap.

      Instances of tag files contains references to JspContext which contains a reference to JspWriterImpl, which contains a buffer which holds response data

      This is a memory leak which leads to OutOfMemoryErrors very quickly

        Activity

        Hide
        kchung added a comment -

        I am sending you a patch that may fix your issue. Can your give it a try and let me know?

        Show
        kchung added a comment - I am sending you a patch that may fix your issue. Can your give it a try and let me know?
        Hide
        kchung added a comment -

        Oops! aosama, what's your email? You can send that info to kinman.chung@oracle.com. Thanks.

        Show
        kchung added a comment - Oops! aosama, what's your email? You can send that info to kinman.chung@oracle.com. Thanks.
        Hide
        aosama added a comment -

        hi kim, i dropped u a note hope u got my email its aosama [at] gmail [dot] com

        Show
        aosama added a comment - hi kim, i dropped u a note hope u got my email its aosama [at] gmail [dot] com
        Hide
        kchung added a comment -

        Fixed in 4.0 and trunk.

        There are two parts to the fix.

        1. ResourceInjector will not be invoked for tag files.
        2. ResourceInjector.preDestroy is called for
        a. tags that extend SimpleTagSupport, and
        b. classic tag hanlder
        1. with tag pooling on (default), when the app exits
        2. with tag pooling off, at end tag

        i

        Show
        kchung added a comment - Fixed in 4.0 and trunk. There are two parts to the fix. 1. ResourceInjector will not be invoked for tag files. 2. ResourceInjector.preDestroy is called for a. tags that extend SimpleTagSupport, and b. classic tag hanlder 1. with tag pooling on (default), when the app exits 2. with tag pooling off, at end tag i
        Hide
        slominskir added a comment - - edited

        I can confirm the attached test case passes in 4.0, but if you add parameters to the tag a memory leak occurs. I've created a new issue: GLASSFISH-21083.

        Show
        slominskir added a comment - - edited I can confirm the attached test case passes in 4.0, but if you add parameters to the tag a memory leak occurs. I've created a new issue: GLASSFISH-21083 .

          People

          • Assignee:
            kchung
            Reporter:
            enrico_olivelli
          • Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: