Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 39184200D4A for ; Tue, 28 Nov 2017 13:03:04 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 379A6160C07; Tue, 28 Nov 2017 12:03:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7F4C4160C01 for ; Tue, 28 Nov 2017 13:03:03 +0100 (CET) Received: (qmail 66919 invoked by uid 500); 28 Nov 2017 12:03:02 -0000 Mailing-List: contact issues-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list issues@ignite.apache.org Received: (qmail 66910 invoked by uid 99); 28 Nov 2017 12:03:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Nov 2017 12:03:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id D1EBC1806DA for ; Tue, 28 Nov 2017 12:03:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id k9r3ef76WOCq for ; Tue, 28 Nov 2017 12:03:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id C929F5F1B3 for ; Tue, 28 Nov 2017 12:03:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 5DE17E0140 for ; Tue, 28 Nov 2017 12:03:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 15918241C0 for ; Tue, 28 Nov 2017 12:03:00 +0000 (UTC) Date: Tue, 28 Nov 2017 12:03:00 +0000 (UTC) From: "Andrey Kuznetsov (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (IGNITE-6186) Remove redundant parameter of GridFutureAdapter::unregisterWaiter() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 28 Nov 2017 12:03:04 -0000 [ https://issues.apache.org/jira/browse/IGNITE-6186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrey Kuznetsov updated IGNITE-6186: ------------------------------------- Description: The method is not thread-safe unless actual parameter is currentThread. Let future state is a list of listeners and two concurrent threads are removing two adjacent non-root listener nodes from list simultaneously by calling {{unregisterWaiter()}}. Then data race is possible: one of these listeners can survive its removal. If the listener is a thread waiting for completion in {{get0()}} then this race leads at worst case to 1 extra call to {{LockSupport.park()}}, and it's negligible. Otherwise we deal with an arbitrary listener, and its {{apply()}} will be called twice. was:The method is not thread-safe unless actual parameter is currentThread. > Remove redundant parameter of GridFutureAdapter::unregisterWaiter() > ------------------------------------------------------------------- > > Key: IGNITE-6186 > URL: https://issues.apache.org/jira/browse/IGNITE-6186 > Project: Ignite > Issue Type: Improvement > Affects Versions: 2.1 > Reporter: Andrey Kuznetsov > Assignee: Andrey Kuznetsov > Priority: Minor > > The method is not thread-safe unless actual parameter is currentThread. > Let future state is a list of listeners and two concurrent threads are removing two adjacent non-root listener nodes from list simultaneously by calling {{unregisterWaiter()}}. Then data race is possible: one of these listeners can survive its removal. If the listener is a thread waiting for completion in {{get0()}} then this race leads at worst case to 1 extra call to {{LockSupport.park()}}, and it's negligible. Otherwise we deal with an arbitrary listener, and its {{apply()}} will be called twice. -- This message was sent by Atlassian JIRA (v6.4.14#64029)