Return-Path: X-Original-To: apmail-river-commits-archive@www.apache.org Delivered-To: apmail-river-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 8FB4E10E90 for ; Fri, 4 Dec 2015 12:14:11 +0000 (UTC) Received: (qmail 75761 invoked by uid 500); 4 Dec 2015 12:14:11 -0000 Delivered-To: apmail-river-commits-archive@river.apache.org Received: (qmail 75727 invoked by uid 500); 4 Dec 2015 12:14:11 -0000 Mailing-List: contact commits-help@river.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@river.apache.org Delivered-To: mailing list commits@river.apache.org Received: (qmail 75706 invoked by uid 99); 4 Dec 2015 12:14:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Dec 2015 12:14:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 047352C1F61 for ; Fri, 4 Dec 2015 12:14:11 +0000 (UTC) Date: Fri, 4 Dec 2015 12:14:11 +0000 (UTC) From: "Peter Firmstone (JIRA)" To: commits@river.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (RIVER-348) Possible race condition in net.jini.lookup.ServiceDiscoveryManager addProxyReg 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/RIVER-348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Peter Firmstone resolved RIVER-348. ----------------------------------- Resolution: Fixed Fix Version/s: River_3.0.0 > Possible race condition in net.jini.lookup.ServiceDiscoveryManager addProxyReg > ------------------------------------------------------------------------------ > > Key: RIVER-348 > URL: https://issues.apache.org/jira/browse/RIVER-348 > Project: River > Issue Type: Bug > Reporter: Patricia Shanahan > Priority: Minor > Fix For: River_3.0.0 > > Attachments: qaresult-servicediscovery-JC-20100829.zip > > > SDM appears to assume that tasks with sequence numbers are added to their TaskManager in ascending sequence number order. The method addProxyReg increments the sequence number in a serviceIdMap synchronized block, but does not add the task to its TaskManager until outside the block. leaving a small window during which another task could be created with higher sequence number but added to the TaskManager first. > There is no known test case reproducing this, so it is difficult to be sure there is nothing else preventing the problem from happening. > The fix wold be to move the cacheTaskMgr.add(treg); call inside the synchronized block. -- This message was sent by Atlassian JIRA (v6.3.4#6332)