You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by "naresh.goty" <gn...@gmail.com> on 2017/10/29 01:09:51 UTC

Threads waiting

Hi,

We are seeing threads blocked when reading (only reads not writes) for data
from cache using Ignite.affinitiyCall().

Scenario: 
1) Two nodes are started in a cluster. Perform cache reads using
Ignite.affinityCall() and it works.
2) One node is stopped, and perform cache read again using
Ignite.affinityCall() and it is blocked.

 java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:304)
	at
org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:176)
	at
org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:139)
	at
org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.awaitTopologyVersion(GridAffinityAssignmentCache.java:557)
	at
org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.cachedAffinity(GridAffinityAssignmentCache.java:468)
	at
org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.assignment(GridCacheAffinityManager.java:238)
	at
org.apache.ignite.internal.processors.affinity.GridAffinityProcessor.affinityCache(GridAffinityProcessor.java:375)
	at
org.apache.ignite.internal.processors.affinity.GridAffinityProcessor.affinityKey(GridAffinityProcessor.java:306)
	at
org.apache.ignite.internal.IgniteComputeImpl.affinityCallAsync0(IgniteComputeImpl.java:333)
	at
org.apache.ignite.internal.IgniteComputeImpl.affinityCall(IgniteComputeImpl.java:301)


Thanks,
Naresh



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Threads waiting on cache reads

Posted by rajivgandhi <ra...@gmail.com>.
Thanks Alexey. Yes that was it. I wish the documentation had these details.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Threads waiting on cache reads

Posted by Alexey Popov <ta...@gmail.com>.
Hi Naresh,

It looks like Ignite was blocked by a custom listener from
"com.service.IgniteCacheManager" which is trying to do something with Ignite
during EVT_CACHE_REBALANCE_STARTED/EVT_NODE_LEFT or other events.

Please carefully check your code for events().localListen(...) and
events().remoteListen(...) calls. You should move your logic that interacts
with Ignite from these listeners into another user-specific thread to avoid
such deadlocks.

Thank you,
Alexey



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Threads waiting

Posted by Andrey Mashenkov <an...@gmail.com>.
Hi,

Your thread is waiting for partition exchange that possibly hangs due to
some reason.

Is it possible, to share logs and thread dumps at a time when you observed
hanging?

On Sun, Oct 29, 2017 at 4:09 AM, naresh.goty <gn...@gmail.com> wrote:

> Hi,
>
> We are seeing threads blocked when reading (only reads not writes) for data
> from cache using Ignite.affinitiyCall().
>
> Scenario:
> 1) Two nodes are started in a cluster. Perform cache reads using
> Ignite.affinityCall() and it works.
> 2) One node is stopped, and perform cache read again using
> Ignite.affinityCall() and it is blocked.
>
>  java.lang.Thread.State: WAITING (parking)
>         at sun.misc.Unsafe.park(Native Method)
>         at java.util.concurrent.locks.LockSupport.park(LockSupport.
> java:304)
>         at
> org.apache.ignite.internal.util.future.GridFutureAdapter.
> get0(GridFutureAdapter.java:176)
>         at
> org.apache.ignite.internal.util.future.GridFutureAdapter.
> get(GridFutureAdapter.java:139)
>         at
> org.apache.ignite.internal.processors.affinity.
> GridAffinityAssignmentCache.awaitTopologyVersion(
> GridAffinityAssignmentCache.java:557)
>         at
> org.apache.ignite.internal.processors.affinity.
> GridAffinityAssignmentCache.cachedAffinity(GridAffinityAssignmentCache.
> java:468)
>         at
> org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.
> assignment(GridCacheAffinityManager.java:238)
>         at
> org.apache.ignite.internal.processors.affinity.GridAffinityProcessor.
> affinityCache(GridAffinityProcessor.java:375)
>         at
> org.apache.ignite.internal.processors.affinity.GridAffinityProcessor.
> affinityKey(GridAffinityProcessor.java:306)
>         at
> org.apache.ignite.internal.IgniteComputeImpl.affinityCallAsync0(
> IgniteComputeImpl.java:333)
>         at
> org.apache.ignite.internal.IgniteComputeImpl.affinityCall(
> IgniteComputeImpl.java:301)
>
>
> Thanks,
> Naresh
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>



-- 
Best regards,
Andrey V. Mashenkov

Re: Threads waiting on cache reads

Posted by Humphrey <hm...@gmail.com>.
Could you put the cache configuration and the sample code?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/