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 6731E200B38 for ; Fri, 8 Jul 2016 09:38:13 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 65BF1160A58; Fri, 8 Jul 2016 07:38:13 +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 AE1AD160A77 for ; Fri, 8 Jul 2016 09:38:12 +0200 (CEST) Received: (qmail 11851 invoked by uid 500); 8 Jul 2016 07:38:11 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 11660 invoked by uid 99); 8 Jul 2016 07:38:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jul 2016 07:38:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 374742C02AC for ; Fri, 8 Jul 2016 07:38:11 +0000 (UTC) Date: Fri, 8 Jul 2016 07:38:11 +0000 (UTC) From: "Ashish Singhi (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-16201) NPE in RpcServer causing intermittent UT failure of TestMasterReplication#testHFileCyclicReplication MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 08 Jul 2016 07:38:13 -0000 [ https://issues.apache.org/jira/browse/HBASE-16201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15367356#comment-15367356 ] Ashish Singhi commented on HBASE-16201: --------------------------------------- +1 > NPE in RpcServer causing intermittent UT failure of TestMasterReplication#testHFileCyclicReplication > ---------------------------------------------------------------------------------------------------- > > Key: HBASE-16201 > URL: https://issues.apache.org/jira/browse/HBASE-16201 > Project: HBase > Issue Type: Bug > Reporter: Yu Li > Assignee: Yu Li > Attachments: HBASE-16201.patch > > > Every several rounds of {{TestMasterReplication#testHFileCyclicReplication}}, we could observe below NPE in UT log: > {noformat} > java.lang.NullPointerException > at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2257) > at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:118) > at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:189) > at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:169) > {noformat} > And related codes at RpcServer line 2257 are: > {code} > if (e instanceof ServiceException) { > e = e.getCause(); > } > // increment the number of requests that were exceptions. > metrics.exception(e); > if (e instanceof LinkageError) throw new DoNotRetryIOException(e); > if (e instanceof IOException) throw (IOException)e; > {code} > And after some debugging, we could find several places that constructing ServiceException with no cause, such as in {{RsRpcServices#replicateWALEntry}}: > {code} > if (regionServer.replicationSinkHandler != null) { > ... > } else { > throw new ServiceException("Replication services are not initialized yet"); > } > {code} > So we should firstly check and only reset {{e=e.getCause()}} when the cause is not null -- This message was sent by Atlassian JIRA (v6.3.4#6332)