You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Maxim Muzafarov (Jira)" <ji...@apache.org> on 2021/01/21 18:50:01 UTC

[jira] [Commented] (IGNITE-13906) Possible deadlock between methods from GridEncryptionManager

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

Maxim Muzafarov commented on IGNITE-13906:
------------------------------------------

Cherry-picked to 2.10

> Possible deadlock between methods from GridEncryptionManager
> ------------------------------------------------------------
>
>                 Key: IGNITE-13906
>                 URL: https://issues.apache.org/jira/browse/IGNITE-13906
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 2.9
>            Reporter: Mirza Aliev
>            Assignee: Mirza Aliev
>            Priority: Major
>             Fix For: 2.10
>
>
> It seems that {{GridEncryptionManager}} uses {{metaStorageMux}} and {{checkpointReadLock}} in an inconsistent way.
> Sometimes, the implementation acquires the mutex fist and then {{checkpointReadLock}}, sometimes vice versa, which may lead to a deadlock.
> Let's consider the following scenario:
> Thread-1: {{removeGroupKey}} acquired {{metaStorageMux}} and trying to get {{checkpointReadLock}} (cannot proceed further because of checkpointer)
> Therad-2: {{doChangeMasterKey}} acquired {{checkpointReadLock}} and trying to get {{metaStorageMux}} (cannot proceed further due to thread-1)
> Checkpointer-thread: trying to acquire the write lock (cannot get the lock due to thread-2)
>  
> Possible solutuion: acquire {{metaStorageMux}} before {{checkpointReadLock}} in {{doChangeMasterKey}} method
>  
>  



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