geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Baker (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (GEODE-223) RedisDistDUnitTest.testConcCreateDestroy NullPointerException
Date Fri, 15 Jan 2016 06:14:46 GMT

     [ https://issues.apache.org/jira/browse/GEODE-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Anthony Baker closed GEODE-223.
-------------------------------

> RedisDistDUnitTest.testConcCreateDestroy NullPointerException
> -------------------------------------------------------------
>
>                 Key: GEODE-223
>                 URL: https://issues.apache.org/jira/browse/GEODE-223
>             Project: Geode
>          Issue Type: Bug
>          Components: extensions
>            Reporter: Darrel Schneider
>            Assignee: Vitaliy Gavrilov
>             Fix For: 1.0.0-incubating.M1
>
>
> com.gemstone.gemfire.redis.RedisDistDUnitTest.testConcCreateDestroy failed because of
this suspect string:
> Found suspect string in log4j at line 1132
> [error 2015/08/11 11:39:31.020 PDT <P2P message reader for cc3-rh6(17559)<v0>:13796
shared ordered uid=236 port=51035> tid=0x1506] Exception occurred in CacheListener
> java.lang.NullPointerException
> 	at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1124)
> 	at com.gemstone.gemfire.internal.redis.RegionProvider.createRemoteRegionLocally(RegionProvider.java:222)
> 	at com.gemstone.gemfire.redis.GemFireRedisServer.afterKeyCreate(GemFireRedisServer.java:532)
> 	at com.gemstone.gemfire.redis.GemFireRedisServer.access$400(GemFireRedisServer.java:128)
> 	at com.gemstone.gemfire.redis.GemFireRedisServer$MetaCacheListener.afterCreate(GemFireRedisServer.java:559)
> 	at com.gemstone.gemfire.internal.cache.EnumListenerEvent$AFTER_CREATE.dispatchEvent(EnumListenerEvent.java:97)
> 	at com.gemstone.gemfire.internal.cache.LocalRegion.dispatchEvent(LocalRegion.java:9251)
> 	at com.gemstone.gemfire.internal.cache.LocalRegion.dispatchListenerEvent(LocalRegion.java:7700)
> 	at com.gemstone.gemfire.internal.cache.LocalRegion.invokePutCallbacks(LocalRegion.java:6466)
> 	at com.gemstone.gemfire.internal.cache.EntryEventImpl.invokeCallbacks(EntryEventImpl.java:2623)
> 	at com.gemstone.gemfire.internal.cache.AbstractRegionEntry.dispatchListenerEvents(AbstractRegionEntry.java:157)
> 	at com.gemstone.gemfire.internal.cache.LocalRegion.basicPutPart2(LocalRegion.java:6316)
> 	at com.gemstone.gemfire.internal.cache.AbstractRegionMap.basicPut(AbstractRegionMap.java:3214)
> 	at com.gemstone.gemfire.internal.cache.LocalRegion.virtualPut(LocalRegion.java:6125)
> 	at com.gemstone.gemfire.internal.cache.DistributedRegion.virtualPut(DistributedRegion.java:394)
> 	at com.gemstone.gemfire.internal.cache.LocalRegionDataView.putEntry(LocalRegionDataView.java:118)
> 	at com.gemstone.gemfire.internal.cache.LocalRegion.basicUpdate(LocalRegion.java:6100)
> 	at com.gemstone.gemfire.internal.cache.AbstractUpdateOperation.doPutOrCreate(AbstractUpdateOperation.java:142)
> 	at com.gemstone.gemfire.internal.cache.AbstractUpdateOperation$AbstractUpdateMessage.basicOperateOnRegion(AbstractUpdateOperation.java:280)
> I think the bug is in this code from RegionProvider:
> {code}
>           r = cache.getRegion(key.toString());
>           if (type == RedisDataType.REDIS_LIST)
>             doInitializeList(key, r);
>           else if (type == RedisDataType.REDIS_SORTEDSET)
>             doInitializeSortedSet(key, r);
>           this.regions.put(key, r);
> {code}
> The NPE happens on the last line (the put call) because r is null.
> I think this code just needs to handle the race in which cache.getRegion returns null.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message