带死锁的条带池中可能出现饥饿 - Apache Ignite
Possible starvation in striped pool with deadlock true - Apache Ignite
我有一个关于 Apache Ignite 的问题。我的测试是使用 Ignite 服务器(用 java 编写,使用连续查询接收更改变量的通知)和 Ignite 客户端(用 .Net 编写,使用 putAll 方法发送 1000 的通知每 50 毫秒变化一次的变量)。
每个 putAll 同时发送大约 350 个变量。
我收到的错误是:
2017-07-11 09:56:33,491 [WARN ] [grid-timeout-worker-#19%null%] G -
Possible starvation in striped pool.
Thread name: sys-stripe-9-#10%null%
Queue: [Message closure [msg=GridIoMessage [plc=2, topic=TOPIC_CACHE, topicOrd=8, ordered=false, timeout=0,
skipOnTimeout=false, msg=GridNearAtomicFullUpdateRequest
[keys=[KeyCacheObjectImpl [part=117, val=null, hasValBytes=true],
KeyCacheObjectImpl [part=670, val=null, hasValBytes=true]],
conflictTtls=null, conflictExpireTimes=null, expiryPlc=null,
initSize=0, filter=null, parent=GridNearAtomicAbstractUpdateRequest
[res=null, flags=keepBinary]]]]]
Deadlock: true
Completed: 4941 Thread [name="sys-stripe-9-#10%null%", id=22, state=BLOCKED, blockCnt=6, waitCnt=4889]
Lock [object=o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCacheEntry@541d822b,
ownerName=sys-stripe-5-#6%null%, ownerId=18]
at sun.misc.Unsafe.monitorEnter(Native Method)
at o.a.i.i.util.GridUnsafe.monitorEnter(GridUnsafe.java:1193)
at o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.lockEntries(GridDhtAtomicCache.java:2815)
at o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal0(GridDhtAtomicCache.java:1741)
at o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal(GridDhtAtomicCache.java:1630)
at o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.processNearAtomicUpdateRequest(GridDhtAtomicCache.java:3016)
at o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.access0(GridDhtAtomicCache.java:127)
at o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.apply(GridDhtAtomicCache.java:282)
at o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.apply(GridDhtAtomicCache.java:277)
at o.a.i.i.processors.cache.GridCacheIoManager.processMessage(GridCacheIoManager.java:863)
at o.a.i.i.processors.cache.GridCacheIoManager.onMessage0(GridCacheIoManager.java:386)
at o.a.i.i.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:308)
at o.a.i.i.processors.cache.GridCacheIoManager.access[=10=]0(GridCacheIoManager.java:100)
at o.a.i.i.processors.cache.GridCacheIoManager.onMessage(GridCacheIoManager.java:253)
at o.a.i.i.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1257)
at o.a.i.i.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:885)
at o.a.i.i.managers.communication.GridIoManager.access00(GridIoManager.java:114)
at o.a.i.i.managers.communication.GridIoManager.run(GridIoManager.java:802)
at o.a.i.i.util.StripedExecutor$Stripe.run(StripedExecutor.java:483)
at java.lang.Thread.run(Thread.java:748)
在将集合应用到 putAll 之前对其进行排序,以不同顺序对相同条目进行批处理操作可能会导致死锁。
当我们尝试将 JsonObject 放入缓存时出现同样的问题。因此,我们使用了 putAsync 而不是 put 操作,它工作正常
我有一个关于 Apache Ignite 的问题。我的测试是使用 Ignite 服务器(用 java 编写,使用连续查询接收更改变量的通知)和 Ignite 客户端(用 .Net 编写,使用 putAll 方法发送 1000 的通知每 50 毫秒变化一次的变量)。 每个 putAll 同时发送大约 350 个变量。 我收到的错误是:
2017-07-11 09:56:33,491 [WARN ] [grid-timeout-worker-#19%null%] G - Possible starvation in striped pool. Thread name: sys-stripe-9-#10%null% Queue: [Message closure [msg=GridIoMessage [plc=2, topic=TOPIC_CACHE, topicOrd=8, ordered=false, timeout=0, skipOnTimeout=false, msg=GridNearAtomicFullUpdateRequest [keys=[KeyCacheObjectImpl [part=117, val=null, hasValBytes=true], KeyCacheObjectImpl [part=670, val=null, hasValBytes=true]], conflictTtls=null, conflictExpireTimes=null, expiryPlc=null, initSize=0, filter=null, parent=GridNearAtomicAbstractUpdateRequest [res=null, flags=keepBinary]]]]] Deadlock: true Completed: 4941 Thread [name="sys-stripe-9-#10%null%", id=22, state=BLOCKED, blockCnt=6, waitCnt=4889] Lock [object=o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCacheEntry@541d822b, ownerName=sys-stripe-5-#6%null%, ownerId=18] at sun.misc.Unsafe.monitorEnter(Native Method) at o.a.i.i.util.GridUnsafe.monitorEnter(GridUnsafe.java:1193) at o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.lockEntries(GridDhtAtomicCache.java:2815) at o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal0(GridDhtAtomicCache.java:1741) at o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal(GridDhtAtomicCache.java:1630) at o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.processNearAtomicUpdateRequest(GridDhtAtomicCache.java:3016) at o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.access0(GridDhtAtomicCache.java:127) at o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.apply(GridDhtAtomicCache.java:282) at o.a.i.i.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.apply(GridDhtAtomicCache.java:277) at o.a.i.i.processors.cache.GridCacheIoManager.processMessage(GridCacheIoManager.java:863) at o.a.i.i.processors.cache.GridCacheIoManager.onMessage0(GridCacheIoManager.java:386) at o.a.i.i.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:308) at o.a.i.i.processors.cache.GridCacheIoManager.access[=10=]0(GridCacheIoManager.java:100) at o.a.i.i.processors.cache.GridCacheIoManager.onMessage(GridCacheIoManager.java:253) at o.a.i.i.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1257) at o.a.i.i.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:885) at o.a.i.i.managers.communication.GridIoManager.access00(GridIoManager.java:114) at o.a.i.i.managers.communication.GridIoManager.run(GridIoManager.java:802) at o.a.i.i.util.StripedExecutor$Stripe.run(StripedExecutor.java:483) at java.lang.Thread.run(Thread.java:748)
在将集合应用到 putAll 之前对其进行排序,以不同顺序对相同条目进行批处理操作可能会导致死锁。
当我们尝试将 JsonObject 放入缓存时出现同样的问题。因此,我们使用了 putAsync 而不是 put 操作,它工作正常