[ https://issues.apache.org/jira/browse/GEODE-7727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17227501#comment-17227501 ]
ASF subversion and git services commented on GEODE-7727: -------------------------------------------------------- Commit 3a89ae5448df7b534c82fa594b195057a974d85c in geode's branch refs/heads/support/1.12 from Bruce Schuchardt [ https://gitbox.apache.org/repos/asf?p=geode.git;h=3a89ae5 ] GEODE-6008: CI Failure: ClientServerHostNameVerificationDistributedTe… (#4839) * GEODE-6008: CI Failure: ClientServerHostNameVerificationDistributedTest.expectConnectionFailureWhenNoHostNameInServerKey failed The "Message distribution has terminated" failure is caused by an unreported NullPointerException in a residual reader thread introduced in the fix for GEODE-7727. That fix caused a thread to say alive in a peer-to-peer tcp/ip Connection in order to clean up the receiving side of a socket. The Connection shutdown method close() method, however, releases the Connection's input buffer and nulls out the field. The reader thread then threw an NPE that was caught and caused the "Message distribution has terminated" message, which is picked up as a suspect string by the testing infrastructure. This problem is also seen in GEODE-7894, GEODE-7871, GEODE-7873 and GEODE-7806. The fix is to record the fact that a residual reader thread exists and avoid releasing the Connection's input buffer when the connection is closed. This lets the reader thread do the cleanup. While testing the fix I found that the NioSslEngine was throwing an IllegalStateException when the reader thread tried to use it in this same situation. This exception wasn't being caught and caused more suspect strings to be logged. I've changed this to a checked exception that is already handled by the reader thread. ClientServerHostNameVerificationDistributedTest also wasn't working on my Mac due to its /etc/hosts configuration. I changed the test to allow the IP address selected by LocalHostUtil to be a valid client/server address for the SSL certificates it generates. * fixed failing test due to change in exceptions in NioSslEngine (cherry picked from commit 1dfc496da34916297258b881c5606944d26bfb8b) > 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 > Fix For: 1.13.0 > > 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)