Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8143305

sun/security/ec/TestEC.java fails intermittently

    Details

      Description

      sun/security/ec/TestEC.java fails intermittently

      ----------System.err:(31/1929)----------
      javax.net.ssl.SSLException: Unsupported or unrecognized SSL message
      at sun.security.ssl.SSLSocketInputRecord.handleUnknownRecord(SSLSocketInputRecord.java:416)
      at sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:173)
      at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:995)
      at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:949)
      at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1356)
      at sun.security.ssl.SSLSocketImpl.bytesInCompletePacket(SSLSocketImpl.java:883)
      at sun.security.ssl.AppInputStream.read(AppInputStream.java:144)
      at sun.security.ssl.AppInputStream.read(AppInputStream.java:84)
      at CipherTest$Server.handleRequest(CipherTest.java:77)
      at JSSEServer$1.run(JSSEServer.java:64)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1158)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:632)
      at java.lang.Thread.run(Thread.java:747)
      java.lang.Exception: *** Test 'Client JSSE - Server JSSE' failed ***
      at CipherTest.run(CipherTest.java:323)
      at CipherTest.main(CipherTest.java:445)
      at ClientJSSEServerJSSE.main(ClientJSSEServerJSSE.java:61)
      at TestEC.main0(TestEC.java:103)
      at TestEC.main(TestEC.java:70)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:520)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:92)
      at java.lang.Thread.run(Thread.java:747)
      1. TestEC.jtr
        186 kB
        Martin Buchholz
      2. TestEC.jtr
        189 kB
        Martin Buchholz

        Issue Links

          Activity

          Hide
          asmotrak Artem Smotrakov added a comment -
          I suspect this is one of those intermittent failures which we have been seeing for long time. Possible solution may be to update the test to use SSLSocketTemplate class. Xuelei is updating this class, so please wait for him to finish it (see JDK-8170329, there are example of how SSLSocketTemplate can be used).
          Show
          asmotrak Artem Smotrakov added a comment - I suspect this is one of those intermittent failures which we have been seeing for long time. Possible solution may be to update the test to use SSLSocketTemplate class. Xuelei is updating this class, so please wait for him to finish it (see JDK-8170329 , there are example of how SSLSocketTemplate can be used).
          Hide
          tidu Tim Du (Inactive) added a comment -
          The testcase have below load flow:
          CipherTest.java:381 -> OutputStream.java:75 -> AppOutputStream.java:67 ->SSLSocketImpl.java:728 ->SSLSocketInputRecord.java:154 -> SSLSocketInputRecord.java:425 -> SocketInputStream.java:141->SocketInputStream.java:170 ->SocketInputStream.java:116 -> SocketInputStream.java:94: private native int socketRead0

          In the end, it will load the native socketRead0 function in SocketInputStream.java line 94, I find there is one same timeout issue happend on SocketInputStream.java : socketRead0 function ,and it has been tracked by JDK-8075484 and fixed in jdk9 137 , the code was check in on 2016-09-21.For currently issue was latest happend on 2016-07-18 it was happened before the fix code checked in, so I guess it was fixed by JDK-8075484.

          Show
          tidu Tim Du (Inactive) added a comment - The testcase have below load flow: CipherTest.java:381 -> OutputStream.java:75 -> AppOutputStream.java:67 ->SSLSocketImpl.java:728 ->SSLSocketInputRecord.java:154 -> SSLSocketInputRecord.java:425 -> SocketInputStream.java:141->SocketInputStream.java:170 ->SocketInputStream.java:116 -> SocketInputStream.java:94: private native int socketRead0 In the end, it will load the native socketRead0 function in SocketInputStream.java line 94, I find there is one same timeout issue happend on SocketInputStream.java : socketRead0 function ,and it has been tracked by JDK-8075484 and fixed in jdk9 137 , the code was check in on 2016-09-21.For currently issue was latest happend on 2016-07-18 it was happened before the fix code checked in, so I guess it was fixed by JDK-8075484 .
          Hide
          tidu Tim Du (Inactive) added a comment -
          The native socketRead0 will cause the poll system call with when "fd" is ready for read, this will block the socket read. JDK-8075484 has update the natavie code to using no-blocking read by recv(s, buf, len, MSG_NONBLOCK) , so I think the issue was fixed.closed this bug.
          Show
          tidu Tim Du (Inactive) added a comment - The native socketRead0 will cause the poll system call with when "fd" is ready for read, this will block the socket read. JDK-8075484 has update the natavie code to using no-blocking read by recv(s, buf, len, MSG_NONBLOCK) , so I think the issue was fixed.closed this bug.
          Hide
          asmotrak Artem Smotrakov added a comment -
          There are at least two different exceptions mixed in this bug. First one is "Unsupported or unrecognized SSL message" (please see the bug description), and second one is SocketTimeoutException. At the moment I am not sure that they are related. So, I am not sure that JDK-8075484 fixes "Unsupported or unrecognized SSL message" problem. But it is an interesting finding that JDK-8075484 may fix at least SocketTimeoutException problem here. We'll see.
          Show
          asmotrak Artem Smotrakov added a comment - There are at least two different exceptions mixed in this bug. First one is "Unsupported or unrecognized SSL message" (please see the bug description), and second one is SocketTimeoutException. At the moment I am not sure that they are related. So, I am not sure that JDK-8075484 fixes "Unsupported or unrecognized SSL message" problem. But it is an interesting finding that JDK-8075484 may fix at least SocketTimeoutException problem here. We'll see.
          Hide
          tidu Tim Du (Inactive) added a comment -
          It seem this bug mentioned 3 kind of issues:
          1) ' javax.net.ssl.SSLException: Unsupported or unrecognized SSL message' in the bug description.
          2) ' javax.net.ssl.SSLHandshakeException: RSA ServerKeyExchange does not comply to algorithm constraints' in the attachment files.
          3) ' java.net.SocketTimeoutException: Read timed out' in the 2016-07-18 comments . This issue seem was fixed by JDK-8075484
          Show
          tidu Tim Du (Inactive) added a comment - It seem this bug mentioned 3 kind of issues: 1) ' javax.net.ssl.SSLException: Unsupported or unrecognized SSL message' in the bug description. 2) ' javax.net.ssl.SSLHandshakeException: RSA ServerKeyExchange does not comply to algorithm constraints' in the attachment files. 3) ' java.net.SocketTimeoutException: Read timed out' in the 2016-07-18 comments . This issue seem was fixed by JDK-8075484

            People

            • Assignee:
              tidu Tim Du (Inactive)
              Reporter:
              amlu Amy Lu
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: