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

Sahil Takiar commented on HIVE-19785:
-------------------------------------

I'm seeing extraneous exceptions such as:

{code}
018-05-29 15:29:39,389 INFO  
org.apache.hive.spark.client.rpc.RpcServer$SaslServerHandler: [RPC-Handler-3]: 
Exception in SASL negotiation.
java.lang.IllegalArgumentException: Unexpected client ID 
'8680fd2f-0b0f-45fa-8dd3-e89d06072f76' in SASL handshake.
        at 
com.google.common.base.Preconditions.checkArgument(Preconditions.java:119) 
~[guava-14.0.1.jar:?]
        at 
org.apache.hive.spark.client.rpc.RpcServer$SaslServerHandler.update(RpcServer.java:284)
 ~[hive-exec-2.1.1-SNAPSHOT.jar:2.1.1-SNAPSHOT]
        at 
org.apache.hive.spark.client.rpc.SaslHandler.channelRead0(SaslHandler.java:59) 
~[hive-exec-2.1.1-SNAPSHOT.jar:2.1.1-SNAPSHOT]
        at 
org.apache.hive.spark.client.rpc.SaslHandler.channelRead0(SaslHandler.java:34) 
~[hive-exec-2.1.1-SNAPSHOT.jar:2.1.1-SNAPSHOT]
        at 
io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
 ~[netty-transport-4.1.17.Final.jar:4.1.17.Final]
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
 [netty-transport-4.1.17.Final.jar:4.1.17.Final]
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
 [netty-transport-4.1.17.Final.jar:4.1.17.Final]
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
 [netty-transport-4.1.17.Final.jar:4.1.17.Final]
        at 
io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
 [netty-codec-4.1.17.Final.jar:4.1.17.Final]
        at 
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
 [netty-codec-4.1.17.Final.jar:4.1.17.Final]
        at 
io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103)
 [netty-codec-4.1.17.Final.jar:4.1.17.Final]
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
 [netty-transport-4.1.17.Final.jar:4.1.17.Final]
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
 [netty-transport-4.1.17.Final.jar:4.1.17.Final]
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
 [netty-transport-4.1.17.Final.jar:4.1.17.Final]
        at 
io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359)
 [netty-transport-4.1.17.Final.jar:4.1.17.Final]
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
 [netty-transport-4.1.17.Final.jar:4.1.17.Final]
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
 [netty-transport-4.1.17.Final.jar:4.1.17.Final]
        at 
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935)
 [netty-transport-4.1.17.Final.jar:4.1.17.Final]
        at 
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:138)
 [netty-transport-4.1.17.Final.jar:4.1.17.Final]
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645) 
[netty-transport-4.1.17.Final.jar:4.1.17.Final]
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
 [netty-transport-4.1.17.Final.jar:4.1.17.Final]
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497) 
[netty-transport-4.1.17.Final.jar:4.1.17.Final]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) 
[netty-transport-4.1.17.Final.jar:4.1.17.Final]
        at 
io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
 [netty-common-4.1.17.Final.jar:4.1.17.Final]
{code}

> Race condition when timeout task is invoked during SASL negotation
> ------------------------------------------------------------------
>
>                 Key: HIVE-19785
>                 URL: https://issues.apache.org/jira/browse/HIVE-19785
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Spark
>            Reporter: Sahil Takiar
>            Priority: Major
>
> There is a race condition that leads to some extraneous exception messages 
> when the timeout task is invoked in {{RpcServer}}.
> If a timeout is triggered by {{RpcServer#registerClient}} the method will 
> remove the {{clientId}} from {{pendingClients}}. However, if the SASL 
> negotiation is in progress when the timeout task is invoked, then 
> {{SaslServerHandler#update}} will throw an {{IllegalArgumentException}} 
> complaining that it can't find the {{clientId}} in the map of 
> {{pendingClients}}.
> The timeout still succeeds, but the logging is confusing and multiple 
> exceptions make this difficult to debug.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to