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 "Rick Hillegas (Created) (JIRA)" <ji...@apache.org> on 2012/02/15 15:19:00 UTC

[jira] [Created] (DERBY-5618) On Windows, orderly engine shutdown does not release the file handle on a jar file containing a database which was booted using the classpath subprotocol

On Windows, orderly engine shutdown does not release the file handle on a jar file containing a database which was booted using the classpath subprotocol
---------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: DERBY-5618
                 URL: https://issues.apache.org/jira/browse/DERBY-5618
             Project: Derby
          Issue Type: Bug
          Components: Services, Store
    Affects Versions: 10.9.0.0
         Environment: xp professional 5.1, oracle java 6, derby 10.9 trunk
            Reporter: Rick Hillegas


Boot a database in a jar file, using the classpath subprotocol, then shutdown the engine. This leaves the jar file still open on Windows. However, orderly engine shutdown correctly releases the file if you boot it using the jar subprotocol instead. I will attach a repro.

--
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-5618) On Windows, orderly engine shutdown does not release the file handle on a jar file containing a database which was booted using the classpath subprotocol

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

Mike Matrigali updated DERBY-5618:
----------------------------------

    Issue & fix info: High Value Fix,Repro attached  (was: Repro attached)
              Labels: derby_triage10_9  (was: )

10.9 triage 
has a repro and is tests are disabled because of it, so would be nice to fix.  

I don't know much about jar file databases.  Is derby meant to support booting from a jar file using 
using the classpath subprotocol, or should one always use the jar subprotocol.
                
> On Windows, orderly engine shutdown does not release the file handle on a jar file containing a database which was booted using the classpath subprotocol
> ---------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5618
>                 URL: https://issues.apache.org/jira/browse/DERBY-5618
>             Project: Derby
>          Issue Type: Bug
>          Components: Services, Store
>    Affects Versions: 10.9.0.0
>         Environment: xp professional 5.1, oracle java 6, derby 10.9 trunk
>            Reporter: Rick Hillegas
>              Labels: derby_triage10_9
>         Attachments: 5618.sql, FileUtils.java
>
>
> Boot a database in a jar file, using the classpath subprotocol, then shutdown the engine. This leaves the jar file still open on Windows. However, orderly engine shutdown correctly releases the file if you boot it using the jar subprotocol instead. I will attach a repro.

--
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] [Commented] (DERBY-5618) On Windows, orderly engine shutdown does not release the file handle on a jar file containing a database which was booted using the classpath subprotocol

Posted by "Rick Hillegas (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13208553#comment-13208553 ] 

Rick Hillegas commented on DERBY-5618:
--------------------------------------

Hi Kristian,

That is a good point. The file handle is probably still open on *nix platforms too. It's just that we notice the orphaned file handle on Windows. Note that in the repro, the same process runs the engine, shuts it down, and then tries to delete the jar file. Thanks.
                
> On Windows, orderly engine shutdown does not release the file handle on a jar file containing a database which was booted using the classpath subprotocol
> ---------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5618
>                 URL: https://issues.apache.org/jira/browse/DERBY-5618
>             Project: Derby
>          Issue Type: Bug
>          Components: Services, Store
>    Affects Versions: 10.9.0.0
>         Environment: xp professional 5.1, oracle java 6, derby 10.9 trunk
>            Reporter: Rick Hillegas
>         Attachments: 5618.sql, FileUtils.java
>
>
> Boot a database in a jar file, using the classpath subprotocol, then shutdown the engine. This leaves the jar file still open on Windows. However, orderly engine shutdown correctly releases the file if you boot it using the jar subprotocol instead. I will attach a repro.

--
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] [Commented] (DERBY-5618) On Windows, orderly engine shutdown does not release the file handle on a jar file containing a database which was booted using the classpath subprotocol

Posted by "Rick Hillegas (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13217194#comment-13217194 ] 

Rick Hillegas commented on DERBY-5618:
--------------------------------------

Hi Mike,

I also am not an expert on accessing databases via the classpath subprotocol. However, the Developer's Guide says this in the section titled "Accessing databases from the classpath":

"In most cases, you access databases from the file system. However, it is also possible to access databases from the classpath. The databases can be archived into a jar or zip file or left as is.

All such databases are read-only.

To access an unarchived database from the classpath, specify the name of the database relative to the directory in the classpath. You can use the classpath subprotocol if such a database is ambiguous within the directory system."
                
> On Windows, orderly engine shutdown does not release the file handle on a jar file containing a database which was booted using the classpath subprotocol
> ---------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5618
>                 URL: https://issues.apache.org/jira/browse/DERBY-5618
>             Project: Derby
>          Issue Type: Bug
>          Components: Services, Store
>    Affects Versions: 10.9.0.0
>         Environment: xp professional 5.1, oracle java 6, derby 10.9 trunk
>            Reporter: Rick Hillegas
>              Labels: derby_triage10_9
>         Attachments: 5618.sql, FileUtils.java
>
>
> Boot a database in a jar file, using the classpath subprotocol, then shutdown the engine. This leaves the jar file still open on Windows. However, orderly engine shutdown correctly releases the file if you boot it using the jar subprotocol instead. I will attach a repro.

--
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-5618) On Windows, orderly engine shutdown does not release the file handle on a jar file containing a database which was booted using the classpath subprotocol

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

Rick Hillegas updated DERBY-5618:
---------------------------------

    Attachment: 5618.sql
                FileUtils.java

Attaching a repro for this problem:

1) FileUtils.java - A set of routines to perform file operations. These operations are used by the following script.

2) 5618.sql - A script that shows the problem.

Just compile FileUtils and put it on your classpath. Then run the script through ij.
                
> On Windows, orderly engine shutdown does not release the file handle on a jar file containing a database which was booted using the classpath subprotocol
> ---------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5618
>                 URL: https://issues.apache.org/jira/browse/DERBY-5618
>             Project: Derby
>          Issue Type: Bug
>          Components: Services, Store
>    Affects Versions: 10.9.0.0
>         Environment: xp professional 5.1, oracle java 6, derby 10.9 trunk
>            Reporter: Rick Hillegas
>         Attachments: 5618.sql, FileUtils.java
>
>
> Boot a database in a jar file, using the classpath subprotocol, then shutdown the engine. This leaves the jar file still open on Windows. However, orderly engine shutdown correctly releases the file if you boot it using the jar subprotocol instead. I will attach a repro.

--
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] [Commented] (DERBY-5618) On Windows, orderly engine shutdown does not release the file handle on a jar file containing a database which was booted using the classpath subprotocol

Posted by "Kristian Waagan (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13208536#comment-13208536 ] 

Kristian Waagan commented on DERBY-5618:
----------------------------------------

For clarity only, I assume the jar file is left open on other platforms than Windows too, but that on those other platforms you can write to the file even if another process has a file handle to it?
                
> On Windows, orderly engine shutdown does not release the file handle on a jar file containing a database which was booted using the classpath subprotocol
> ---------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5618
>                 URL: https://issues.apache.org/jira/browse/DERBY-5618
>             Project: Derby
>          Issue Type: Bug
>          Components: Services, Store
>    Affects Versions: 10.9.0.0
>         Environment: xp professional 5.1, oracle java 6, derby 10.9 trunk
>            Reporter: Rick Hillegas
>         Attachments: 5618.sql, FileUtils.java
>
>
> Boot a database in a jar file, using the classpath subprotocol, then shutdown the engine. This leaves the jar file still open on Windows. However, orderly engine shutdown correctly releases the file if you boot it using the jar subprotocol instead. I will attach a repro.

--
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