Denis Magda created IGNITE-2528:
-----------------------------------

             Summary: Deadlocks caused by Ignite.close()
                 Key: IGNITE-2528
                 URL: https://issues.apache.org/jira/browse/IGNITE-2528
             Project: Ignite
          Issue Type: Bug
          Components: general
    Affects Versions: 1.5.0.final
            Reporter: Denis Magda
            Assignee: Denis Magda
             Fix For: 1.6


If to start stopping an Ignite instance and execute {{cluster.nodes()}} from an 
{{EntryProcessor}} or some other place of the code that holds a lock on cache's 
gateway then this can lead to the deadlock:

Ignite.close:
- holds kernel.gateway lock;
- tries to get a gateway lock on cache A;

Entry.processor is called for cache A:
- a gateway lock is acquired for cache A;
- calling {{cluster.nodes()}};
- trying to acquire kernel's gateway lock.

To fix this deadlock we can do the following:
- introduce a volatile variable that has to be set to 'true' when a node is 
being stopped;
- check this variable before acquiring kernel's gateway.

Also probably it makes sense to try to use try lock here.



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

Reply via email to