ymlisoft opened a new issue #9119:
URL: https://github.com/apache/dubbo/issues/9119


   ### Environment
   
   * Dubbo version: 3.0.4
   * Operating System version: win 10
   * Java version: jdk 11
   
   
   ### 需要处理serverStream 为null 的情况
   
   ```
   public void onResetRead(ChannelHandlerContext ctx, Http2ResetFrame frame) {
           Http2Error http2Error = Http2Error.valueOf(frame.errorCode());
           final AbstractServerStream serverStream = 
ctx.channel().attr(TripleConstant.SERVER_STREAM_KEY).get();
           serverStream.cancelByRemote(http2Error);
           ctx.close();
       }
   ```
   
   ```
   10:40:04,422 WARN  
[org.apache.dubbo.rpc.protocol.tri.TripleHttp2FrameServerHandler] 
(NettyServerWorker-5-1)  [DUBBO] Exception in processing triple message, dubbo 
version: 3.0.4, current host: 192.168.1.110: java.lang.NullPointerException
        at 
deployment.dubbo.war//org.apache.dubbo.rpc.protocol.tri.TripleHttp2FrameServerHandler.onResetRead(TripleHttp2FrameServerHandler.java:88)
        at 
deployment.dubbo.war//org.apache.dubbo.rpc.protocol.tri.TripleHttp2FrameServerHandler.userEventTriggered(TripleHttp2FrameServerHandler.java:79)
        at 
deployment.dubbo.war//io.netty.channel.AbstractChannelHandlerContext.invokeUserEventTriggered(AbstractChannelHandlerContext.java:346)
        at 
deployment.dubbo.war//io.netty.channel.AbstractChannelHandlerContext.invokeUserEventTriggered(AbstractChannelHandlerContext.java:332)
        at 
deployment.dubbo.war//io.netty.channel.AbstractChannelHandlerContext.fireUserEventTriggered(AbstractChannelHandlerContext.java:324)
        at 
deployment.dubbo.war//io.netty.channel.DefaultChannelPipeline$HeadContext.userEventTriggered(DefaultChannelPipeline.java:1428)
        at 
deployment.dubbo.war//io.netty.channel.AbstractChannelHandlerContext.invokeUserEventTriggered(AbstractChannelHandlerContext.java:346)
        at 
deployment.dubbo.war//io.netty.channel.AbstractChannelHandlerContext.invokeUserEventTriggered(AbstractChannelHandlerContext.java:332)
        at 
deployment.dubbo.war//io.netty.channel.DefaultChannelPipeline.fireUserEventTriggered(DefaultChannelPipeline.java:913)
        at 
deployment.dubbo.war//io.netty.handler.codec.http2.Http2MultiplexHandler.channelRead(Http2MultiplexHandler.java:176)
        at 
deployment.dubbo.war//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at 
deployment.dubbo.war//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at 
deployment.dubbo.war//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
        at 
deployment.dubbo.war//io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93)
        at 
deployment.dubbo.war//org.apache.dubbo.rpc.protocol.tri.TripleServerConnectionHandler.channelRead(TripleServerConnectionHandler.java:49)
        at 
deployment.dubbo.war//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at 
deployment.dubbo.war//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at 
deployment.dubbo.war//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
        at 
deployment.dubbo.war//io.netty.handler.codec.http2.Http2FrameCodec.onHttp2Frame(Http2FrameCodec.java:707)
        at 
deployment.dubbo.war//io.netty.handler.codec.http2.Http2FrameCodec$FrameListener.onRstStreamRead(Http2FrameCodec.java:617)
        at 
deployment.dubbo.war//io.netty.handler.codec.http2.Http2FrameListenerDecorator.onRstStreamRead(Http2FrameListenerDecorator.java:59)
        at 
deployment.dubbo.war//io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder$FrameReadListener.onRstStreamRead(DefaultHttp2ConnectionDecoder.java:453)
        at 
deployment.dubbo.war//io.netty.handler.codec.http2.Http2InboundFrameLogger$1.onRstStreamRead(Http2InboundFrameLogger.java:80)
        at 
deployment.dubbo.war//io.netty.handler.codec.http2.DefaultHttp2FrameReader.readRstStreamFrame(DefaultHttp2FrameReader.java:516)
        at 
deployment.dubbo.war//io.netty.handler.codec.http2.DefaultHttp2FrameReader.processPayloadState(DefaultHttp2FrameReader.java:260)
        at 
deployment.dubbo.war//io.netty.handler.codec.http2.DefaultHttp2FrameReader.readFrame(DefaultHttp2FrameReader.java:160)
        at 
deployment.dubbo.war//io.netty.handler.codec.http2.Http2InboundFrameLogger.readFrame(Http2InboundFrameLogger.java:41)
        at 
deployment.dubbo.war//io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder.decodeFrame(DefaultHttp2ConnectionDecoder.java:181)
        at 
deployment.dubbo.war//io.netty.handler.codec.http2.DecoratingHttp2ConnectionDecoder.decodeFrame(DecoratingHttp2ConnectionDecoder.java:63)
        at 
deployment.dubbo.war//io.netty.handler.codec.http2.Http2ConnectionHandler$FrameDecoder.decode(Http2ConnectionHandler.java:378)
        at 
deployment.dubbo.war//io.netty.handler.codec.http2.Http2ConnectionHandler.decode(Http2ConnectionHandler.java:438)
        at 
deployment.dubbo.war//io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:508)
        at 
deployment.dubbo.war//io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:447)
        at 
deployment.dubbo.war//io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
        at 
deployment.dubbo.war//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at 
deployment.dubbo.war//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at 
deployment.dubbo.war//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
        at 
deployment.dubbo.war//io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
        at 
deployment.dubbo.war//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at 
deployment.dubbo.war//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at 
deployment.dubbo.war//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
        at 
deployment.dubbo.war//io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
        at 
deployment.dubbo.war//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at 
deployment.dubbo.war//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at 
deployment.dubbo.war//io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
        at 
deployment.dubbo.war//io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
        at 
deployment.dubbo.war//io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
        at 
deployment.dubbo.war//io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
        at 
deployment.dubbo.war//io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
        at 
deployment.dubbo.war//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
        at 
deployment.dubbo.war//io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
        at 
deployment.dubbo.war//io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at 
deployment.dubbo.war//io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:834)
   ```


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to