Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C7E3C188A4 for ; Thu, 4 Feb 2016 18:41:20 +0000 (UTC) Received: (qmail 24590 invoked by uid 500); 4 Feb 2016 18:34:40 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 24554 invoked by uid 500); 4 Feb 2016 18:34:40 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 24494 invoked by uid 99); 4 Feb 2016 18:34:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Feb 2016 18:34:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 235372C1F58 for ; Thu, 4 Feb 2016 18:34:40 +0000 (UTC) Date: Thu, 4 Feb 2016 18:34:40 +0000 (UTC) From: "Ariel Weisberg (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-11116) Gossiper#isEnabled is not thread safe MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-11116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15132734#comment-15132734 ] Ariel Weisberg commented on CASSANDRA-11116: -------------------------------------------- [~sbtourist] The timestamp on the "gossip started" message is after the timestamp on the "Ignoring GossipDigestSynMessage because gossip is disabled" message. While the absence of a volatile or final in this case could cause a missing happens before relationship I don't think it can stop publishing of the field value entirely. > Gossiper#isEnabled is not thread safe > ------------------------------------- > > Key: CASSANDRA-11116 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11116 > Project: Cassandra > Issue Type: Bug > Reporter: Sergio Bossa > Priority: Critical > > {{Gossiper#isEnabled()}} relies on the presence of {{scheduledGossipTask}}, which is not final nor volatile. As a consequence, when such method is called on a different thread, i.e. the gossip stage thread, it is sometimes detected as not enabled, causing particularly obscure failures. > This is shown by the following logs. First the gossiper is started: > {noformat} > 1 TRACE [Thread-29] 2016-02-03 19:21:31,232 Gossiper.java (line 1310) gossip started with generation 1454527291 > {noformat} > Then the same node misses a gossip message because the gossiper is seen as disabled: > {noformat} > 1 TRACE [GossipStage:1] 2016-02-03 19:21:32,016 GossipDigestSynVerbHandler.java (line 44) Ignoring GossipDigestSynMessage because gossip is disabled > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)