Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A96E6770F for ; Wed, 7 Dec 2011 02:48:03 +0000 (UTC) Received: (qmail 69656 invoked by uid 500); 7 Dec 2011 02:48:03 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 69370 invoked by uid 500); 7 Dec 2011 02:48:03 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 69191 invoked by uid 99); 7 Dec 2011 02:48:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Dec 2011 02:48:01 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Dec 2011 02:48:00 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 15A53103F1B for ; Wed, 7 Dec 2011 02:47:40 +0000 (UTC) Date: Wed, 7 Dec 2011 02:47:40 +0000 (UTC) From: "Jason Lowe (Commented) (JIRA)" To: common-issues@hadoop.apache.org Message-ID: <1867770153.48120.1323226060107.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <25546049.47965.1323222881302.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HADOOP-7888) TestFailoverProxy fails intermittently on trunk 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/HADOOP-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13164088#comment-13164088 ] Jason Lowe commented on HADOOP-7888: ------------------------------------ I believe the -1 javadoc is unrelated to this patch. > TestFailoverProxy fails intermittently on trunk > ----------------------------------------------- > > Key: HADOOP-7888 > URL: https://issues.apache.org/jira/browse/HADOOP-7888 > Project: Hadoop Common > Issue Type: Bug > Components: test > Affects Versions: 0.24.0 > Reporter: Jason Lowe > Attachments: hadoop-7888.patch > > > TestFailoverProxy can fail intermittently with the failures occurring in testConcurrentMethodFailures(). The test has a race condition where the two threads may be sequentially invoking the unreliable interface rather than concurrently. Currently the proxy provider's getProxy() method contains the thread synchronization to enforce a concurrent invocation, but examining the source to RetryInvocationHandler.invoke() shows that the call to getProxy() during failover is too late to enforce a truly concurrent invocation. > For this particular test, one thread could race ahead and block on the CountDownLatch in getProxy() before the other thread even enters RetryInvocationHandler.invoke(). If that happens the second thread will cache the newly updated value for proxyProviderFailoverCount, since the failover has mostly been processed by the original thread. Therefore the second thread ends up assuming no other thread is present, performs a failover, and the test fails because two failovers occurred instead of one. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira