You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Atri Sharma (Jira)" <ji...@apache.org> on 2021/03/15 08:35:00 UTC

[jira] [Commented] (IGNITE-8375) NPE due to race on cache stop and timeout handler execution.

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

Atri Sharma commented on IGNITE-8375:
-------------------------------------

I debugged this and do not see this reproducing since GridCacheContext ensures that it checks the local copy of config before accessing it. However, GridDhtLockFuture#onComplete should be aware if the cache context is being cleaned up and hence not invoke loadMissingFromStore. I have created a Jira for the same:

https://issues.apache.org/jira/browse/IGNITE-14314

> NPE due to race on cache stop and timeout handler execution.
> ------------------------------------------------------------
>
>                 Key: IGNITE-8375
>                 URL: https://issues.apache.org/jira/browse/IGNITE-8375
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 2.4
>            Reporter: Alexey Scherbakov
>            Priority: Major
>
> {noformat}
> 2018-04-22 22:03:08.547 [INFO ][Thread-25420][o.a.i.i.p.cache.GridCacheProcessor] Stopped cache [cacheName=com.sbt.cdm.api.model.published.dictionary.PublishedSystem, group=CACHEGROUP_DICTIONARY]
> 2018-04-22 22:03:08.548 [ERROR][grid-timeout-worker-#119%DPL_GRID%DplGridNodeName%][o.a.i.i.p.t.GridTimeoutProcessor] Error when executing timeout callback: LockTimeoutObject []
> java.lang.NullPointerException: null
>         at org.apache.ignite.internal.processors.cache.GridCacheContext.loadPreviousValue(GridCacheContext.java:1450)
>         at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLockFuture.loadMissingFromStore(GridDhtLockFuture.java:1030)
>         at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLockFuture.onComplete(GridDhtLockFuture.java:731)
>         at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLockFuture.access$900(GridDhtLockFuture.java:82)
>         at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLockFuture$LockTimeoutObject.onTimeout(GridDhtLockFuture.java:1133)
>         at org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor$TimeoutWorker.body(GridTimeoutProcessor.java:163)
>         at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>         at java.lang.Thread.run(Thread.java:745)
> {noformat}
> NPE caused by execution of method [1] during timeout handler execution [2]:
> cacheCfg.isLoadPreviousValue() throws NPE because cacheCfg can be nulled by [3] on stop.
> [1] org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLockFuture#loadMissingFromStore
> [2] org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLockFuture.LockTimeoutObject#onTimeout
> [3] org.apache.ignite.internal.processors.cache.GridCacheContext#cleanup



--
This message was sent by Atlassian Jira
(v8.3.4#803005)