-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Revise TcpNioConnectionTests.testMultiAccept() and testNoMultiAccept() #3666
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
Comments
That's a very interesting bug, I have spent some time to understand the reason. Seems like OpenJDK11 for Windows has some optimizations which lead to this issue.
My hypothesis: as we do create many connections one after another, somehow this slows our server down when it accepts new channels. It establishes the TCP connection, but our client thinks that no connections had been established. As my knowledge in this area is weak, I don't have any low-level ideas of the cause of that server slowness. Maybe you guys know. The strange thing is that connections are established one by one, not concurrently - so maybe it is some cumulative effect. P.S. I still can be fundamentally wrong about the cause :D
Also,
|
Hi @oxcafedead ! Thank you for such a great investigation! You know, I don't think it worth to try to understand why. This one really has fixed issue for me: Feel free to open a Pull Request under your name! Probably some other sporadically failing tests should be fixed similar way... |
…) and testNoMultiAccept() Seems like Windows socket connect to the loopback address fails sometimes because of a bug in the implementation of OpenJDK. Changing loopback addr with the actual IP addr seems to help.
…) and testNoMultiAccept() Seems like Windows socket connect to the loopback address fails sometimes because of a bug in the implementation of OpenJDK. Changing loopback addr with the actual IP addr seems to help.
They fail on Java 17, at least for me on Windows:
The text was updated successfully, but these errors were encountered: