From dev-return-32766-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Mon Apr 2 10:48:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 270FB180627 for ; Mon, 2 Apr 2018 10:48:04 +0200 (CEST) Received: (qmail 68769 invoked by uid 500); 2 Apr 2018 08:48:03 -0000 Mailing-List: contact dev-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 dev@ignite.apache.org Received: (qmail 68758 invoked by uid 99); 2 Apr 2018 08:48:03 -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; Mon, 02 Apr 2018 08:48:03 +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 486AA180155 for ; Mon, 2 Apr 2018 08:48:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.311 X-Spam-Level: X-Spam-Status: No, score=-110.311 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, 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 cDtigVuuk4gY for ; Mon, 2 Apr 2018 08:48: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 D102C5F1B4 for ; Mon, 2 Apr 2018 08:48: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 5A99BE0016 for ; Mon, 2 Apr 2018 08:48: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 1D12E25605 for ; Mon, 2 Apr 2018 08:48:00 +0000 (UTC) Date: Mon, 2 Apr 2018 08:48:00 +0000 (UTC) From: "Andrey Aleksandrov (JIRA)" To: dev@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (IGNITE-8098) Getting affinity for topology version earlier than affinity is calculated because of data race MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Andrey Aleksandrov created IGNITE-8098: ------------------------------------------ Summary: Getting affinity for topology version earlier than af= finity is calculated because of data race Key: IGNITE-8098 URL: https://issues.apache.org/jira/browse/IGNITE-8098 Project: Ignite Issue Type: Bug Affects Versions: 2.3 Reporter: Andrey Aleksandrov From time to time the Ignite cluster with services throws next exception du= ring restarting of=C2=A0 some nodes: java.lang.IllegalStateException: Getting affinity for topology version earl= ier than affinity is calculated [locNode=3DTcpDiscoveryNode [id=3Dc770dbcf-= 2908-442d-8aa0-bf26a2aecfef, addrs=3D[10.44.162.169, 127.0.0.1], sockAddrs= =3D[clrv0000041279.ic.ing.net/10.44.162.169:56500, /127.0.0.1:56500], discP= ort=3D56500, order=3D11, intOrder=3D8, lastExchangeTime=3D1520931375337, lo= c=3Dtrue, ver=3D2.3.3#20180213-sha1:f446df34, isClient=3Dfalse], grp=3Digni= te-sys-cache, topVer=3DAffinityTopologyVersion [topVer=3D13, minorTopVer=3D= 0], head=3DAffinityTopologyVersion [topVer=3D15, minorTopVer=3D0], history= =3D[AffinityTopologyVersion [topVer=3D11, minorTopVer=3D0], AffinityTopolog= yVersion [topVer=3D11, minorTopVer=3D1], AffinityTopologyVersion [topVer=3D= 12, minorTopVer=3D0], AffinityTopologyVersion [topVer=3D15, minorTopVer=3D0= ]]] Looks like the reason of this issue is the data race in=C2=A0GridServicePro= cessor class. How to reproduce: 1)To simulate data race you should update next place in source code: Class: GridServiceProcessor Method: @Override public void onEvent(final DiscoveryEvent evt, final Disco= Cache discoCache) { Place: .... try { svcName.set(dep.configuration().getName()); ctx.cache().internalCache(UTILITY_CACHE_NAME).context().affinity(). affinityReadyFuture(topVer).get(); //HERE (between GET and REASSIGN) you should=C2=A0add=C2=A0Thread.sleep(100= ) for example. //try { //Thread.sleep(100); //} //catch (InterruptedException e1) { //e1.printStackTrace(); //} =20 reassign(dep, topVer); } catch (IgniteCheckedException ex) { if (!(e instanceof ClusterTopologyCheckedException)) LT.error(log, ex, "Failed to do service reassignment (will retry): " + dep.configuration().getName()); retries.add(dep); } ... 2)After that you should imitate start/shutdown iterations. For reproducing = I used GridServiceProcessorBatchDeploySelfTest (but timeout on future.get s= hould be increased to avoid timeout error) -- This message was sent by Atlassian JIRA (v7.6.3#76005)