[
https://issues.apache.org/jira/browse/GEODE-920?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
xiaojian zhou reassigned GEODE-920:
-----------------------------------
Assignee: xiaojian zhou (was: Anilkumar Gingade)
> NullPointerException from InitialImageOperation.registerFilters during
> shutdown
> -------------------------------------------------------------------------------
>
> Key: GEODE-920
> URL: https://issues.apache.org/jira/browse/GEODE-920
> Project: Geode
> Issue Type: Bug
> Reporter: Dan Smith
> Assignee: xiaojian zhou
>
> We hit this in some internal testing. We see a NPE in the logs while the
> cache server is shutting down.
> With revision 7a77f805692f14b2f9760899be30bd831d8186ab
> {noformat}
> [info 2016/02/03 12:34:27.282 PST bridgegemfire1_w1-gst-dev23_31152
> <Handshaker 0.0.0.0/0.0.0.0:27538 Thread 2> tid=0x99]
> _gfe_non_durable_client_with_id_w1-gst-dev23(edgegemfire2_w1-gst-
> dev23_30022:30022:loner)<ec>:59927:f73bd5a8:edgegemfire2_w1-gst-dev23_30022_2_queue
> failed to get image from
> w1-gst-dev23(bridgegemfire2_w1-gst-dev23_28768:28768)<ec><v14>:1028
> ---Shutdown is in progress
> [info 2016/02/03 12:34:27.283 PST bridgegemfire1_w1-gst-dev23_31152
> <Distributed system shutdown hook> tid=0xf] Cache server on port 27,538 is
> shutting down.
> [info 2016/02/03 12:34:27.291 PST bridgegemfire1_w1-gst-dev23_31152 <Pooled
> High Priority Message Processor 6> tid=0x72] Unable to obtain the client
> proxy. Failed to register Filters during HARegion GII. Region
> :_gfe_non_durable_client_with_id_w1-gst-dev23(edgegemfire2_w1-gst-dev23_30022:30022:loner)<ec>:59927:f73bd5a8:edgegemfire2_w1-gst-dev23_30022_2_queue,
> null
> java.lang.NullPointerException
> at
> com.gemstone.gemfire.internal.cache.InitialImageOperation$FilterInfoMessage.registerFilters(InitialImageOperation.java:3737)
> at
> com.gemstone.gemfire.internal.cache.InitialImageOperation$FilterInfoProcessor.process(InitialImageOperation.java:2201)
> at
> com.gemstone.gemfire.distributed.internal.ReplyMessage.process(ReplyMessage.java:231)
> at
> com.gemstone.gemfire.distributed.internal.ReplyMessage.dmProcess(ReplyMessage.java:212)
> at
> com.gemstone.gemfire.distributed.internal.ReplyMessage.process(ReplyMessage.java:201)
> at
> com.gemstone.gemfire.distributed.internal.DistributionMessage.scheduleAction(DistributionMessage.java:380)
> at
> com.gemstone.gemfire.distributed.internal.DistributionMessage$1.run(DistributionMessage.java:451)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at
> com.gemstone.gemfire.distributed.internal.DistributionManager.runUntilShutdown(DistributionManager.java:656)
> at
> com.gemstone.gemfire.distributed.internal.DistributionManager$5$1.run(DistributionManager.java:967)
> at java.lang.Thread.run(Thread.java:745)
> {noformat}
> Looking at the code, it looks like it's coming from this line:
> {code}
> proxy = ((HAContainerWrapper)ccn.getHaContainer()).getProxy(
> region.getName());
> {code}
> It looks like the singleton CacheClientNotifier is actually set to null when
> the system shuts down, which is probably the cause of this NPE.
> getHAContainer should never return null, so it's not that.
> In CacheClientNotifier.shutdown:
> {code}
> if (noActiveServer() && ccnSingleton != null){
> ccnSingleton = null;
> {code}
> Singletons are bad, m'kay. CacheClientNotifier should be a field on cache
> rather than a static singleton, and should not get nulled out.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)