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 "Kathey Marsden (JIRA)" <de...@db.apache.org> on 2006/09/11 19:59:23 UTC

[jira] Created: (DERBY-1838) Derby allows dual boot which can cause corruption of databases with JVM's lower than 1.4.2 on non-windows systems

Derby allows dual boot which  can cause corruption of databases with JVM's lower than 1.4.2 on non-windows systems 
-------------------------------------------------------------------------------------------------------------------

                 Key: DERBY-1838
                 URL: http://issues.apache.org/jira/browse/DERBY-1838
             Project: Derby
          Issue Type: Bug
          Components: Store
    Affects Versions: 10.1.3.1, 10.1.3.0, 10.1.2.1, 10.1.1.0, 10.0.2.1, 10.0.2.0, 10.0.2.2, 10.1.3.2, 10.1.4.0, 10.2.1.0, 10.2.2.0, 10.3.0.0
            Reporter: Kathey Marsden
            Priority: Critical


On non-windows systems accidental access of  a database from two JVM's is not prevented on  JVM's lower than 1.4.2.   The issue can be triggered  by a common user error, for example accessing a database from two ij sessions.  This can cause unrecoverable corruption.  It is critical that users upgrade to 1.4.2 if there is a possibility that a user might access Derby in this way.

There was no known way to fix this issue until 1.4.2, so it is not likely that it can be resolved within Derby.  Upgrade of the JVM is the only known solution now.

Note: Even with 1.4.2 the dual boot issue exists in certain scenarios which are not well documented.  DERBY-700 has been filed and hopefully other fatal usage cases that can lead to dual boot can be isolated and resolved.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1838) Derby allows dual boot which can cause corruption of databases with JVM's lower than 1.4.2 on non-windows systems

Posted by "John H. Embretsen (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1838?page=comments#action_12434090 ] 
            
John H. Embretsen commented on DERBY-1838:
------------------------------------------

The Derby documentation specifies Java version 1.4 as the version with which a dual boot may be prevented automatically. Kathey reported version 1.4.2 as the critical one. I tried dual booting a database via IJ (trunk) using Sun's JDK 1.4.1, and I got ERROR XJ040 and ERROR XSDB6, as described on the doc page referenced by Suresh. So it seems that preventing dual boots also works with 1.4.1, and I assume that the documentation is accurate (the OS I tested on was Solaris 10 x86).

With JDK 1.3.1 I am able to dual boot a database, and I get a WARNING similar to the one described on the above mentioned doc page.

I also tried using the derby.database.forceDatabaseLock property with JDK 1.3.1, and it works as described in the docs [1], i.e. it prevents dual booting of the database. The error message I get in IJ could be improved, though. For example, it refers to the wrong property name, db2j.database.forceDatabaseLock instead of derby.database.forceDatabaseLock, and {1} and {2} are not replaced with real values:


ij> connect 'jdbc:derby:dualBootDB';
ERROR XJ040: Failed to start database 'dualBootDB', see the next exception for details.
ERROR XSDB8: WARNING: Derby (instance [Ljava.lang.Object;@617189) is attempting to boot the database {1} even though Derby (instance {2}) may still be active.  Only one instance of Derby should boot a database at a time. Severe and non-recoverable corruption can result if 2 instances of Derby boot on the same database at the same time.  The db2j.database.forceDatabaseLock=true property has been set, so the database will not boot until the db.lck is no longer present.  Normally this file is removed when the first instance of Derby to boot on the database exits, but it may be left behind in some shutdowns.  It will be necessary to remove the file by hand in that case.  It is important to verify that no other VM is accessing the database before deleting the db.lck file by hand.


[1] http://db.apache.org/derby/docs/dev/tuning/rtunproper81405.html


> Derby allows dual boot which  can cause corruption of databases with JVM's lower than 1.4.2 on non-windows systems
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1838
>                 URL: http://issues.apache.org/jira/browse/DERBY-1838
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.0.2.2, 10.1.1.0, 10.2.1.0, 10.1.2.1, 10.1.3.0, 10.3.0.0, 10.1.4.0, 10.1.3.1, 10.1.3.2, 10.2.2.0
>            Reporter: Kathey Marsden
>            Priority: Critical
>
> On non-windows systems accidental access of  a database from two JVM's is not prevented on  JVM's lower than 1.4.2.   The issue can be triggered  by a common user error, for example accessing a database from two ij sessions.  This can cause unrecoverable corruption.  It is critical that users upgrade to 1.4.2 if there is a possibility that a user might access Derby in this way.
> There was no known way to fix this issue until 1.4.2, so it is not likely that it can be resolved within Derby.  Upgrade of the JVM is the only known solution now.
> Note: Even with 1.4.2 the dual boot issue exists in certain scenarios which are not well documented.  DERBY-700 has been filed and hopefully other fatal usage cases that can lead to dual boot can be isolated and resolved.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (DERBY-1838) Derby allows dual boot which can cause corruption of databases with JVM's lower than 1.4.2 on non-windows systems

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

Daniel John Debrunner resolved DERBY-1838.
------------------------------------------

    Resolution: Won't Fix
    Derby Info:   (was: [Release Note Needed])

Trunk is no longer supported on JDK 1.3 so this will no longer be an issue there.

As Suresh & John pointed out this is documented and workarounds are provided.

I don't think there is an Java based solution for JDK 1.3, users can always switch to a 1.4 vm.

> Derby allows dual boot which  can cause corruption of databases with JVM's lower than 1.4.2 on non-windows systems
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1838
>                 URL: https://issues.apache.org/jira/browse/DERBY-1838
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.0.2.2, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.1.3.2, 10.1.4.0, 10.2.1.6, 10.2.2.0, 10.3.0.0
>            Reporter: Kathey Marsden
>            Priority: Critical
>
> On non-windows systems accidental access of  a database from two JVM's is not prevented on  JVM's lower than 1.4.2.   The issue can be triggered  by a common user error, for example accessing a database from two ij sessions.  This can cause unrecoverable corruption.  It is critical that users upgrade to 1.4.2 if there is a possibility that a user might access Derby in this way.
> There was no known way to fix this issue until 1.4.2, so it is not likely that it can be resolved within Derby.  Upgrade of the JVM is the only known solution now.
> Note: Even with 1.4.2 the dual boot issue exists in certain scenarios which are not well documented.  DERBY-700 has been filed and hopefully other fatal usage cases that can lead to dual boot can be isolated and resolved.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-1838) Derby allows dual boot which can cause corruption of databases with JVM's lower than 1.4.2 on non-windows systems

Posted by "Suresh Thalamati (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1838?page=comments#action_12434071 ] 
            
Suresh Thalamati commented on DERBY-1838:
-----------------------------------------

Kathy, 

I think this is issue not a bug ,  this is a known problem documented in the developer guide. http://db.apache.org/derby/docs/dev/devguide/cdevdvlp20458.html.

I agree,  it would be great  if some can fix this issue, but I would consider that as improvement. 





> Derby allows dual boot which  can cause corruption of databases with JVM's lower than 1.4.2 on non-windows systems
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1838
>                 URL: http://issues.apache.org/jira/browse/DERBY-1838
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.0.2.2, 10.1.1.0, 10.2.1.0, 10.1.2.1, 10.1.3.0, 10.3.0.0, 10.1.4.0, 10.1.3.1, 10.1.3.2, 10.2.2.0
>            Reporter: Kathey Marsden
>            Priority: Critical
>
> On non-windows systems accidental access of  a database from two JVM's is not prevented on  JVM's lower than 1.4.2.   The issue can be triggered  by a common user error, for example accessing a database from two ij sessions.  This can cause unrecoverable corruption.  It is critical that users upgrade to 1.4.2 if there is a possibility that a user might access Derby in this way.
> There was no known way to fix this issue until 1.4.2, so it is not likely that it can be resolved within Derby.  Upgrade of the JVM is the only known solution now.
> Note: Even with 1.4.2 the dual boot issue exists in certain scenarios which are not well documented.  DERBY-700 has been filed and hopefully other fatal usage cases that can lead to dual boot can be isolated and resolved.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1838) Derby allows dual boot which can cause corruption of databases with JVM's lower than 1.4.2 on non-windows systems

Posted by "Suresh Thalamati (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1838?page=comments#action_12435968 ] 
            
Suresh Thalamati commented on DERBY-1838:
-----------------------------------------

you are right John.  Dual boot  through multiple JVMs is prevented on Unix  from  JDK1.4 (1.4.0)  using the file lock  support., provided  in jdk1.4. 

/suresh

 

> Derby allows dual boot which  can cause corruption of databases with JVM's lower than 1.4.2 on non-windows systems
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1838
>                 URL: http://issues.apache.org/jira/browse/DERBY-1838
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.0.2.2, 10.1.1.0, 10.2.1.0, 10.1.2.1, 10.1.3.0, 10.3.0.0, 10.1.4.0, 10.1.3.1, 10.1.3.2, 10.2.2.0
>            Reporter: Kathey Marsden
>            Priority: Critical
>
> On non-windows systems accidental access of  a database from two JVM's is not prevented on  JVM's lower than 1.4.2.   The issue can be triggered  by a common user error, for example accessing a database from two ij sessions.  This can cause unrecoverable corruption.  It is critical that users upgrade to 1.4.2 if there is a possibility that a user might access Derby in this way.
> There was no known way to fix this issue until 1.4.2, so it is not likely that it can be resolved within Derby.  Upgrade of the JVM is the only known solution now.
> Note: Even with 1.4.2 the dual boot issue exists in certain scenarios which are not well documented.  DERBY-700 has been filed and hopefully other fatal usage cases that can lead to dual boot can be isolated and resolved.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (DERBY-1838) Derby allows dual boot which can cause corruption of databases with JVM's lower than 1.4.2 on non-windows systems

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

Kathey Marsden closed DERBY-1838.
---------------------------------


> Derby allows dual boot which  can cause corruption of databases with JVM's lower than 1.4.2 on non-windows systems
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1838
>                 URL: https://issues.apache.org/jira/browse/DERBY-1838
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.0.2.2, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.1.3.2, 10.1.4.0, 10.2.1.6, 10.2.2.0, 10.3.0.0
>            Reporter: Kathey Marsden
>            Priority: Critical
>
> On non-windows systems accidental access of  a database from two JVM's is not prevented on  JVM's lower than 1.4.2.   The issue can be triggered  by a common user error, for example accessing a database from two ij sessions.  This can cause unrecoverable corruption.  It is critical that users upgrade to 1.4.2 if there is a possibility that a user might access Derby in this way.
> There was no known way to fix this issue until 1.4.2, so it is not likely that it can be resolved within Derby.  Upgrade of the JVM is the only known solution now.
> Note: Even with 1.4.2 the dual boot issue exists in certain scenarios which are not well documented.  DERBY-700 has been filed and hopefully other fatal usage cases that can lead to dual boot can be isolated and resolved.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.