-
-
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
ChannelInitializer.initChannel() executed more than once when used with context executor #8616
Comments
@atcurtis can you please try netty 4.1.32.Final and let me know if the same problem happens there as well? I think I remember that we fixed something related to this at some point. Please let me know if after the upgrade the problem still persists. |
I have tried with 4.1.32.Final and it fails exactly the same except with slightly different line numbers:
|
I will have a look
… Am 03.12.2018 um 21:08 schrieb Antony T Curtis ***@***.***>:
I have tried with 4.1.32.Final and it fails exactly the same except with slightly different line numbers:
at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:115)
at io.netty.channel.ChannelInitializer.channelRegistered(ChannelInitializer.java:76)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRegistered(AbstractChannelHandlerContext.java:149)
at io.netty.channel.AbstractChannelHandlerContext.access$000(AbstractChannelHandlerContext.java:38)
at io.netty.channel.AbstractChannelHandlerContext$1.run(AbstractChannelHandlerContext.java:140)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
normanmaurer
added a commit
that referenced
this issue
Dec 4, 2018
…m EventExecutor. Motivation: The ChannelInitializer may be invoked multipled times when used with a custom EventExecutor as removal operation may be done asynchronously. We need to guard against this. Modifications: - Change Map to Set which is more correct in terms of how we use it. - Ensure we only modify the internal Set when the handler was removed yet - Add unit test. Result: Fixes #8616.
normanmaurer
added a commit
that referenced
this issue
Dec 5, 2018
…m EventExecutor. (#8620) Motivation: The ChannelInitializer may be invoked multipled times when used with a custom EventExecutor as removal operation may be done asynchronously. We need to guard against this. Modifications: - Change Map to Set which is more correct in terms of how we use it. - Ensure we only modify the internal Set when the handler was removed yet - Add unit test. Result: Fixes #8616.
normanmaurer
added a commit
that referenced
this issue
Dec 5, 2018
…m EventExecutor. (#8620) Motivation: The ChannelInitializer may be invoked multipled times when used with a custom EventExecutor as removal operation may be done asynchronously. We need to guard against this. Modifications: - Change Map to Set which is more correct in terms of how we use it. - Ensure we only modify the internal Set when the handler was removed yet - Add unit test. Result: Fixes #8616.
normanmaurer
added a commit
that referenced
this issue
Dec 6, 2018
Motivation: 8331248 did make some changes to fix a race in ChannelInitializer when using with a custom EventExecutor. Unfortunally these where a bit racy and so the testcase failed sometimes. Modifications: - More correct fix when using a custom EventExecutor - Adjust the testcase to be more correct. Result: Proper fix for #8616.
normanmaurer
added a commit
that referenced
this issue
Dec 7, 2018
…or. (#8633) Motivation: 8331248 did make some changes to fix a race in ChannelInitializer when using with a custom EventExecutor. Unfortunally these where a bit racy and so the testcase failed sometimes. Modifications: - More correct fix when using a custom EventExecutor - Adjust the testcase to be more correct. Result: Proper fix for #8616.
normanmaurer
added a commit
that referenced
this issue
Dec 7, 2018
…or. (#8633) Motivation: 8331248 did make some changes to fix a race in ChannelInitializer when using with a custom EventExecutor. Unfortunally these where a bit racy and so the testcase failed sometimes. Modifications: - More correct fix when using a custom EventExecutor - Adjust the testcase to be more correct. Result: Proper fix for #8616.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
Expected ChannelInitializer.initChannel() to be executed one.
Actual behavior
A subsequent execution causes exception to be thrown because it can't find itself or remove itself again.
Steps to reproduce
See repro code below.
Minimal yet complete reproducer code (or URL to code)
Netty version
4.1.22.Final
JVM version (e.g.
java -version
)OS version (e.g.
uname -a
)RHEL7
3.10.0-514.55.4.el7.x86_64 #1 SMP Fri Aug 10 17:03:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: