cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefania (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-10089) NullPointerException in Gossip handleStateNormal
Date Tue, 20 Oct 2015 02:00:32 GMT


Stefania commented on CASSANDRA-10089:

We managed to reproduce the issue of missing tokens in status normal again with [this failed
and log information at TRACE level for Gossiper. I've replaced the files attached to this
ticket with the log files for this latest test. The ERROR occurs in node 1 because it gets
status NORMAL but no tokens for node 2 from node 2, at around 09:31:16,086.

The problem is the high scale lib {{NonBlockingHashMap}} in {{EndpointState}}. Even if we
are careful to add the tokens before the status, sometimes the gossip thread gets status normal
but no tokens. I've reproduced this several times on my machine with [this unit test|].

I'm not so sure if it's OK to replace {{NonBlockingHashMap}} with {{ConcurrentHashMap}} since
this would have performance impacts. Alternatively we could see if there is a later version
of {{NonBlockingHashMap}} or a different implementation of a hash map that is thread safe
and that guarantees that if we see a value when iterating, then we see all values inserted
or modified before this value. cc [~brandon.williams] for his knowledge on Gossip and [~benedict]
for his knowledge on hash map implementations.

> NullPointerException in Gossip handleStateNormal
> ------------------------------------------------
>                 Key: CASSANDRA-10089
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Stefania
>            Assignee: Stefania
>             Fix For: 2.1.x, 2.2.x, 3.0.x
>         Attachments: node1_debug.log, node2_debug.log, node3_debug.log
> Whilst comparing dtests for CASSANDRA-9970 I found [this failing dtest|]
in 2.2:
> {code}
> Unexpected error in node1 node log: ['ERROR [GossipStage:1] 2015-08-14 15:39:57,873
- Exception in thread Thread[GossipStage:1,5,main] java.lang.NullPointerException: null \tat
~[main/:na] \tat org.apache.cassandra.service.StorageService.getTokensFor(
~[main/:na] \tat org.apache.cassandra.service.StorageService.handleStateNormal(
~[main/:na] \tat org.apache.cassandra.service.StorageService.onChange(
~[main/:na] \tat org.apache.cassandra.service.StorageService.onJoin(
~[main/:na] \tat org.apache.cassandra.gms.Gossiper.handleMajorStateChange(
~[main/:na] \tat org.apache.cassandra.gms.Gossiper.applyStateLocally( ~[main/:na]
\tat org.apache.cassandra.gms.GossipDigestAck2VerbHandler.doVerb(
~[main/:na] \tat
~[main/:na] \tat java.util.concurrent.ThreadPoolExecutor.runWorker(
~[na:1.7.0_80] \tat java.util.concurrent.ThreadPoolExecutor$
~[na:1.7.0_80] \tat ~[na:1.7.0_80]']
> {code}
> I wasn't able to find it on unpatched branches  but it is clearly not related to CASSANDRA-9970,
if anything it could have been a side effect of CASSANDRA-9871.

This message was sent by Atlassian JIRA

View raw message