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 7165B200C4C for ; Tue, 21 Mar 2017 02:15:48 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 6FDCF160B92; Tue, 21 Mar 2017 01:15:48 +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 B849D160B8F for ; Tue, 21 Mar 2017 02:15:47 +0100 (CET) Received: (qmail 36828 invoked by uid 500); 21 Mar 2017 01:15:46 -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 36812 invoked by uid 99); 21 Mar 2017 01:15:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Mar 2017 01:15:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 4C40AC0B7C for ; Tue, 21 Mar 2017 01:15:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.451 X-Spam-Level: * X-Spam-Status: No, score=1.451 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id TNKDt3942QK1 for ; Tue, 21 Mar 2017 01:15:45 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id DE58160DB0 for ; Tue, 21 Mar 2017 01:15:44 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D3BCFE0BC8 for ; Tue, 21 Mar 2017 01:15:42 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 234C3254E2 for ; Tue, 21 Mar 2017 01:15:42 +0000 (UTC) Date: Tue, 21 Mar 2017 01:15:42 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-17798) RpcServer.Listener.Reader can abort due to CancelledKeyException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 21 Mar 2017 01:15:48 -0000 [ https://issues.apache.org/jira/browse/HBASE-17798?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-17798: --------------------------- Attachment: 17798-master-v2.patch > RpcServer.Listener.Reader can abort due to CancelledKeyException > ---------------------------------------------------------------- > > Key: HBASE-17798 > URL: https://issues.apache.org/jira/browse/HBASE-17798 > Project: HBase > Issue Type: Bug > Affects Versions: 2.0.0, 1.3.0, 1.2.4, 0.98.24 > Reporter: Guangxu Cheng > Attachments: 17798-master-v2.patch, connections.png, HBASE-17798-= 0.98-v1.patch, HBASE-17798-0.98-v2.patch, HBASE-17798-branch-1-v1.patch, HB= ASE-17798-branch-1-v2.patch, HBASE-17798-master-v1.patch, HBASE-17798-maste= r-v2.patch > > > In our production cluster(0.98), some of the requests were unacceptable b= ecause RpcServer.Listener.Reader were aborted. > getReader() will return the next reader to deal with request. > The implementation of getReader() as below=EF=BC=9A > {code:title=3DRpcServer.java|borderStyle=3Dsolid} > // The method that will return the next reader to work with > // Simplistic implementation of round robin for now > Reader getReader() { > currentReader =3D (currentReader + 1) % readers.length; > return readers[currentReader]; > } > {code} > If one of the readers abort, then it will lead to fall on the reader's re= quest will never be dealt with. > Why does RpcServer.Listener.Reader abort?We add the debug log to get it. > After a while, we got the following exception: > {code} > 2017-03-10 08:05:13,247 ERROR [RpcServer.reader=3D3,port=3D60020] ipc.Rpc= Server: RpcServer.listener,port=3D60020: unexpectedly error in Reader(Throw= able) > java.nio.channels.CancelledKeyException > at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:= 73) > at sun.nio.ch.SelectionKeyImpl.readyOps(SelectionKeyImpl.java:87) > at java.nio.channels.SelectionKey.isReadable(SelectionKey.java:28= 9) > at org.apache.hadoop.hbase.ipc.RpcServer$Listener$Reader.doRunLoo= p(RpcServer.java:592) > at org.apache.hadoop.hbase.ipc.RpcServer$Listener$Reader.run(RpcS= erver.java:566) > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolEx= ecutor.java:1142) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolE= xecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > {code} > So, when deal with the request in reader, we should handle CanceledKeyExc= eption. > ---------- > versions 1.x and 2.0 will log and retrun when dealing with the Interrupte= dException in Reader#doRunLoop after HBASE-10521. It will lead to the same = problem. -- This message was sent by Atlassian JIRA (v6.3.15#6346)