xadisk
  1. xadisk
  2. XADISK-111

Deadlock/Timeout detectors may send interrupt to a thread even outside lock acquisition methods.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.2.1
    • Component/s: filesystem
    • Labels:
      None

      Description

      Deadlock/Timeout detectors may send interrupt to a thread even if it is outside lock acquisition methods. If the lock-request method has completed, we do not need to interrupt the thread, because the 2 possible motives are anyway served:

      1. deadlock is over now because the lock waiting is over (due to whatever reason),

      2. for transaction timeout case, the timeout-detector rolls back the transaction; interrupt was kept just to bring the thread outside wait for lock.

      The relevant code is (in class NativeConcurrencyControl), abridged:

      public void interruptTransactionIfWaitingForResourceLock(TransactionInformation xid, byte cause) {
      ResourceDependencyGraph.Node node;
      node = //node representing xid if it is inside a lock acquisition method, null otherwise.
      //time t1
      if(node != null) {
      synchronized (node.getInterruptFlagLock())

      { node.getThreadWaitingForLock().interrupt(); }

      }
      }

      The problem with above is that if the transaction comes out of the lock acquisition method after time t1, we would still be sending interrupts to it.

        Activity

        Hide
        Nitin Verma added a comment -

        Checked-in the changes to trunk.

        Show
        Nitin Verma added a comment - Checked-in the changes to trunk.

          People

          • Assignee:
            Nitin Verma
            Reporter:
            Nitin Verma
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: