JDK-7157211 : SSL Tests failing intermittently when connecting to www.verisign.com
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.net.ssl
  • Affected Version: 8
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-03-27
  • Updated: 2017-07-17
  • Resolved: 2012-08-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u171Fixed 8 b40Fixed
Description
This test is failing intermittently in JPRT with jdk8/tl. Here is one example:

--------------------------------------------------
TEST: closed/sun/security/ssl/javax/net/ssl/NewAPIs/JavaxCheckTrusted.java
JDK under test: (/tmp/jprt/P1/093551.albatem/testproduct/solaris_i586_5.10-product)
java version "1.8.0-internal"
Java(TM) SE Runtime Environment (build 1.8.0-internal-201203270935.albatem.jdk-b00)
Java HotSpot(TM) Client VM (build 24.0-b04, mixed mode, sharing)

ACTION: build -- Passed. Build successful
REASON: Named class compiled on demand
TIME:   0.036 seconds
messages:
command: build JavaxCheckTrusted
reason: Named class compiled on demand
elapsed time (seconds): 0.036

ACTION: compile -- Passed. Compilation successful
REASON: .class file out of date or does not exist
TIME:   0.036 seconds
messages:
command: compile /tmp/jprt/P1/093551.albatem/source/test/closed/sun/security/ssl/javax/net/ssl/NewAPIs/JavaxCheckTrusted.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.036

ACTION: main -- Failed. Execution failed: `main' threw exception: java.net.SocketException: Connection reset
REASON: User specified action: run main/othervm JavaxCheckTrusted SunJSSE does not support dynamic system properties, no way to re-use system properties in samevm/agentvm mode. 
TIME:   0.6 seconds
messages:
command: main JavaxCheckTrusted SunJSSE does not support dynamic system properties, no way to re-use system properties in samevm/agentvm mode.
reason: User specified action: run main/othervm JavaxCheckTrusted SunJSSE does not support dynamic system properties, no way to re-use system properties in samevm/agentvm mode. 
elapsed time (seconds): 0.6
STDOUT:
==============
Starting test0
  Writing
  Reading
Completed test0
==============
Starting test1
  Writing
Caught Proper Exception: sun.security.validator.ValidatorException: No trusted certificate found
Completed test1
==============
Starting test2
  Writing
Server exiting!
Caught the proper exception, 4453053 may also be fixed Received fatal alert: bad_certificate
Completed test2
==============
Starting test3
STDERR:
java.net.SocketException: Connection reset
	at java.net.SocketInputStream.read(SocketInputStream.java:189)
	at java.net.SocketInputStream.read(SocketInputStream.java:121)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
	at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:633)
	at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:579)
	at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:1779)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
	at java.net.URL.openStream(URL.java:1034)
	at JavaxCheckTrusted.test3(JavaxCheckTrusted.java:245)
	at JavaxCheckTrusted.doClientSide(JavaxCheckTrusted.java:292)
	at JavaxCheckTrusted.startClient(JavaxCheckTrusted.java:416)
	at JavaxCheckTrusted.<init>(JavaxCheckTrusted.java:343)
	at JavaxCheckTrusted.main(JavaxCheckTrusted.java:329)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:474)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:722)

JavaTest Message: Test threw exception: java.net.SocketException: Connection reset
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.net.SocketException: Connection reset

TEST RESULT: Failed. Execution failed: `main' threw exception: java.net.SocketException: Connection reset
--------------------------------------------------

Comments
EVALUATION Tests which should be updated. closed/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLSocketImpl/ClearPipelineReReadConnectionState.java closed/sun/security/ssl/com/sun/net/ssl/internal/www/protocol/https/HostnameVerifier/Blah.java closed/sun/security/ssl/javax/net/ssl/NewAPIs/JavaxCheckTrusted.java: closed/sun/security/ssl/javax/net/ssl/NewAPIs/ComCheckTrusted.java:
19-04-2012

EVALUATION Test depends on connection to www.verisign.com, which could be offline from time/time. Not concerned about a spurious failure, however, we may want to redo this test to remove the external depenedency. We would need to find a stable https server within Oracle. URL verisign = new URL("https://www.verisign.com/"); BufferedReader in = new BufferedReader( new InputStreamReader( verisign.openStream()));
28-03-2012