Derby
  1. Derby
  2. DERBY-5480

File handle leak in MessageVetter

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.9.1.0
    • Fix Version/s: 10.8.3.3, 10.9.1.0
    • Component/s: Build tools
    • Labels:
      None

      Description

      MessageVetter, which is executed by the build script, contains the following code to load a message file:

      properties.load(new FileInputStream(file));

      The FileInputStream isn't closed. Since MessageVetter runs embedded in the Ant process, file handles may be held open and cause problems later in the build. MessageVetter goes through more than 800 files, so the number of open file handles may be high when it has completed.

      Even though FileInputStream has a finalize() method that calls close(), so the streams will be closed eventually, we should close the streams explicitly to release system resources as early as possible.

      1. d5480-1a.diff
        0.8 kB
        Knut Anders Hatlen

        Issue Links

          Activity

          Knut Anders Hatlen created issue -
          Knut Anders Hatlen made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          Knut Anders Hatlen added a comment -

          The attached patch makes MessageVetter close the stream when it's done reading it.

          Show
          Knut Anders Hatlen added a comment - The attached patch makes MessageVetter close the stream when it's done reading it.
          Knut Anders Hatlen made changes -
          Attachment d5480-1a.diff [ 12500666 ]
          Knut Anders Hatlen made changes -
          Issue & fix info Patch Available [ 10102 ]
          Hide
          Knut Anders Hatlen added a comment -

          Committed revision 1189063.

          Show
          Knut Anders Hatlen added a comment - Committed revision 1189063.
          Knut Anders Hatlen made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Issue & fix info Patch Available [ 10102 ]
          Fix Version/s 10.9.0.0 [ 12316344 ]
          Resolution Fixed [ 1 ]
          Knut Anders Hatlen made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Gavin made changes -
          Workflow jira [ 12639376 ] Default workflow, editable Closed status [ 12796697 ]
          Mamta A. Satoor made changes -
          Assignee Knut Anders Hatlen [ knutanders ] Mamta A. Satoor [ mamtas ]
          Hide
          Mamta A. Satoor added a comment -

          Temporarily assigning it to me for backport to 10.8

          Show
          Mamta A. Satoor added a comment - Temporarily assigning it to me for backport to 10.8
          Hide
          ASF subversion and git services added a comment -

          Commit 1505853 from Mamta A. Satoor in branch 'code/branches/10'
          [ https://svn.apache.org/r1505853 ]

          DERBY-5480(File handle leak in MessageVetter)

          Backporting to 10.8. Fix contributed by Knut

          Show
          ASF subversion and git services added a comment - Commit 1505853 from Mamta A. Satoor in branch 'code/branches/10' [ https://svn.apache.org/r1505853 ] DERBY-5480 (File handle leak in MessageVetter) Backporting to 10.8. Fix contributed by Knut
          Mamta A. Satoor made changes -
          Fix Version/s 10.8.3.1 [ 12323475 ]
          Mamta A. Satoor made changes -
          Assignee Mamta A. Satoor [ mamtas ] Knut Anders Hatlen [ knutanders ]
          Mamta A. Satoor made changes -
          Link This issue is related to DERBY-6289 [ DERBY-6289 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open In Progress In Progress
          10m 9s 1 Knut Anders Hatlen 25/Oct/11 13:34
          In Progress In Progress Resolved Resolved
          19h 24m 1 Knut Anders Hatlen 26/Oct/11 08:59
          Resolved Resolved Closed Closed
          272d 9h 26m 1 Knut Anders Hatlen 24/Jul/12 18:26

            People

            • Assignee:
              Knut Anders Hatlen
              Reporter:
              Knut Anders Hatlen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development