Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-819

Deadlock detection seem to not detect deadlock case between two nodes on the same cache.

    Details

    • Steps to Reproduce:
      Hide

      1/ Launch two times the program TwoNodesDeadlocks.java.
      2/ The program will wait that two nodes to be launched.
      3/ Each node will print that deadlock detection is activated.
      4/ Each node will try to perform hundred times get and put operations on the same key in a transaction.
      5/ deadlock occurs.

      Show
      1/ Launch two times the program TwoNodesDeadlocks.java. 2/ The program will wait that two nodes to be launched. 3/ Each node will print that deadlock detection is activated. 4/ Each node will try to perform hundred times get and put operations on the same key in a transaction. 5/ deadlock occurs.

      Description

      Hello,
      after activating deadlock detection with 500 ms of spin duration, i launch a classic deadlock scenario.
      Node 1 acquire local lock.
      Node 1 try to acquire cluster wide lock.
      Node 2 acquire local lock.
      Node 2 try to acquire cluster wide lock.
      Then deadlock is not detected and the TimeoutException occurs:
      org.infinispan.util.concurrent.TimeoutException: Unable to acquire lock after [20 seconds] on key [counter_key] for requestor [DldGlobalTrans
      action

      {coinToss=3136454835479173852, isMarkedForRollback=false, lockIntention=counter_key, affectedKeys=[counter_key], locksAtOrigin=[]}

      Glob
      alTransaction:<nodeDeadLock-11465>:5:local]! Lock held by [DldGlobalTransaction

      {coinToss=3164596253027655679, isMarkedForRollback=false, lock Intention=null, affectedKeys=[], locksAtOrigin=[]}

      GlobalTransaction:<nodeDeadLock-16603>:1:remote].

      I give my configuration file for ISPN and a Class TwoNodesDeadlocks.java to reproduce the problem.

        Gliffy Diagrams

          Attachments

          1. AgentManager_InfiniSpan_Config_Generic.xml
            3 kB
          2. TwoNodesDeadlocks.java
            3 kB
          3. log4j_Generic.properties
            0.3 kB
          4. nodeDeadLock-43429.log
            11 kB
          5. nodeDeadLock-45547.log
            7 kB
          6. ThreeNodesDeadlocks.java
            3 kB
          7. testSetup.zip
            3 kB

            Issue Links

              Activity

                People

                • Assignee:
                  mircea.markus Mircea Markus
                  Reporter:
                  thom28 Thomas Jean
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: