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

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

Commit a706dfd42757e2994621ec9fa5bd189c5e4d759e in geode's branch 
refs/heads/feature/GEODE-8475 from zhouxh
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=a706dfd ]

GEODE-8475: Resolve a potential dead lock in ParallelGatewaySenderQueue

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


> 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
>
> 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)

Reply via email to