[ 
https://issues.apache.org/jira/browse/DERBY-5454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Knut Anders Hatlen updated DERBY-5454:
--------------------------------------

    Affects Version/s: 10.7.1.1

Seems like this deadlock predates 10.8.1 too. I started NsTest on 10.7.1.1 
(embedded, default settings) and after just a few minutes I saw this deadlock 
trace:

java.sql.SQLTransactionRollbackException: A lock could not be obtained due to a 
deadlock, cycle of locks and waiters is:
Lock : ROW, NSTESTTAB, (685,18)
  Waiting XID : {126705, S} , NSTEST, select max(serialkey) from nstesttab 
where serialkey > ?
  Granted XID : {126703, X} 
Lock : ROW, NSTESTTAB, (685,19)
  Waiting XID : {126703, S} , NSTEST, select max(serialkey) from nstesttab 
where serialkey > ?
  Granted XID : {126705, X} 
. The selected victim is XID : 126705. while selecting a random row
java.sql.SQLTransactionRollbackException: A lock could not be obtained due to a 
deadlock, cycle of locks and waiters is:
Lock : ROW, NSTESTTAB, (685,18)
  Waiting XID : {126705, S} , NSTEST, select max(serialkey) from nstesttab 
where serialkey > ?
  Granted XID : {126703, X} 
Lock : ROW, NSTESTTAB, (685,19)
  Waiting XID : {126703, S} , NSTEST, select max(serialkey) from nstesttab 
where serialkey > ?
  Granted XID : {126705, X} 
. The selected victim is XID : 126705.
        at 
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown 
Source)
        at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown 
Source)
        at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown 
Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown 
Source)
        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown 
Source)
        at 
org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(Unknown 
Source)
        at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown 
Source)
        at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source)
        at 
org.apache.derbyTesting.system.nstest.utils.DbUtil.pick_one(DbUtil.java:527)
        at 
org.apache.derbyTesting.system.nstest.utils.DbUtil.delete_one_row(DbUtil.java:440)
        at 
org.apache.derbyTesting.system.nstest.tester.TesterObject.doIUDOperation(TesterObject.java:175)
        at 
org.apache.derbyTesting.system.nstest.tester.Tester2.startTesting(Tester2.java:109)
        at org.apache.derbyTesting.system.nstest.NsTest.run(NsTest.java:555)
                
> ERROR 40001 deadlock in nstest on select max(serialkey)
> -------------------------------------------------------
>
>                 Key: DERBY-5454
>                 URL: https://issues.apache.org/jira/browse/DERBY-5454
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.7.1.1, 10.8.2.1, 10.8.2.2
>            Reporter: Myrna van Lunteren
>
> nstest with 10.8.2 (both 10.8.2.1 RC2 (revision 1170221) and builds off the 
> 10.8. tree at 10.8.2.2 level after backing out re DERBY-5448) show deadlock 
> errors like the following:
> Caused by: ERROR 40001: A lock could not be obtained due to a deadlock, cycle 
> of
>         at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown 
> Source)
>         at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown 
> Source)
>         at 
> org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(Unknown 
> Source)
>         at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown 
> Source)
>         at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source)
>         at 
> org.apache.derbyTesting.system.nstest.utils.DbUtil.pick_one(DbUtil.java:491)
>         at 
> org.apache.derbyTesting.system.nstest.utils.DbUtil.delete_one_row(DbUtil.java:418)
>         at 
> org.apache.derbyTesting.system.nstest.tester.TesterObject.doIUDOperation(TesterObject.java:175)
>         at 
> org.apache.derbyTesting.system.nstest.tester.Tester2.startTesting(Tester2.java:109)
>         at org.apache.derbyTesting.system.nstest.NsTest.run(NsTest.java:555)
> Caused by: java.sql.SQLException: A lock could not be obtained due to a 
> deadlock, cycle of locks and waiters is:
> Lock : ROW, NSTESTTAB, (619,15)
>   Waiting XID : {104564, S} , NSTEST, select max(serialkey) from nstesttab 
> where serialkey > ?
>   Granted XID : {104179, X}
> Lock : ROW, NSTESTTAB, (619,16)
>   Waiting XID : {104179, S} , NSTEST, select max(serialkey) from nstesttab 
> where serialkey > ?
>   Granted XID : {104564, X}
> . The selected victim is XID : 104564.
>         at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
>         at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
>  Source)
>         ... 14 more
> For more examples, see comments on DERBY-5448.

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

        

Reply via email to