hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Hofhansl (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-13318) RpcServer.Listener.getAddress should be synchronized
Date Sat, 18 Jul 2015 11:24:04 GMT

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

Lars Hofhansl commented on HBASE-13318:

This is very hard to reproduce... Interestingly getListenerAddress is only called from CallRunner.run
in two places and both just attempt to report the address (in an exception or a warning message).

Looks like this exception happened here:
    } catch (ClosedChannelException cce) {
      RpcServer.LOG.warn(Thread.currentThread().getName() + ": caught a ClosedChannelException,
" +
          "this means that the server " + rpcServer.getListenerAddress() + " was processing
a " +
          "request but the client went away. The error message was: " +

[~ndimiduk] this came with HBASE-12825, mind having a quick look? The gist is that we can
only get the listenerAddress as long as the acceptChannel exists. If the client goes away,
the channel might have been closed in the listener thread before we can catch the exception...
I think.

> RpcServer.Listener.getAddress should be synchronized
> ----------------------------------------------------
>                 Key: HBASE-13318
>                 URL: https://issues.apache.org/jira/browse/HBASE-13318
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions:
>            Reporter: Lars Hofhansl
>            Priority: Minor
>              Labels: thread-safety
> We just saw exceptions like these:
> {noformat}
> Exception in thread "B.DefaultRpcServer.handler=45,queue=0,port=60020" java.lang.NullPointerException
> 	at org.apache.hadoop.hbase.ipc.RpcServer$Listener.getAddress(RpcServer.java:753)
> 	at org.apache.hadoop.hbase.ipc.RpcServer.getListenerAddress(RpcServer.java:2157)
> 	at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:146)
> 	at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:130)
> 	at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:107)
> 	at java.lang.Thread.run(Thread.java:745)
> {noformat}
> Looks like RpcServer$Listener.getAddress should be synchronized (acceptChannel is set
to null upon exiting the thread under in a synchronized block).
> Should be happening very rarely only.

This message was sent by Atlassian JIRA

View raw message