You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Hadoop QA (JIRA)" <ji...@apache.org> on 2015/10/07 06:25:26 UTC

[jira] [Commented] (HBASE-14458) AsyncRpcClient#createRpcChannel() should check and remove dead channel before creating new one to same server

    [ https://issues.apache.org/jira/browse/HBASE-14458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14946218#comment-14946218 ] 

Hadoop QA commented on HBASE-14458:
-----------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12765299/HBASE-14458%20%281%29.patch
  against master branch at commit 0ea1f8122709302ee19279aaa438b37dac30c25b.
  ATTACHMENT ID: 12765299

    {color:green}+1 @author{color}.  The patch does not contain any @author tags.

    {color:red}-1 tests included{color}.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    {color:green}+1 hadoop versions{color}. The patch compiles with all supported hadoop versions (2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.6.0 2.6.1 2.7.0 2.7.1)

    {color:green}+1 javac{color}.  The applied patch does not increase the total number of javac compiler warnings.

    {color:green}+1 protoc{color}.  The applied patch does not increase the total number of protoc compiler warnings.

    {color:green}+1 javadoc{color}.  The javadoc tool did not generate any warning messages.

    {color:green}+1 checkstyle{color}.  The applied patch does not increase the total number of checkstyle errors

    {color:red}-1 findbugs{color}.  The patch appears to cause Findbugs (version 2.0.3) to fail.

    {color:green}+1 release audit{color}.  The applied patch does not increase the total number of release audit warnings.

    {color:green}+1 lineLengths{color}.  The patch does not introduce lines longer than 100

  {color:green}+1 site{color}.  The mvn post-site goal succeeds with this patch.

     {color:red}-1 core tests{color}.  The patch failed these unit tests:
                       org.apache.hadoop.hbase.util.TestProcessBasedCluster
                  org.apache.hadoop.hbase.mapreduce.TestImportExport

Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/15894//testReport/
Checkstyle Errors: https://builds.apache.org/job/PreCommit-HBASE-Build/15894//artifact/patchprocess/checkstyle-aggregate.html

  Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/15894//console

This message is automatically generated.

> AsyncRpcClient#createRpcChannel() should check and remove dead channel before creating new one to same server
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-14458
>                 URL: https://issues.apache.org/jira/browse/HBASE-14458
>             Project: HBase
>          Issue Type: Bug
>          Components: IPC/RPC
>    Affects Versions: 2.0.0, 1.2.0, 1.3.0, 1.1.3
>            Reporter: Samir Ahmic
>            Assignee: Samir Ahmic
>            Priority: Critical
>             Fix For: 2.0.0
>
>         Attachments: HBASE-14458 (1).patch, HBASE-14458.patch, HBASE-14458.patch
>
>
> I have notice this issue while testing master branch in distributed mode. Reproduction steps:
> 1. Write some data with hbase ltt 
> 2. While ltt is writing execute $graceful_stop.sh --restart --reload [rs] 
> 3. Wait until script start to reload regions to restarted server. In that moment ltt will stop writing and eventually fail. 
> After some digging i have notice that while ltt is working correctly there is single connection per regionserver (lsof for single connection, 27109 is  ltt PID )
> {code}
> java      27109   hbase  143u    210579579      0t0        TCP hnode1:40423->hnode5:16020 (ESTABLISHED)
> {code}  
> and when in this example hnode5 server is restarted and script starts to reload regions on this server ltt start creating thousands of new tcp connections to this server:
> {code}
> java      27109   hbase *623u              210674415      0t0        TCP hnode1:52948->hnode5:16020 (ESTABLISHED)
> java      27109   hbase *624u               210674416      0t0        TCP hnode1:52949->hnode5:16020 (ESTABLISHED)
> java      27109   hbase *625u               210674417      0t0        TCP hnode1:52950->hnode5:16020 (ESTABLISHED)
> java      27109   hbase *627u               210674419      0t0        TCP hnode1:52952->hnode5:16020 (ESTABLISHED)
> java      27109   hbase *628u               210674420      0t0        TCP hnode1:52953->hnode5:16020 (ESTABLISHED)
> java      27109   hbase *633u               210674425      0t0        TCP hnode1:52958->hnode5:16020 (ESTABLISHED)
> ...
> {code}
> So here is what happened based on some additional logging and debugging:
> - AsyncRpcClient never detected that regionserver is restarted because regions were moved and there was no write/read requests to this server and  there is no some sort of heart-bit mechanism implemented
> -  because of above dead {code}AsyncRpcChannel{code} stayed in {code}PoolMap<Integer, AsyncRpcChannel> connections{code}
> - when ltt detected that regions are moved back to hnode5  it tried to reconnect to hnode5  leading this issue
> I was able to resolve this issue by adding following to AsyncRpcClient#createRpcChannel():
> {code}
> synchronized (connections) {
>       if (closed) {
>         throw new StoppedRpcClientException();
>       }
>       rpcChannel = connections.get(hashCode);
> +    if (rpcChannel != null && !rpcChannel.isAlive()) {
> +        LOG.debug(Removing dead channel from "+ rpcChannel.address.toString());
> +        connections.remove(hashCode);
> +      }      
>       if (rpcChannel == null || !rpcChannel.isAlive()) {
>         rpcChannel = new AsyncRpcChannel(this.bootstrap, this, ticket, serviceName, location);
>         connections.put(hashCode, rpcChannel);
> {code}
>  I will attach patch after some more testing.
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)