You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Denis Magda (JIRA)" <ji...@apache.org> on 2016/02/02 08:30:39 UTC
[jira] [Created] (IGNITE-2528) Deadlocks caused by Ignite.close()
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)