You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (Created) (JIRA)" <ji...@apache.org> on 2011/10/25 14:26:32 UTC

[jira] [Created] (DERBY-5480) File handle leak in MessageVetter

File handle leak in MessageVetter
---------------------------------

                 Key: DERBY-5480
                 URL: https://issues.apache.org/jira/browse/DERBY-5480
             Project: Derby
          Issue Type: Bug
          Components: Build tools
    Affects Versions: 10.9.0.0
            Reporter: Knut Anders Hatlen
            Assignee: Knut Anders Hatlen
            Priority: Minor


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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5480) File handle leak in MessageVetter

Posted by "Knut Anders Hatlen (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-5480:
--------------------------------------

    Attachment: d5480-1a.diff

The attached patch makes MessageVetter close the stream when it's done reading it.
                
> File handle leak in MessageVetter
> ---------------------------------
>
>                 Key: DERBY-5480
>                 URL: https://issues.apache.org/jira/browse/DERBY-5480
>             Project: Derby
>          Issue Type: Bug
>          Components: Build tools
>    Affects Versions: 10.9.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d5480-1a.diff
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5480) File handle leak in MessageVetter

Posted by "Knut Anders Hatlen (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-5480:
--------------------------------------

    Issue & fix info: Patch Available
    
> File handle leak in MessageVetter
> ---------------------------------
>
>                 Key: DERBY-5480
>                 URL: https://issues.apache.org/jira/browse/DERBY-5480
>             Project: Derby
>          Issue Type: Bug
>          Components: Build tools
>    Affects Versions: 10.9.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d5480-1a.diff
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (DERBY-5480) File handle leak in MessageVetter

Posted by "Knut Anders Hatlen (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen resolved DERBY-5480.
---------------------------------------

          Resolution: Fixed
       Fix Version/s: 10.9.0.0
    Issue & fix info:   (was: Patch Available)

Committed revision 1189063.
                
> File handle leak in MessageVetter
> ---------------------------------
>
>                 Key: DERBY-5480
>                 URL: https://issues.apache.org/jira/browse/DERBY-5480
>             Project: Derby
>          Issue Type: Bug
>          Components: Build tools
>    Affects Versions: 10.9.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.9.0.0
>
>         Attachments: d5480-1a.diff
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira