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

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

A thread dump on 10.5.3.0 yielded multiple threads waiting with stack frames 
looking like this:

"Thread-1100" daemon prio=6 tid=0x03be9800 nid=0xd70 in Object.wait() 
[0x05a5e000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:485)
        at org.apache.derby.impl.services.locks.ActiveLock.waitForGrant(Unknown 
Source)
        - locked <0x285dc400> (a 
org.apache.derby.impl.services.locks.ActiveLock)
        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.fetchNextGroup(Unknown 
Source)
        at 
org.apache.derby.impl.sql.execute.BulkTableScanResultSet.reloadArray(Unknown 
Source)
        at 
org.apache.derby.impl.sql.execute.BulkTableScanResultSet.getNextRowCore(Unknown 
Source)
        at 
org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet.getNextRowCore(Unknown
 Source)
        at 
org.apache.derby.impl.sql.execute.NestedLoopJoinResultSet.getNextRowCore(Unknown
 Source)
        at 
org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.getNextRowCore(Unknown
 Source)
        at 
org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getNextRow(Unknown 
Source)
        at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown 
Source)
        - locked <0x2858b388> (a org.apache.derby.impl.jdbc.EmbedConnection40)
        at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source)


> 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

        

Reply via email to