[ https://issues.apache.org/jira/browse/GEODE-7727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17055608#comment-17055608 ]
ASF subversion and git services commented on GEODE-7727: -------------------------------------------------------- Commit c8413592e5573f675c538c63ef9ee9f97a349e73 in geode's branch refs/heads/develop from Mario Ivanac [ https://gitbox.apache.org/repos/asf?p=geode.git;h=c841359 ] GEODE-7727: modify sender thread to detect relese of connection (#4751) * GEODE-7727: modify sender thread to detect relese of connection * GEODE-7727: Update solution only for shared connections * GEODE-7727: added test * GEODE-7727: update ater comments * GEODE-7727: update test * GEODE-7727: fix for async write hanging * GEODE-7727: Test of region operations in the face of closed connections Adding a test for what happens to region operations when a connection is closed out from under the system. This test hangs without the changes to let the reader thread keep running. Fix to test * GEODE-7727: Preventing a double release of the input buffer The releaseInputBuffer method was not thread safe. If it is called concurrently, it will end up being released twice, which will add the buffer to to the buffer pool twice. Later, this could result in two threads using the same buffer, resulting in corruption of the buffer. With the changes for GEODE-7727, we made it likely that releaseInputBuffer would be called concurrently. If a member departs, one thread will call Connection.close. Connection.close will close the socket and call releaseInputBuffer. However, closing the socket will wake up the reader thread, which will also call releaseInputBuffer concurrently. Making releaseInputBuffer thread safe by introducing a lock. * GEODE-7727: update after merge * GEODE-7727: update test name Co-authored-by: Dan Smith <upthewatersp...@apache.org> > Geode P2P connection hanging > ---------------------------- > > Key: GEODE-7727 > URL: https://issues.apache.org/jira/browse/GEODE-7727 > Project: Geode > Issue Type: Bug > Reporter: Mario Ivanac > Assignee: Mario Ivanac > Priority: Major > Labels: needs-review, pull-request-available > Time Spent: 3.5h > Remaining Estimate: 0h > > {color:#172b4d}Geode P2P handshake reader stops listening to it's socket once > the handshake between 2 peers is established. This seems to be a design > choice. > {color} > {color:#172b4d}The problem is when the connection gets killed (TCP FIN). > Since nothing is listening on the socket, nothing will get that FIN package > and close the connection. The connection is left hanging (CLOSE-WAIT state). > The peers are then unable to establish proper P2P communication later.{color} -- This message was sent by Atlassian Jira (v8.3.4#803005)