Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-3950

Deadlock when exchange starts with pending explicit lock

    XMLWordPrintableJSON

    Details

      Description

      Reproduced by IgniteCacheMultiTxLockSelfTest#testExplicitLockManyKeysWithClient (hangs with ~10% probability).

      Exchange worker waits for lock to be released:

      Thread [name="exchange-worker-#155%dht.IgniteCacheMultiTxLockSelfTest3%", id=195, state=TIMED_WAITING, blockCnt=0, waitCnt=44]
          Lock [object=o.a.i.i.processors.cache.GridCacheMvccManager$FinishLockFuture@2638011, ownerName=null, ownerId=-1]
              at sun.misc.Unsafe.park(Native Method)
              at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
              at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1037)
              at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1328)
              at o.a.i.i.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:187)
              at o.a.i.i.util.future.GridFutureAdapter.get(GridFutureAdapter.java:137)
              at o.a.i.i.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.waitPartitionRelease(GridDhtPartitionsExchangeFuture.java:835)
              at o.a.i.i.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.distributedExchange(GridDhtPartitionsExchangeFuture.java:763)
              at o.a.i.i.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:516)
              at o.a.i.i.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1464)
              at o.a.i.i.util.worker.GridWorker.run(GridWorker.java:110)
              at java.lang.Thread.run(Thread.java:745)
      

      while thread that holds lock cannot finish cache operation:

      "Thread-9@3645" prio=5 tid=0x11a nid=NA waiting
        java.lang.Thread.State: WAITING
      	  at sun.misc.Unsafe.park(Unsafe.java:-1)
      	  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
      	  at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
      	  at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireShared(AbstractQueuedSynchronizer.java:967)
      	  at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShared(AbstractQueuedSynchronizer.java:1283)
      	  at org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:157)
      	  at org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:117)
      	  at org.apache.ignite.internal.processors.cache.GridCacheAdapter$45.inOp(GridCacheAdapter.java:2849)
      	  at org.apache.ignite.internal.processors.cache.GridCacheAdapter$SyncInOp.op(GridCacheAdapter.java:5303)
      	  at org.apache.ignite.internal.processors.cache.GridCacheAdapter.syncOp(GridCacheAdapter.java:4351)
      	  at org.apache.ignite.internal.processors.cache.GridCacheAdapter.putAll(GridCacheAdapter.java:2847)
      	  at org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.putAll(GridCacheProxyImpl.java:838)
      	  at org.apache.ignite.internal.processors.cache.distributed.dht.IgniteCacheMultiTxLockSelfTest$1.run(IgniteCacheMultiTxLockSelfTest.java:218)
      

        Attachments

        1. threadDumps.IgniteCacheTestSuite4.txt
          339 kB
          Vitaliy Biryukov

          Issue Links

            Activity

              People

              • Assignee:
                VitaliyB Vitaliy Biryukov
                Reporter:
                ilantukh Ilya Lantukh
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: