-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NullPointerException while processing http2 Priority Frame #10941
Labels
Milestone
Comments
@atropnikov would be interesting to know what streamId this is... Can you provide the info ? |
normanmaurer
added a commit
that referenced
this issue
Jan 15, 2021
Motivation: #10765 added support for push promise and priority frames when using the Http2FrameCodec. Unfortunally it didnt correctly guard against the possibility to receive a priority frame for an non-existing stream, which resulted in a NPE Modifications: - Ignore priority frame for non existing stream - Correctly implement equals / hashcode for DefaultHttp2PriorityFrame - Add unit tests Result: Fixes #10941
I think this should be fixed by #10943 |
|
@atropnikov thanks ... I suspect this should be fixed by: #10943 Is it possible for you to verify ? |
Yes, we will try to verify soon. |
Keep me posted |
normanmaurer
added a commit
that referenced
this issue
Jan 18, 2021
…10943) Motivation: #10765 added support for push promise and priority frames when using the Http2FrameCodec. Unfortunally it didnt correctly guard against the possibility to receive a priority frame for an non-existing stream, which resulted in a NPE Modifications: - Ignore priority frame for non existing stream - Correctly implement equals / hashcode for DefaultHttp2PriorityFrame - Add unit tests Result: Fixes #10941
normanmaurer
added a commit
that referenced
this issue
Jan 18, 2021
…10943) Motivation: #10765 added support for push promise and priority frames when using the Http2FrameCodec. Unfortunally it didnt correctly guard against the possibility to receive a priority frame for an non-existing stream, which resulted in a NPE Modifications: - Ignore priority frame for non existing stream - Correctly implement equals / hashcode for DefaultHttp2PriorityFrame - Add unit tests Result: Fixes #10941
ZzxyNn
pushed a commit
to ZzxyNn/netty
that referenced
this issue
Jan 29, 2021
…etty#10943) Motivation: netty#10765 added support for push promise and priority frames when using the Http2FrameCodec. Unfortunally it didnt correctly guard against the possibility to receive a priority frame for an non-existing stream, which resulted in a NPE Modifications: - Ignore priority frame for non existing stream - Correctly implement equals / hashcode for DefaultHttp2PriorityFrame - Add unit tests Result: Fixes netty#10941
raidyue
pushed a commit
to raidyue/netty
that referenced
this issue
Jul 8, 2022
…etty#10943) Motivation: netty#10765 added support for push promise and priority frames when using the Http2FrameCodec. Unfortunally it didnt correctly guard against the possibility to receive a priority frame for an non-existing stream, which resulted in a NPE Modifications: - Ignore priority frame for non existing stream - Correctly implement equals / hashcode for DefaultHttp2PriorityFrame - Add unit tests Result: Fixes netty#10941
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
No NPE
Actual behavior
java.lang.NullPointerException: null at io.netty.handler.codec.http2.Http2FrameCodec$FrameListener.requireStream(Http2FrameCodec.java:679) at io.netty.handler.codec.http2.Http2FrameCodec$FrameListener.onPriorityRead(Http2FrameCodec.java:661) at io.netty.handler.codec.http2.Http2FrameListenerDecorator.onPriorityRead(Http2FrameListenerDecorator.java:54) at io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder$FrameReadListener.onPriorityRead(DefaultHttp2ConnectionDecoder.java:386) at io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder$PrefaceFrameListener.onPriorityRead(DefaultHttp2ConnectionDecoder.java:676) at io.netty.handler.codec.http2.DefaultHttp2FrameReader.readPriorityFrame(DefaultHttp2FrameReader.java:510) at io.netty.handler.codec.http2.DefaultHttp2FrameReader.processPayloadState(DefaultHttp2FrameReader.java:257) at io.netty.handler.codec.http2.DefaultHttp2FrameReader.readFrame(DefaultHttp2FrameReader.java:160) at io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder.decodeFrame(DefaultHttp2ConnectionDecoder.java:174) at io.netty.handler.codec.http2.DecoratingHttp2ConnectionDecoder.decodeFrame(DecoratingHttp2ConnectionDecoder.java:63) at io.netty.handler.codec.http2.Http2ConnectionHandler$FrameDecoder.decode(Http2ConnectionHandler.java:378) at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.decode(Http2ConnectionHandler.java:242) at io.netty.handler.codec.http2.Http2ConnectionHandler.decode(Http2ConnectionHandler.java:438) at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:508) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:447) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1533) at io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1294) at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1331) at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:508) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:447) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:795) at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:480) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:832)
Steps to reproduce
Not available now, happens after upgrading to netty 4.1.58 (I suppose it would happen with 4.1.57). I will try to log incoming frames.
Minimal yet complete reproducer code (or URL to code)
Netty version
4.1.58.Final
JVM version (e.g.
java -version
)openjdk 14.0.1
OS version (e.g.
uname -a
)N/A
The text was updated successfully, but these errors were encountered: