[9] RFR: 8159416: javax/net/ssl/DTLS/CipherSuite.java failed on timeout
Xuelei Fan
xuelei.fan at oracle.com
Tue Jun 28 01:25:20 UTC 2016
On 6/28/2016 9:12 AM, Artem Smotrakov wrote:
> Hello,
>
> Please review this patch for javax/net/ssl/DTLS tests.
>
> A couple of DTLS tests fail intermittently on Mac with timeout or "Too
> many handshake loops ..." error. The tests use UDP to transfer DTLS
> records. It happens sometimes that server cannot receive UDP packets
> with DatagramSocket.receive() method even if client tries to re-send
> them multiple times. Please see logs in the bug.
>
> At the moment, it is not clear why UDP packets can't be delivered to
> server. If someone has seen something similar before, or has some ideas
> what might be the root cause, please let me know.
>
UDP is not reliable. It could happen that the packets get lost.
> I think that the tests and DTLS implementation are fine here. Since the
> tests are for DTLS, we can workaround this issue by avoiding real UDP
> connections. To avoid changing test logic much, we can use a custom
> DatagramSocketImpl and DatagramSocketImplFactory implementations to
> replace system UDP implementation.
>
> The patch below updates the tests with the following:
> - added custom DatagramSocketImpl and DatagramSocketImplFactory
> implementations to avoid real UDP connections
Tests for real connections in practice are needed. If we update this
test this way, we need to add other tests to test real application
usage. I don't think this is the right direction to avoid real UDP
connections.
> - added more test output, so that we can have more info it the tests
> fail again
>
I agree with this point.
Xuelei
> I have run javax/net/ssl/DTLS/CipherSuite.java test in a loop on Mac,
> and I didn't see it failed. I also have run javax/net/ssl/DTLS tests on
> all supported generic platforms, and they worked fine.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8159416
> http://cr.openjdk.java.net/~asmotrak/8159416/webrev.00/
>
> Artem
More information about the security-dev
mailing list