db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Wright (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-5073) Derby deadlocks without recourse on simultaneous correlated subqueries
Date Thu, 03 Mar 2011 13:39:38 GMT

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

Karl Wright commented on DERBY-5073:
------------------------------------

Ok, this is better:

ij> select * from syscs_diag.lock_table;
XID            |TYPE |MODE|TABLENAME                                                     
                                                                 |LOCKNAME            |STATE|TABLETYPE|LOCK&|INDEXNAME

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------
319444         |ROW  |X   |JOBQUEUE                                                      
                                                                 |(3,279)             |GRANT|T
       |11   |NULL

319447         |ROW  |S   |JOBQUEUE                                                      
                                                                 |(3,279)             |WAIT
|T        |0    |NULL

319450         |ROW  |S   |JOBQUEUE                                                      
                                                                 |(3,279)             |WAIT
|T        |0    |NULL

319453         |ROW  |S   |JOBQUEUE                                                      
                                                                 |(3,279)             |WAIT
|T        |0    |NULL

319459         |ROW  |S   |JOBQUEUE                                                      
                                                                 |(3,279)             |WAIT
|T        |0    |NULL

319456         |ROW  |S   |JOBQUEUE                                                      
                                                                 |(3,279)             |WAIT
|T        |0    |NULL

319462         |ROW  |S   |JOBQUEUE                                                      
                                                                 |(3,279)             |WAIT
|T        |0    |NULL

319553         |ROW  |S   |JOBQUEUE                                                      
                                                                 |(3,279)             |WAIT
|T        |0    |NULL

319435         |ROW  |X   |JOBQUEUE                                                      
                                                                 |(3,306)             |GRANT|T
       |11   |NULL

319447         |ROW  |X   |JOBQUEUE                                                      
                                                                 |(3,304)             |GRANT|T
       |11   |NULL

319435         |TABLE|IS  |CARRYDOWN                                                     
                                                                 |Tablelock           |GRANT|T
       |1    |NULL

319440         |TABLE|IS  |CARRYDOWN                                                     
                                                                 |Tablelock           |GRANT|T
       |1    |NULL

319444         |TABLE|IS  |CARRYDOWN                                                     
                                                                 |Tablelock           |GRANT|T
       |1    |NULL

319447         |TABLE|IS  |CARRYDOWN                                                     
                                                                 |Tablelock           |GRANT|T
       |1    |NULL

319450         |TABLE|IS  |CARRYDOWN                                                     
                                                                 |Tablelock           |GRANT|T
       |1    |NULL

319453         |TABLE|IS  |CARRYDOWN                                                     
                                                                 |Tablelock           |GRANT|T
       |1    |NULL

319459         |TABLE|IS  |CARRYDOWN                                                     
                                                                 |Tablelock           |GRANT|T
       |1    |NULL

319456         |TABLE|IS  |CARRYDOWN                                                     
                                                                 |Tablelock           |GRANT|T
       |1    |NULL

319462         |TABLE|IS  |CARRYDOWN                                                     
                                                                 |Tablelock           |GRANT|T
       |1    |NULL

319553         |TABLE|IS  |CARRYDOWN                                                     
                                                                 |Tablelock           |GRANT|T
       |1    |NULL

319435         |TABLE|IX  |PREREQEVENTS                                                  
                                                                 |Tablelock           |GRANT|T
       |2    |NULL

319440         |TABLE|IX  |PREREQEVENTS                                                  
                                                                 |Tablelock           |GRANT|T
       |2    |NULL

319444         |TABLE|IX  |PREREQEVENTS                                                  
                                                                 |Tablelock           |GRANT|T
       |2    |NULL

319447         |TABLE|IX  |PREREQEVENTS                                                  
                                                                 |Tablelock           |GRANT|T
       |2    |NULL

319450         |TABLE|IX  |PREREQEVENTS                                                  
                                                                 |Tablelock           |GRANT|T
       |2    |NULL

319453         |TABLE|IX  |PREREQEVENTS                                                  
                                                                 |Tablelock           |GRANT|T
       |2    |NULL

319456         |TABLE|IX  |PREREQEVENTS                                                  
                                                                 |Tablelock           |GRANT|T
       |2    |NULL

319459         |TABLE|IX  |PREREQEVENTS                                                  
                                                                 |Tablelock           |GRANT|T
       |2    |NULL

319462         |TABLE|IX  |PREREQEVENTS                                                  
                                                                 |Tablelock           |GRANT|T
       |2    |NULL

319553         |TABLE|IX  |PREREQEVENTS                                                  
                                                                 |Tablelock           |GRANT|T
       |2    |NULL

319459         |ROW  |X   |JOBQUEUE                                                      
                                                                 |(3,308)             |GRANT|T
       |11   |NULL

323231         |ROW  |S   |JOBQUEUE                                                      
                                                                 |(3,308)             |WAIT
|T        |0    |NULL

319456         |ROW  |X   |JOBQUEUE                                                      
                                                                 |(3,307)             |GRANT|T
       |11   |NULL

319440         |ROW  |X   |JOBQUEUE                                                      
                                                                 |(3,295)             |GRANT|T
       |11   |NULL

319435         |ROW  |S   |JOBQUEUE                                                      
                                                                 |(3,295)             |WAIT
|T        |0    |NULL

319444         |ROW  |S   |JOBQUEUE                                                      
                                                                 |(3,295)             |WAIT
|T        |0    |NULL

319450         |ROW  |X   |JOBQUEUE                                                      
                                                                 |(3,297)             |GRANT|T
       |11   |NULL

319553         |ROW  |X   |JOBQUEUE                                                      
                                                                 |(3,300)             |GRANT|T
       |11   |NULL

319462         |ROW  |X   |JOBQUEUE                                                      
                                                                 |(3,301)             |GRANT|T
       |11   |NULL

319440         |ROW  |S   |JOBQUEUE                                                      
                                                                 |(3,301)             |WAIT
|T        |0    |NULL

319453         |ROW  |X   |JOBQUEUE                                                      
                                                                 |(3,302)             |GRANT|T
       |11   |NULL

319440         |TABLE|IX  |JOBQUEUE                                                      
                                                                 |Tablelock           |GRANT|T
       |11   |NULL

319435         |TABLE|IX  |JOBQUEUE                                                      
                                                                 |Tablelock           |GRANT|T
       |11   |NULL

319435         |TABLE|IS  |JOBQUEUE                                                      
                                                                 |Tablelock           |GRANT|T
       |2    |NULL

319440         |TABLE|IS  |JOBQUEUE                                                      
                                                                 |Tablelock           |GRANT|T
       |2    |NULL

319444         |TABLE|IX  |JOBQUEUE                                                      
                                                                 |Tablelock           |GRANT|T
       |11   |NULL

319444         |TABLE|IS  |JOBQUEUE                                                      
                                                                 |Tablelock           |GRANT|T
       |2    |NULL

319447         |TABLE|IX  |JOBQUEUE                                                      
                                                                 |Tablelock           |GRANT|T
       |11   |NULL

319447         |TABLE|IS  |JOBQUEUE                                                      
                                                                 |Tablelock           |GRANT|T
       |2    |NULL

319450         |TABLE|IX  |JOBQUEUE                                                      
                                                                 |Tablelock           |GRANT|T
       |11   |NULL

319450         |TABLE|IS  |JOBQUEUE                                                      
                                                                 |Tablelock           |GRANT|T
       |2    |NULL

319453         |TABLE|IX  |JOBQUEUE                                                      
                                                                 |Tablelock           |GRANT|T
       |11   |NULL

319453         |TABLE|IS  |JOBQUEUE                                                      
                                                                 |Tablelock           |GRANT|T
       |2    |NULL

319456         |TABLE|IX  |JOBQUEUE                                                      
                                                                 |Tablelock           |GRANT|T
       |11   |NULL

319459         |TABLE|IX  |JOBQUEUE                                                      
                                                                 |Tablelock           |GRANT|T
       |11   |NULL

319459         |TABLE|IS  |JOBQUEUE                                                      
                                                                 |Tablelock           |GRANT|T
       |2    |NULL

319456         |TABLE|IS  |JOBQUEUE                                                      
                                                                 |Tablelock           |GRANT|T
       |2    |NULL

319462         |TABLE|IX  |JOBQUEUE                                                      
                                                                 |Tablelock           |GRANT|T
       |11   |NULL

319462         |TABLE|IS  |JOBQUEUE                                                      
                                                                 |Tablelock           |GRANT|T
       |2    |NULL

319553         |TABLE|IX  |JOBQUEUE                                                      
                                                                 |Tablelock           |GRANT|T
       |11   |NULL

319553         |TABLE|IS  |JOBQUEUE                                                      
                                                                 |Tablelock           |GRANT|T
       |2    |NULL

323231         |TABLE|IS  |JOBQUEUE                                                      
                                                                 |Tablelock           |GRANT|T
       |1    |NULL


62 rows selected
ij>


> 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

        

Mime
View raw message