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

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

Commit 0daf9549a69a135ad1ab267be8e0749e00986dfa in geode's branch 
refs/heads/develop from [~nnag]
[ https://git-wip-us.apache.org/repos/asf?p=geode.git;h=0daf954 ]

GEODE-3276: Managing race conditions while the senders are stopped

        * When a connection is initialized, a readAckThread may be alive from a 
previous incarnation.
        * This AckThread will be stuck on a read socket with no timeout as 
nothing was dispatched.
        * Also while it was stuck on the read, it will hold a connection 
lifecycle read lock
        * The initialize connection needs a connection life cycle write lock to 
start the connection but the read lock is held by the ack thread.
        * This results in a deadlock and eventually a hang.
        * Another situation is that we set the flag isStopped for the event 
processor before actually shutting down the diapatcher and ack thread.
        * So after the flag is set and before actually shutting down the 
dispatcher and ackThread, a gateway proxy stomper thread gets in between these 
two steps of execution.
        * The stomper thread checks the isStopped flag, which was set to true, 
and proceeds to destroy the connection pool. However the dispatcher and 
ackThread were still running.
        * This results in a out of heap memory exception while the ack thread 
is reading from the socket while connection pool was destroyed.
        * To solve this issue, the stomper thread checks if the event processor 
and dispatcher exists, if true then we close the input streams before 
destroying the connection pool.

        This closes #732


> CI failure: 
> org.apache.geode.internal.cache.wan.parallel.ParallelWANStatsDUnitTest > 
> testParallelPropagationWithRemoteRegionDestroy FAILED
> ------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GEODE-3276
>                 URL: https://issues.apache.org/jira/browse/GEODE-3276
>             Project: Geode
>          Issue Type: Bug
>          Components: statistics, wan
>    Affects Versions: 1.2.0
>            Reporter: Shelley Lynn Hughes-Godfrey
>            Assignee: nabarun
>
> {noformat}
> org.apache.geode.internal.cache.wan.parallel.ParallelWANStatsDUnitTest > 
> testParallelPropagationWithRemoteRegionDestroy FAILED
>     java.lang.AssertionError: An exception occurred during asynchronous 
> invocation.
>         Caused by:
>         java.lang.OutOfMemoryError: Java heap space
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to