geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (GEODE-920) NullPointerException from InitialImageOperation.registerFilters during shutdown
Date Mon, 04 Apr 2016 22:51:25 GMT


ASF subversion and git services commented on GEODE-920:

Commit 49e3f523d16389f5e84847c6dcfd6ab45427f8c2 in incubator-geode's branch refs/heads/develop
from zhouxh
[;h=49e3f52 ]

GEODE-920: lazily create HaContainer for cache server

The CacheClientNotifier instance might have been created by gateway receicver.
Then not to create the HaContainer until a cache server starts and amend
the CacheClientNotifier instance by initialize the HaContainer.

> NullPointerException from InitialImageOperation.registerFilters during shutdown
> -------------------------------------------------------------------------------
>                 Key: GEODE-920
>                 URL:
>             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
Thread 2> tid=0x99] _gfe_non_durable_client_with_id_w1-gst-dev23(edgegemfire2_w1-gst- 
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,
> java.lang.NullPointerException
>   at com.gemstone.gemfire.internal.cache.InitialImageOperation$FilterInfoMessage.registerFilters(
>   at com.gemstone.gemfire.internal.cache.InitialImageOperation$FilterInfoProcessor.process(
>   at com.gemstone.gemfire.distributed.internal.ReplyMessage.process(
>   at com.gemstone.gemfire.distributed.internal.ReplyMessage.dmProcess(
>   at com.gemstone.gemfire.distributed.internal.ReplyMessage.process(
>   at com.gemstone.gemfire.distributed.internal.DistributionMessage.scheduleAction(
>   at com.gemstone.gemfire.distributed.internal.DistributionMessage$
>   at java.util.concurrent.ThreadPoolExecutor.runWorker(
>   at java.util.concurrent.ThreadPoolExecutor$
>   at com.gemstone.gemfire.distributed.internal.DistributionManager.runUntilShutdown(
>   at com.gemstone.gemfire.distributed.internal.DistributionManager$5$
>   at
> {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

View raw message