hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-11479) SecureConnection can't be closed when SecureClient is stopping because InterruptedException won't be caught in SecureClient#setupIOstreams()
Date Fri, 11 Jul 2014 22:57:05 GMT

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

Hudson commented on HBASE-11479:
--------------------------------

FAILURE: Integrated in HBase-0.94-JDK7 #153 (See [https://builds.apache.org/job/HBase-0.94-JDK7/153/])
HBASE-11479 SecureConnection can't be closed when SecureClient is stopping (cuijianwei) (apurtell:
rev 24b3584a1735b5a0fcd0f25a5d3903b31901b227)
* security/src/main/java/org/apache/hadoop/hbase/ipc/SecureClient.java


> SecureConnection can't be closed when SecureClient is stopping because InterruptedException
won't be caught in SecureClient#setupIOstreams()
> --------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-11479
>                 URL: https://issues.apache.org/jira/browse/HBASE-11479
>             Project: HBase
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 0.94.20
>            Reporter: cuijianwei
>            Assignee: cuijianwei
>            Priority: Minor
>             Fix For: 0.94.22
>
>         Attachments: HBASE-11479-0.94-v1.patch
>
>
> When HBaseClient.stop() is invoked, all cached HBaseClient.Connections will be interrupted,
marked as closed and then finally closed. HBaseClient.stop() won't return before all cached
HBaseClient.Connections have been closed. However, SecureConnection might not be closed after
HBaseClient.stop() is invoked because of the following code in SecureClient,setupIOstreams():
> {code}
> ...
> try {
>      ...
>             try {
>               continueSasl =
>                 ticket.runAs(new PrivilegedExceptionAction<Boolean>() {
>                   @Override
>                   public Boolean run() throws IOException {
>                     return setupSaslConnection(in2, out2);
>                   }
>                 });
>             } catch (Exception ex) {
>               if (rand == null) {
>                 rand = new Random();
>               }
>               // == InterruptedException won't be caught ==
>               handleSaslConnectionFailure(numRetries++, MAX_RETRIES, ex, rand, ticket);
>               continue;
>               ...
>             }
>         }
>       } catch (IOException e) {
>         markClosed(e);
>         close();
>         throw e;
>       }
> ...
> {code}
> SecureClient.handleSaslConnectionFailure(...) will throw InterruptedException exception(there
will be Thread.sleep() in SecureClient.handleSaslConnectionFailure(...)) when HBaseClient#stop()
is invoked. However, this InterruptedException won't be caught, making this SecureConnection
can't be closed.
> This problem might make regionserver can't exit because regionserver will wait all SecureConnection
closed when exiting. A simple way to fix this bug is to catch InterruptedException in SecureClient#setupIOstreams()
and close the SecureConnection.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message