-
-
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
SSLHandler handleRemoved called before handlerAdded #6536
Comments
@yogeshvedpathak would be nice if you could provide more information, reproducer would be a huge help. |
Is there no stack for the NPE? |
Unfortunately there is no stack trace for NPE (i was surprised by that that.) From the other logs from our application i can tell that thi happens right after connection termination. So my best guess is that NPE is coming from pendingUnencryptedWrites being null. |
Could you upgrade to latest netty version and see if it still happens?
… Am 13.03.2017 um 08:46 schrieb yogeshvedpathak ***@***.***>:
Unfortunately there is no stack trace for NPE (i was surprised by that that.) From the other logs from our application i can tell that thi happens right after connection termination. So my best guess is that NPE is coming from pendingUnencryptedWrites being null.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@yogeshvedpathak you might also consider adding |
As noted please upgrade to latest version and re-open if you still see the issue with more details |
…adding the handler to the pipeline. Motivation: Due a race in DefaultChannelPipeline / AbstractChannelHandlerContext it was possible to have only handlerRemoved(...) called during tearing down the pipeline, even when handlerAdded(...) was never called. We need to ensure we either call both of none to guarantee a proper lifecycle of the handler. Modifications: - Enforce handlerAdded(...) / handlerRemoved(...) semantics / ordering - Add unit test. Result: Fixes #8676 / #6536 .
@yogeshvedpathak #8684 PTAL |
…adding the handler to the pipeline. (#8684) Motivation: Due a race in DefaultChannelPipeline / AbstractChannelHandlerContext it was possible to have only handlerRemoved(...) called during tearing down the pipeline, even when handlerAdded(...) was never called. We need to ensure we either call both of none to guarantee a proper lifecycle of the handler. Modifications: - Enforce handlerAdded(...) / handlerRemoved(...) semantics / ordering - Add unit test. Result: Fixes #8676 / #6536 .
…adding the handler to the pipeline. (#8684) Motivation: Due a race in DefaultChannelPipeline / AbstractChannelHandlerContext it was possible to have only handlerRemoved(...) called during tearing down the pipeline, even when handlerAdded(...) was never called. We need to ensure we either call both of none to guarantee a proper lifecycle of the handler. Modifications: - Enforce handlerAdded(...) / handlerRemoved(...) semantics / ordering - Add unit test. Result: Fixes #8676 / #6536 .
…adding the handler to the pipeline. Motivation: Due a race in DefaultChannelPipeline / AbstractChannelHandlerContext it was possible to have only handlerRemoved(...) called during tearing down the pipeline, even when handlerAdded(...) was never called. We need to ensure we either call both of none to guarantee a proper lifecycle of the handler. Modifications: - Enforce handlerAdded(...) / handlerRemoved(...) semantics / ordering - Add unit test. Result: Fixes netty/netty#8676 / netty/netty#6536 .
I am getting following stack trace when a connection terminates. I think the null pointer exception is originated because
pendingUnencryptedWrites
is null at link415
. This could happen whenhandleRemoved
is called before thehandleAdded
2017-03-10 00:04:12.063 WARN [nioEventLoopGroup-3-5] io.netty.channel.DefaultChannelPipeline - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
io.netty.channel.ChannelPipelineException: io.netty.handler.ssl.SslHandler.handlerRemoved() has thrown an exception.
at io.netty.channel.DefaultChannelPipeline.callHandlerRemoved0(DefaultChannelPipeline.java:621) [netty-all-4.0.41.Final.jar:4.0.41.Final]
at io.netty.channel.DefaultChannelPipeline.destroyDown(DefaultChannelPipeline.java:868) [netty-all-4.0.41.Final.jar:4.0.41.Final]
at io.netty.channel.DefaultChannelPipeline.destroyUp(DefaultChannelPipeline.java:834) [netty-all-4.0.41.Final.jar:4.0.41.Final]
at io.netty.channel.DefaultChannelPipeline.destroy(DefaultChannelPipeline.java:826) [netty-all-4.0.41.Final.jar:4.0.41.Final]
at io.netty.channel.DefaultChannelPipeline.access$700(DefaultChannelPipeline.java:43) [netty-all-4.0.41.Final.jar:4.0.41.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelUnregistered(DefaultChannelPipeline.java:1276) [netty-all-4.0.41.Final.jar:4.0.41.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelUnregistered(AbstractChannelHandlerContext.java:185) [netty-all-4.0.41.Final.jar:4.0.41.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelUnregistered(AbstractChannelHandlerContext.java:171) [netty-all-4.0.41.Final.jar:4.0.41.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelUnregistered(DefaultChannelPipeline.java:811) [netty-all-4.0.41.Final.jar:4.0.41.Final]
at io.netty.channel.AbstractChannel$AbstractUnsafe$7.run(AbstractChannel.java:699) [netty-all-4.0.41.Final.jar:4.0.41.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:408) [netty-all-4.0.41.Final.jar:4.0.41.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441) [netty-all-4.0.41.Final.jar:4.0.41.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140) [netty-all-4.0.41.Final.jar:4.0.41.Final]
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144) [netty-all-4.0.41.Final.jar:4.0.41.Final]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45-internal]
Caused by: java.lang.NullPointerException
The text was updated successfully, but these errors were encountered: