Solr
  1. Solr
  2. SOLR-2912

File descriptor leak in ShowFileRequestHandler.getFileContents()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: web gui
    • Labels:
      None

      Description

      There is a file descriptor leak in ShowFileRequestHandler.getFileContents() - the InputStream is not closed. This could cause a "Too many open files" error if the admin page is loaded a lot.

      I've only tested this on 3.2, but I think it affects all recent versions, including trunk.

      1. SOLR-2912.patch
        0.8 kB
        Shalin Shekhar Mangar

        Activity

        Hide
        Hoss Man added a comment -

        Michael: thanks for catching this bug!

        FWIW: I'm pretty sure this method is only used by the main index.jsp page to include the "admin-extra.html" file – I don't believe it's used by regular usage of the ShowFileRequestHandler (ie: to view the schema.xml or solrconfig.xml files)

        so i think only users who leverage that feature (which i suspect is probably not a very large number since it isn't really advertised much) would have been bitten by this bug. (which also explains why no one noticed it until now)

        Show
        Hoss Man added a comment - Michael: thanks for catching this bug! FWIW: I'm pretty sure this method is only used by the main index.jsp page to include the "admin-extra.html" file – I don't believe it's used by regular usage of the ShowFileRequestHandler (ie: to view the schema.xml or solrconfig.xml files) so i think only users who leverage that feature (which i suspect is probably not a very large number since it isn't really advertised much) would have been bitten by this bug. (which also explains why no one noticed it until now)
        Hide
        Shalin Shekhar Mangar added a comment -

        Committed revision 1205774 on trunk and 1205775 on branch_3x.

        Show
        Shalin Shekhar Mangar added a comment - Committed revision 1205774 on trunk and 1205775 on branch_3x.
        Hide
        Shalin Shekhar Mangar added a comment -

        The fix.

        Show
        Shalin Shekhar Mangar added a comment - The fix.

          People

          • Assignee:
            Shalin Shekhar Mangar
            Reporter:
            Michael Ryan
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development