Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-4711

Hung thread after another thread is interrupted

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.5.3.0
    • 10.5.3.2, 10.6.2.2, 10.7.1.1
    • Services
    • None
    • Windows server 2008
    • Normal
    • Seen in production

    Description

      We've seen a problem today where we have several threads querying our database and when one gets interrupted the others are stuck waiting for a lock. Here is the stack trace for the stuck thread(s):

      daemon prio=4
      "DefaultExecutorService-pool-1-thread-47" Id=98 WAITING on org.apache.derby.impl.services.locks.ActiveLock@6e6f45a1
      at java.lang.Object.wait(Native Method)

      • waiting on org.apache.derby.impl.services.locks.ActiveLock@6e6f45a1
        at java.lang.Object.wait(Object.java:485)
        at org.apache.derby.impl.services.locks.ActiveLock.waitForGrant(ActiveLock.java:115)
        at org.apache.derby.impl.services.locks.ConcurrentLockSet.lockObject(ConcurrentLockSet.java:463)
        at org.apache.derby.impl.services.locks.ConcurrentLockSet.zeroDurationLockObject(ConcurrentLockSet.java:855)
        at org.apache.derby.impl.services.locks.AbstractPool.zeroDurationlockObject(AbstractPool.java:297)
        at org.apache.derby.impl.services.locks.ConcurrentPool.zeroDurationlockObject(ConcurrentPool.java:28)
        at org.apache.derby.impl.store.raw.xact.RowLocking2nohold.lockRecordForRead(RowLocking2nohold.java:89)
        at org.apache.derby.impl.store.access.heap.HeapController.lockRow(HeapController.java:520)
        at org.apache.derby.impl.store.access.heap.HeapController.lockRow(HeapController.java:638)
        at org.apache.derby.impl.store.access.btree.index.B2IRowLocking3.lockRowOnPage(B2IRowLocking3.java:309)
        at org.apache.derby.impl.store.access.btree.index.B2IRowLocking3._lockScanRow(B2IRowLocking3.java:599)
        at org.apache.derby.impl.store.access.btree.index.B2IRowLockingRR.lockScanRow(B2IRowLockingRR.java:105)
        at org.apache.derby.impl.store.access.btree.BTreeForwardScan.fetchRows(BTreeForwardScan.java:305)
        at org.apache.derby.impl.store.access.btree.BTreeScan.fetchNextGroup(BTreeScan.java:1585)
        at org.apache.derby.impl.sql.execute.BulkTableScanResultSet.reloadArray(BulkTableScanResultSet.java:327)
        at org.apache.derby.impl.sql.execute.BulkTableScanResultSet.getNextRowCore(BulkTableScanResultSet.java:282)
        at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getNextRow(BasicNoPutResultSetImpl.java:460)
        at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(EmbedResultSet.java:427)
      • locked org.apache.derby.impl.jdbc.EmbedConnection40@445d374b
        at org.apache.derby.impl.jdbc.EmbedResultSet.next(EmbedResultSet.java:371)
        ...

      Attachments

        1. interrupted-exception-fix.patch
          2 kB
          Luke Quinane
        2. interrupted-exception-fix.diff
          2 kB
          Luke Quinane
        3. junit.diff
          8 kB
          Knut Anders Hatlen
        4. junit-timing-fix.diff
          0.8 kB
          Knut Anders Hatlen

        Issue Links

          Activity

            People

              luke-nuix Luke Quinane
              luke-nuix Luke Quinane
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: