Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 332D210534 for ; Fri, 23 Aug 2013 05:10:01 +0000 (UTC) Received: (qmail 49868 invoked by uid 500); 23 Aug 2013 05:10:00 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 49250 invoked by uid 500); 23 Aug 2013 05:09:56 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 48733 invoked by uid 99); 23 Aug 2013 05:09:52 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Aug 2013 05:09:52 +0000 Date: Fri, 23 Aug 2013 05:09:52 +0000 (UTC) From: "Jeffrey Zhong (JIRA)" To: dev@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HBASE-9318) Procedure#waitForLatch may not throw error even there is one MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Jeffrey Zhong created HBASE-9318: ------------------------------------ Summary: Procedure#waitForLatch may not throw error even there is one Key: HBASE-9318 URL: https://issues.apache.org/jira/browse/HBASE-9318 Project: HBase Issue Type: Bug Reporter: Jeffrey Zhong Assignee: Jeffrey Zhong On Suse, TestProcedureCoordinator#testUnreachableControllerDuringCommit often fails with stack trace pasted at the bottom. The failure is due to a race condition that if current procedure throws error in the last wait because we don't check error after while wait loop. When I looked at the failure, I found the related code in file ForeignExceptionDispatcher#receive may have an issue. Though we create a new exception, we still pass e to dispatch when e is null. [~jmhsieh] Do you know if it's by design? {code} if (e != null) { exception = e; } else { exception = new ForeignException(name, ""); } // notify all the listeners dispatch(e); {code} {code} Test case failure stack trace: java.io.IOException via some op:java.io.IOException: Failed to reach controller during prepare at org.apache.hadoop.hbase.errorhandling.ForeignExceptionDispatcher.rethrowException(ForeignExceptionDispatcher.java:85) at org.apache.hadoop.hbase.procedure.Procedure.waitForLatch(Procedure.java:371) at org.apache.hadoop.hbase.procedure.Procedure.waitForCompleted(Procedure.java:343) at org.apache.hadoop.hbase.procedure.TestProcedureCoordinator.testUnreachableControllerDuringCommit(TestProcedureCoordinator.java:171) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74) Caused by: java.io.IOException: Failed to reach controller during prepare at org.apache.hadoop.hbase.procedure.Procedure.call(Procedure.java:212) at org.apache.hadoop.hbase.procedure.Procedure.call(Procedure.java:68) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira