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 B731A2009F8 for ; Fri, 3 Jun 2016 20:52:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B5EC3160A49; Fri, 3 Jun 2016 18:52:05 +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 086C1160A3B for ; Fri, 3 Jun 2016 20:52:04 +0200 (CEST) Received: (qmail 38193 invoked by uid 500); 3 Jun 2016 18:51:59 -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 38172 invoked by uid 99); 3 Jun 2016 18:51:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jun 2016 18:51:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 2A6DA2C1F5D for ; Fri, 3 Jun 2016 18:51:59 +0000 (UTC) Date: Fri, 3 Jun 2016 18:51:59 +0000 (UTC) From: "Sergey Soldatov (JIRA)" To: dev@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HBASE-15957) RpcClientImpl.close never ends in some circumstances MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 03 Jun 2016 18:52:05 -0000 Sergey Soldatov created HBASE-15957: --------------------------------------- Summary: RpcClientImpl.close never ends in some circumstances Key: HBASE-15957 URL: https://issues.apache.org/jira/browse/HBASE-15957 Project: HBase Issue Type: Bug Components: Client, rpc Affects Versions: 1.1.2 Reporter: Sergey Soldatov Assignee: Sergey Soldatov This bug is related to HBASE-14241 and HBASE-13851. Fix for HBASE-13851 introduced the check for non alive connections and if connection is not alive, it close it: {noformat} if (!conn.isAlive()) { if (connsToClose == null) { connsToClose = new HashSet(); } connsToClose.add(conn); } .... if (connsToClose != null) { for (Connection conn : connsToClose) { if (conn.markClosed(new InterruptedIOException("RpcClient is closing"))) { conn.close(); } } } {noformat} That worked fine until fix for HBASE-14241 introduced handling for interrupt in writer thread: {noformat} try { cts = callsToWrite.take(); } catch (InterruptedException e) { markClosed(new InterruptedIOException()); } {noformat} So, if writer thread is running, but connection thread is not started yet, interrupt will cause calling of markClosed which will set shouldCloseConnection flag for the parent connection. And the next time during the handling of non alive connections markClosed will return false and close will not be called. As the result connection will not be removed from the connections pool and RpcClientImpl.close never finish. -- This message was sent by Atlassian JIRA (v6.3.4#6332)