Denis Magda created IGNITE-1221:
-----------------------------------

             Summary: Proper GridCacheContext cleanup
                 Key: IGNITE-1221
                 URL: https://issues.apache.org/jira/browse/IGNITE-1221
             Project: Ignite
          Issue Type: Bug
          Components: cache
            Reporter: Denis Magda
            Priority: Critical


Sometimes when a cache is stopped and its corresponding {{GridCacheContext}} is 
cleaned up there are some threads exist that keep executing cache related 
operations.

This may lead to deadlocks, hangs and other unpredictable results.

Initial discussion on the dev list:
http://mail-archives.apache.org/mod_mbox/incubator-ignite-dev/201508.mbox/browser
Look for discussion "Fixed deadlock in GridDhtAtomicCache (Alex G. your review 
is needed)"

As an example, the bug described and fixed as IGNITE-1189 was caused by already 
invalidated {{GridCacheContext}}.

Moreover, Andrey Gura reports that he observes hangs in cache's read operations 
probably caused by the same reason.

To reproduce try to do the following.

Temporary comment out the following catch block in 
{{GridDhtAtomicCache.updateAllAsyncInternal0}}:
{noformat}
        catch (Exception e) {
            // At least RuntimeException can be thrown by the code above when 
GridCacheContext is cleaned and there is
            // an attempt to use cleaned resources.
            U.error(log, "Unexpected exception during cache update", e);

            res.addFailedKeys(keys, e);

            completionCb.apply(req, res);

            return;
        }
{noformat}

Run {{IgniteCacheAtomicNodeRestartTest.testRestartWithPutTenNodesTwoBackups}} 
in a loop using TeamCity.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to