Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-4228

File Descriptor leak in DefaultFaceletFactory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.12
    • 2.2.13, 2.3.2
    • None
    • None
    • CentOS 7

    Description

      URLConnection opened in line 346 of DefaultFaceletFactory.java is never closed

       

       

      try
      {
          URLConnection conn = facelet.getSource().openConnection();
          long lastModified = ResourceLoaderUtils.getResourceLastModified(conn);
      
          return lastModified == 0 || lastModified > target;
      }
      catch (IOException e)
      {
          throw new FaceletException("Error Checking Last Modified for " + facelet.getAlias(), e);
      }
      
      

       

      While this usually isn't an issue in most production environments, because the javax.faces.FACELETS_REFRESH_PERIOD is set either -1 or a high value, this can cause unexpected side effects in both test and hot-deploy production environments.

       

      The result of this issue is that every time the lastModified for a composite component is checked, the composite component file descriptor does stay open - on my test environment we did have 500k open file descriptors for composite component xhtml files.

      Attachments

        Activity

          People

            tandraschko Thomas Andraschko
            peda Peter Rainer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: