[ 
https://issues.apache.org/jira/browse/IGNITE-11657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16812882#comment-16812882
 ] 

Alexander Sterligov edited comment on IGNITE-11657 at 4/10/19 11:01 AM:
------------------------------------------------------------------------

We're seeing same issue on 2.7.0 with putAllAsync. Cache is atomic, partitioned 
and backups = 0. The workaround is to use iterative put.


was (Author: sterligovak):
We're seeing same issue on 2.7.0 with putAllAsync. Cache is atomic, partitioned 
and backups = 0. The workaround is to move to iterative put.

> Stripe Threads Deadlock on Cache.putAll(Map<KV>)
> ------------------------------------------------
>
>                 Key: IGNITE-11657
>                 URL: https://issues.apache.org/jira/browse/IGNITE-11657
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>    Affects Versions: 2.5
>            Reporter: Gaurav Aggarwal
>            Priority: Major
>
> We have been seeing some consistent Deadlocks with Ignite Latest versions, as 
> putAll tries to lock all the keys before updating them. 
>  
> As per the documentation (below) putAll should be Equivalent to individual 
> iterative puts and these individual puts should behave atomically but not the 
> entire pull, But the error logs pasted further below seem to suggest otherwise
>  
> *putAll Documentation*
> h5. void javax.cache.Cache.putAll(Map<? extends K, ? extends V> map)
> Copies all of the entries from the specified map to the {{Cache}}.
> The effect of this call is equivalent to that of calling {{put(k, v)}} on 
> this cache once for each mapping from key {{k}} to value {{v}} in the 
> specified map.
> The order in which the individual puts occur is undefined.
> The behavior of this operation is undefined if entries in the cache 
> corresponding to entries in the map are modified or removed while this 
> operation is in progress. or if map is modified while the operation is in 
> progress.
> In Default Consistency mode, individual puts occur atomically but not the 
> entire putAll. Listeners may observe individual updates.
>  
>  
> *Error Log suggesting otherwise*
>  
> Deadlock: true
> Completed: 12808
> Thread [name="sys-stripe-3-#4%VPS%", id=27, state=WAITING, blockCnt=3, 
> waitCnt=121340]
>   Lock [object=java.util.concurrent.locks.ReentrantLock$NonfairSync@138205af, 
> ownerName=sys-stripe-26-#27%VPS%, ownerId=50]
>   at sun.misc.Unsafe.park(Native Method)
>   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.ReentrantLock$NonfairSync.lock(ReentrantLock.java:209)
>    at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:285)
>   at 
> o.a.i.i.processors.cache.GridCacheMapEntry.lockEntry(GridCacheMapEntry.java:4272)
>   at 
> o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.lockEntries(GridDhtAtomicCache.java:2848)
>   at 
> o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal0(GridDhtAtomicCache.java:1706)
>   at 
> o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal(GridDhtAtomicCache.java:1628)
>   at 
> o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.processNearAtomicUpdateRequest(GridDhtAtomicCache.java:3056)
>   at 
> o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.access$400(GridDhtAtomicCache.java:130)
>   at 
> o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$5.apply(GridDhtAtomicCache.java:266)
>   at 
> o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$5.apply(GridDhtAtomicCache.java:261)
>   at 
> o.a.i.i.processors.cache.GridCacheIoManager.processMessage(GridCacheIoManager.java:1054)
>   at 
> o.a.i.i.processors.cache.GridCacheIoManager.onMessage0(GridCacheIoManager.java:579)
>   at 
> o.a.i.i.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:378)
>   at 
> o.a.i.i.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:304)
>   at 
> o.a.i.i.processors.cache.GridCacheIoManager.access$100(GridCacheIoManager.java:99)
>   at 
> o.a.i.i.processors.cache.GridCacheIoManager$1.onMessage(GridCacheIoManager.java:293)
>   at 
> o.a.i.i.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1556)
>   at 
> o.a.i.i.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1184)
>   at 
> o.a.i.i.managers.communication.GridIoManager.access$4200(GridIoManager.java:125)
>   at 
> o.a.i.i.managers.communication.GridIoManager$9.run(GridIoManager.java:1091)
>   at o.a.i.i.util.StripedExecutor$Stripe.run(StripedExecutor.java:511)
>   at java.lang.Thread.run(Thread.java:748)
>  
> I have tried sorting my keys but the same doesn't helps
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to