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"

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)