Bruce Schuchardt created GEODE-4094:
---------------------------------------

             Summary: ClientHealthMonitor may cause an NPE in a ServerConnection
                 Key: GEODE-4094
                 URL: https://issues.apache.org/jira/browse/GEODE-4094
             Project: Geode
          Issue Type: Bug
          Components: client/server
            Reporter: Bruce Schuchardt


When ClientHealthMonitor is shutting down a connection it invokes 
ServerConnection.handleTermination().  This method eventually sets the 
connection's clientUserAuths instance variable to null but there are places in 
ServerConnection that use this variable without a null check.  I was able to 
write a unit test to cause ServerConnection.doNormalMsg() to throw an NPE 100% 
of the time by adding appropriate stall points with an observer class and the 
dunit blackboard.

* send a put from client
* wait for CHM's thread to time out the connection and block it using 
getBlackboard().waitForGate(*)
* send a second put from client and block just before accessing clientUserAuths
* allow CHM's thread to progress past the point of nulling out the variable
* allow the client's ServerConnection thread to continue - NPE results




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

Reply via email to