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 "Mike Matrigali (JIRA)" <ji...@apache.org> on 2014/01/08 20:42:50 UTC

[jira] [Commented] (DERBY-5563) UniqueConstraintMultiThreadedTest fails intermittently to due to lock timeout

    [ https://issues.apache.org/jira/browse/DERBY-5563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13865786#comment-13865786 ] 

Mike Matrigali commented on DERBY-5563:
---------------------------------------

saw again recently against trunk, ibm16, windows, is intermittent as it worked in same testing environment day before and day after:
http://people.apache.org/~myrnavl/derby_test_results/main/windows/testlog/ibm16/1553241-suites.All_diff.txt
There was 1 failure:
1) testLockingWithCommit(org.apache.derbyTesting.functionTests.tests.lang.ConstraintCharacteristicsTest)junit.framework.ComparisonFailure: isolation levels: 1 2 expected:<[23505]> but was:<[40XL1]>
	at org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:876)
	at org.apache.derbyTesting.functionTests.tests.lang.ConstraintCharacteristicsTest.executeThreads(ConstraintCharacteristicsTest.java:1324)
	at org.apache.derbyTesting.functionTests.tests.lang.ConstraintCharacteristicsTest.testLockingWithCommit(ConstraintCharacteristicsTest.java:1251)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:118)
	at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:440)
	at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:457)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
	at junit.extensions.TestSetup.run(TestSetup.java:25)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
	at junit.extensions.TestSetup.run(TestSetup.java:25)
Caused by: java.sql.SQLTransactionRollbackException: A lock could not be obtained within the time requested
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.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.EmbedStatement.executeStatement(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedStatement.executeLargeUpdate(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(Unknown Source)
	at org.apache.derbyTesting.functionTests.tests.lang.DBOperations.insert(DBOperations.java:61)
	at org.apache.derbyTesting.functionTests.tests.lang.DBOperations.run(DBOperations.java:103)
	at java.lang.Thread.run(Thread.java:761)
Caused by: java.sql.SQLException: A lock could not be obtained within the time requested
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(Unknown Source)
	... 13 more
Caused by: ERROR 40XL1: A lock could not be obtained within the time requested
	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
	at org.apache.derby.impl.services.locks.ConcurrentLockSet.lockObject(Unknown Source)
	at org.apache.derby.impl.services.locks.ConcurrentLockSet.zeroDurationLockObject(Unknown Source)
	at org.apache.derby.impl.services.locks.AbstractPool.zeroDurationlockObject(Unknown Source)
	at org.apache.derby.impl.services.locks.ConcurrentPool.zeroDurationlockObject(Unknown Source)
	at org.apache.derby.impl.store.raw.xact.RowLocking2nohold.lockRecordForRead(Unknown Source)
	at org.apache.derby.impl.store.access.heap.HeapController.lockRow(Unknown Source)
	at org.apache.derby.impl.store.access.heap.HeapController.lockRow(Unknown Source)
	at org.apache.derby.impl.store.access.btree.index.B2IRowLocking3.lockRowOnPage(Unknown Source)
	at org.apache.derby.impl.store.access.btree.index.B2IRowLocking3._lockScanRow(Unknown Source)
	at org.apache.derby.impl.store.access.btree.index.B2IRowLockingRR.lockScanRow(Unknown Source)
	at org.apache.derby.impl.store.access.btree.BTreeForwardScan.fetchRows(Unknown Source)
	at org.apache.derby.impl.store.access.btree.BTreeScan.next(Unknown Source)
	at org.apache.derby.impl.sql.execute.IndexChanger.insertAndCheckDups(Unknown Source)
	at org.apache.derby.impl.sql.execute.IndexChanger.doInsert(Unknown Source)
	at org.apache.derby.impl.sql.execute.IndexChanger.insert(Unknown Source)
	at org.apache.derby.impl.sql.execute.IndexSetChanger.insert(Unknown Source)
	at org.apache.derby.impl.sql.execute.RowChangerImpl.insertRow(Unknown Source)
	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
	... 7 more

FAILURES!!!
Tests run: 18038,  Failures: 1,  Errors: 0

> UniqueConstraintMultiThreadedTest fails intermittently to due to lock timeout
> -----------------------------------------------------------------------------
>
>                 Key: DERBY-5563
>                 URL: https://issues.apache.org/jira/browse/DERBY-5563
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>         Environment: Solaris 11 x86, Java 1.7u4 prerelease
>            Reporter: Dag H. Wanvik
>
> I saw this on a heavily loaded machine using 10.8.2.2 bits:
> testLockingWithcommit(org.apache.derbyTesting.functionTests.tests.lang.UniqueConstraintMultiThreadedTest) FAILURE:
> junit.framework.ComparisonFailure: isolation levels: 1 2 expected:<[23505]> but was:<[40XL1]>
> 	at junit.framework.Assert.assertEquals(Assert.java:81)
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:791)
> 	at org.apache.derbyTesting.functionTests.tests.lang.UniqueConstraintMultiThreadedTest.executeThreads(UniqueConstraintMultiThreadedTest.java:68)
> 	at org.apache.derbyTesting.functionTests.tests.lang.UniqueConstraintMultiThreadedTest.testLockingWithcommit(UniqueConstraintMultiThreadedTest.java:97)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:601)
> 	at junit.framework.TestCase.runTest(TestCase.java:164)
> 	at junit.framework.TestCase.runBare(TestCase.java:130)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:113)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:120)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:230)
> 	at junit.framework.TestSuite.run(TestSuite.java:225)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:230)
> 	at junit.framework.TestSuite.run(TestSuite.java:225)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:230)
> 	at junit.framework.TestSuite.run(TestSuite.java:225)
> 	at kah.TestRunner.main(TestRunner.java:77)
> Caused by: java.sql.SQLTransactionRollbackException: A lock could not be obtained within the time requested
> 	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.EmbedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(Unknown Source)
> 	at org.apache.derbyTesting.functionTests.tests.lang.DBOperations.insert(DBOperations.java:61)
> 	at org.apache.derbyTesting.functionTests.tests.lang.DBOperations.run(DBOperations.java:103)
> 	at java.lang.Thread.run(Thread.java:722)
> Caused by: java.sql.SQLException: A lock could not be obtained within the time requested
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
> 	... 12 more
> Caused by: ERROR 40XL1: A lock could not be obtained within the time requested
> 	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
> 	at org.apache.derby.impl.services.locks.ConcurrentLockSet.lockObject(Unknown Source)
> 	at org.apache.derby.impl.services.locks.AbstractPool.lockObject(Unknown Source)
> 	at org.apache.derby.impl.services.locks.ConcurrentPool.lockObject(Unknown Source)
> 	at org.apache.derby.impl.store.raw.xact.RowLocking3.lockRecordForWrite(Unknown Source)
> 	at org.apache.derby.impl.store.access.heap.HeapController.lockRow(Unknown Source)
> 	at org.apache.derby.impl.store.access.heap.HeapController.lockRow(Unknown Source)
> 	at org.apache.derby.impl.store.access.btree.index.B2IRowLocking3.lockRowOnPage(Unknown Source)
> 	at org.apache.derby.impl.store.access.btree.index.B2IRowLocking3.lockNonScanRowOnPage(Unknown Source)
> 	at org.apache.derby.impl.store.access.btree.BTreeController.compareRowsForInsert(Unknown Source)
> 	at org.apache.derby.impl.store.access.btree.BTreeController.comparePreviousRecord(Unknown Source)
> 	at org.apache.derby.impl.store.access.btree.BTreeController.compareLeftAndRightSiblings(Unknown Source)
> 	at org.apache.derby.impl.store.access.btree.BTreeController.doIns(Unknown Source)
> 	at org.apache.derby.impl.store.access.btree.BTreeController.insert(Unknown Source)
> 	at org.apache.derby.impl.store.access.btree.index.B2IController.insert(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.IndexChanger.insertAndCheckDups(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.IndexChanger.doInsert(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.IndexChanger.insert(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.IndexSetChanger.insert(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.RowChangerImpl.insertRow(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> 	... 6 more
> Running it again showed no problem.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)