You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by sk0x50 <gi...@git.apache.org> on 2017/11/03 14:57:30 UTC

[GitHub] ignite pull request #2981: Ignite 6496: Client node does not reconnect to se...

GitHub user sk0x50 opened a pull request:

    https://github.com/apache/ignite/pull/2981

    Ignite 6496: Client node does not reconnect to server node when the latter is restarted.

    The following scenario may result in deadlock on the client node:
    
    - start server node and one client
    - client node invokes IgniteQueue#take() method, that requires acquiring both GridCacheGateway#readLock and GridCacheQueueAdapter#readSem.
    - client node disconnects from the cluster for some reason (for example, server node was stopped)
    in that case, GridCacheQueueAdapter does not release readSem and, therefore, GridCacheGateway#readLock is also not released.
    - 'tcp-client-disco-msg-worker' hangs due to unable acquiring GridCacheGateway.writeLock
    
    ```
    "tcp-client-disco-msg-worker-#10%datastructures.GridCacheQueueClientReconnect1%" #101 prio=5 os_prio=0 tid=0x0000000021634000 nid=0x49a8 waiting on condition [0x000000003a61e000]
    java.lang.Thread.State: WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    parking to wait for <0x000000076fa988f8> (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
    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.acquireQueued(AbstractQueuedSynchronizer.java:870)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
    at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(ReentrantReadWriteLock.java:943)
    at org.apache.ignite.internal.util.StripedCompositeReadWriteLock$WriteLock.lock0(StripedCompositeReadWriteLock.java:154)
    at org.apache.ignite.internal.util.StripedCompositeReadWriteLock$WriteLock.lock(StripedCompositeReadWriteLock.java:123)
    at org.apache.ignite.internal.processors.cache.GridCacheGateway.writeLock(GridCacheGateway.java:278)
    at org.apache.ignite.internal.IgniteKernal.onDisconnected(IgniteKernal.java:3873)
    at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$4.onDiscovery0(GridDiscoveryManager.java:768)
    at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$4.onDiscovery(GridDiscoveryManager.java:573)
    locked <0x000000076f9f4048> (a java.lang.Object)
    at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.notifyDiscovery(ClientImpl.java:2415)
    at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.notifyDiscovery(ClientImpl.java:2394)
    at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.body(ClientImpl.java:1710)
    at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sk0x50/ignite ignite-6496

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ignite/pull/2981.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2981
    
----
commit db7f1e497fe2d2502e910ab06e953e604768ed9d
Author: Slava Koptilin <sl...@gmail.com>
Date:   2017-10-31T15:29:09Z

    ignite-6496: release all IgniteQueue's semaphores in case of the client node disconnected

commit e3eb26efd64c62d1de53a09f74b3f77491d2dd3d
Author: Slava Koptilin <sl...@gmail.com>
Date:   2017-11-03T14:01:25Z

    ignite-6496: added test

----


---

[GitHub] ignite pull request #2981: Ignite 6496: Client node does not reconnect to se...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/ignite/pull/2981


---