You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Alexei Scherbakov (JIRA)" <ji...@apache.org> on 2016/05/16 07:34:13 UTC

[jira] [Assigned] (IGNITE-2528) Deadlocks caused by Ignite.close()

     [ https://issues.apache.org/jira/browse/IGNITE-2528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Scherbakov reassigned IGNITE-2528:
-----------------------------------------

    Assignee: Alexei Scherbakov  (was: Denis Magda)

> 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: Alexei Scherbakov
>             Fix For: 1.7
>
>
> 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)