Details
-
Bug
-
Status: Open
-
Critical
-
Resolution: Unresolved
-
10.4.2.0
-
None
-
Linux, Sun jdk 1.6.0_12 (64-bit)
-
Normal
-
Crash, Seen in production
Description
Due to some other issue in derby (a hang in ActiveLock.waitForGrant
while executing a prepared-statement), the transaction times out at
which point Derby hits the following java-level deadlock (from the
jvm thread-dump):
Found one Java-level deadlock:
=============================
"Thread-6":
waiting to lock monitor 0x00002aaaf43d2ec8 (object 0x00002aaadcce9070, a org.apache.derby.jdbc.XATransactionState),
which is held by "Timer-0"
"Timer-0":
waiting to lock monitor 0x00002aaaf43d75a8 (object 0x00002aaadcce2e60, a org.apache.derby.impl.jdbc.EmbedConnection40),
which is held by "Thread-6"
Java stack information for the threads listed above:
===================================================
"Thread-6":
at org.apache.derby.jdbc.XATransactionState.cleanupOnError(Unknown Source)
- waiting to lock <0x00002aaadcce9070> (a org.apache.derby.jdbc.XATransactionState)
at org.apache.derby.iapi.services.context.ContextManager.cleanupOnError(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.cleanupOnError(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) - locked <0x00002aaadcce2e60> (a org.apache.derby.impl.jdbc.EmbedConnection40)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source) - locked <0x00002aaadcce2e60> (a org.apache.derby.impl.jdbc.EmbedConnection40)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
at org.apache.derby.iapi.jdbc.BrokeredStatement.execute(Unknown Source)
at org.fedoracommons.akubra.txn.derby.TransactionalConnection.beforeCompletion(TransactionalConnection.java:293)
at bitronix.tm.BitronixTransaction.fireBeforeCompletionEvent(BitronixTransaction.java:366)
at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:142)
at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:96)
at org.fedoracommons.akubra.txn.derby.TestTransactionalStore.doInTxn(TestTransactionalStore.java:759)
at org.fedoracommons.akubra.txn.derby.TestTransactionalStore.access$900(TestTransactionalStore.java:60)
at org.fedoracommons.akubra.txn.derby.TestTransactionalStore$4.erun(TestTransactionalStore.java:586)
at org.fedoracommons.akubra.txn.derby.TestTransactionalStore$ERunnable.run(TestTransactionalStore.java:803)
at java.lang.Thread.run(Thread.java:619)
"Timer-0":
at org.apache.derby.impl.jdbc.EmbedConnection.xa_rollback(Unknown Source) - waiting to lock <0x00002aaadcce2e60> (a org.apache.derby.impl.jdbc.EmbedConnection40)
at org.apache.derby.jdbc.XATransactionState.cancel(Unknown Source) - locked <0x00002aaadcce9070> (a org.apache.derby.jdbc.XATransactionState)
at org.apache.derby.jdbc.XATransactionState.access$000(Unknown Source)
at org.apache.derby.jdbc.XATransactionState$CancelXATransactionTask.run(Unknown Source)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Found 1 deadlock.