You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Swapnil Bawaskar (JIRA)" <ji...@apache.org> on 2018/04/09 22:37:22 UTC
[jira] [Closed] (GEODE-4094) ClientHealthMonitor may cause an NPE
in a ServerConnection
[ https://issues.apache.org/jira/browse/GEODE-4094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Swapnil Bawaskar closed GEODE-4094.
-----------------------------------
> 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
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.5.0
>
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> 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
(v7.6.3#76005)