[
https://issues.apache.org/jira/browse/DERBY-5073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13000564#comment-13000564
]
Knut Anders Hatlen commented on DERBY-5073:
-------------------------------------------
Note that Derby will only detect a deadlock if the thread holding the exclusive
lock is also waiting for a lock itself. That is, there has to be a cycle in the
wait graph. It's not enough that a transaction is simply holding an exclusive
lock for a very long time without committing. I'm not sure if that's what's
happening here, but that situation is supposed to be handled by the lock
timeout.
One way to connect to the embedded database while the system is hung, is to set
the system property derby.drda.startNetworkServer=true -
http://db.apache.org/derby/docs/10.7/adminguide/radminconfigstartnetworkserver.html
- and connect to the database with ij using the client driver.
> Derby deadlocks without recourse on simultaneous correlated subqueries
> ----------------------------------------------------------------------
>
> Key: DERBY-5073
> URL: https://issues.apache.org/jira/browse/DERBY-5073
> Project: Derby
> Issue Type: Bug
> Reporter: Karl Wright
>
> When the following two queries are run against tables that contain the
> necessary fields, using multiple threads, Derby deadlocks and none of the
> queries ever returns. Derby apparently detects no deadlock condition, either.
> SELECT t0.* FROM jobqueue t0 WHERE EXISTS(SELECT 'x' FROM carrydown t1 WHERE
> t1.parentidhash IN (?) AND t1.childidhash=t0.dochash AND t0.jobid=t1.jobid)
> AND t0.jobid=?
> SELECT t0.* FROM jobqueue t0 WHERE EXISTS(SELECT 'x' FROM carrydown t1 WHERE
> t1.parentidhash IN (?) AND t1.childidhash=t0.dochash AND t0.jobid=t1.jobid
> AND t1.newField=?) AND t0.jobid=?
> This code comes from Apache ManifoldCF, and has occurred when there are five
> or more threads trying to execute these two queries at the same time.
> Originally we found this on 10.5.3.0. It was hoped that 10.7.1.1 would fix
> the problem, but it hasn't.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira