RuiLi8080 opened a new pull request #3296:
URL: https://github.com/apache/storm/pull/3296


   ## What is the purpose of the change
   
   In some (rare) cases, we observed netty-server might receive messages other 
than a List<TaskMessage> from a wrong source, and it will throw 
ClassCastException and terminate the worker process. 
   
   ## How was the change tested
   
   Set netty server side to not using Sasl related ServerHandler while making 
client send sasl message, we observe the following message without worker 
getting killed
   
   ```
   2020-06-26 15:10:41.086 o.a.s.m.n.Server 
Netty-server-localhost-6701-worker-1 [ERROR] Worker netty server receive 
message other than the expected class List<TaskMessage>
   java.lang.ClassCastException: 
org.apache.storm.messaging.netty.ControlMessage cannot be cast to java.util.List
           at org.apache.storm.messaging.netty.Server.received(Server.java:266) 
[storm-client-2.3.0.y.jar:2.3.0.y]
           at 
org.apache.storm.messaging.netty.StormServerHandler.channelRead(StormServerHandler.java:51)
 [storm-client-2.3.0.y.jar:2.3.0.y]
           at 
org.apache.storm.shade.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
 [storm-shaded-deps-2.3.0.y.jar:2.3.0.y]
           at 
org.apache.storm.shade.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
 [storm-shaded-deps-2.3.0.y.jar:2.3.0.y]
           at 
org.apache.storm.shade.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
 [storm-shaded-deps-2.3.0.y.jar:2.3.0.y]
           at 
org.apache.storm.shade.io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:323)
 [storm-shaded-deps-2.3.0.y.jar:2.3.0.y]
           at 
org.apache.storm.shade.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:297)
 [storm-shaded-deps-2.3.0.y.jar:2.3.0.y]
           at 
org.apache.storm.shade.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
 [storm-shaded-deps-2.3.0.y.jar:2.3.0.y]
           at 
org.apache.storm.shade.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
 [storm-shaded-deps-2.3.0.y.jar:2.3.0.y]
           at 
org.apache.storm.shade.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
 [storm-shaded-deps-2.3.0.y.jar:2.3.0.y]
           at 
org.apache.storm.shade.io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
 [storm-shaded-deps-2.3.0.y.jar:2.3.0.y]
           at 
org.apache.storm.shade.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
 [storm-shaded-deps-2.3.0.y.jar:2.3.0.y]
           at 
org.apache.storm.shade.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
 [storm-shaded-deps-2.3.0.y.jar:2.3.0.y]
           at 
org.apache.storm.shade.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
 [storm-shaded-deps-2.3.0.y.jar:2.3.0.y]
           at 
org.apache.storm.shade.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
 [storm-shaded-deps-2.3.0.y.jar:2.3.0.y]
           at 
org.apache.storm.shade.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
 [storm-shaded-deps-2.3.0.y.jar:2.3.0.y]
           at 
org.apache.storm.shade.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
 [storm-shaded-deps-2.3.0.y.jar:2.3.0.y]
           at 
org.apache.storm.shade.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
 [storm-shaded-deps-2.3.0.y.jar:2.3.0.y]
           at 
org.apache.storm.shade.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
 [storm-shaded-deps-2.3.0.y.jar:2.3.0.y]
           at 
org.apache.storm.shade.io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897)
 [storm-shaded-deps-2.3.0.y.jar:2.3.0.y]
           at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to