You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/10/06 18:54:00 UTC

[jira] [Commented] (GEODE-8475) Resolve a potential dead lock in ParallelGatewaySenderQueue

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

ASF subversion and git services commented on GEODE-8475:
--------------------------------------------------------

Commit 9c22643a42de156cde149e74257047d0849db23e in geode's branch refs/heads/support/1.12 from Xiaojian Zhou
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=9c22643 ]

GEODE-8475: Resolve a potential dead lock in ParallelGatewaySenderQueue (#5492)

    Co-authored-by: Darrel Schneider <da...@vmware.com>

(cherry picked from commit b62e033af490d6f1e8f40621ff084b099f5b52e8)


> Resolve a potential dead lock in ParallelGatewaySenderQueue 
> ------------------------------------------------------------
>
>                 Key: GEODE-8475
>                 URL: https://issues.apache.org/jira/browse/GEODE-8475
>             Project: Geode
>          Issue Type: Improvement
>            Reporter: Xiaojian Zhou
>            Assignee: Xiaojian Zhou
>            Priority: Major
>              Labels: GeodeOperationAPI, pull-request-available
>             Fix For: 1.13.0, 1.14.0
>
>
> When brq is created but encountered a failed GII, enqueue to it could have a potential deadlock:
> Thread-1:
> ParallelGatewaySenderQueue.put() will get a brq.getInitializationLock().readLock().lock() (lock-A’s read lock). Then during the put operation, it will try to call lockWhenRegionIsInitializing() to get failedInitialImageLock.readLock().lock (lock-B’s read lock)
> Thread-2: 
> PRDS.createBucketRegion() will trigger GII but failed. So it will call cleanUpAfterFailedGII(), where it will call lockFailedInitialImageWriteLock
> () to get lock-B’s write lock first. Then call BucketRegionQueue.clearEntries().
> It will call getInitializationLock().writeLock().lock() (lock-A’s write lock).
> To fix it, we need to let thread-1 to get failedInitialImageLock.readLock() (lock-B) before requesting lock-A. 



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