United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6941936 Broken pipe error of test case DNSIdentities.java
JDK-6941936 : Broken pipe error of test case DNSIdentities.java

Details
Type:
Bug
Submit Date:
2010-04-08
Status:
Closed
Updated Date:
2011-03-07
Project Name:
JDK
Resolved Date:
2011-03-07
Component:
security-libs
OS:
generic
Sub-Component:
javax.net.ssl
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Backport:

Sub Tasks

Description
During PIT test, the following test case failed with the similiar reason, "broken pipe":
FAILED: sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java
FAILED: sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/Identities.java
FAILED: sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressIPIdentities.java
FAILED: sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java

For example, for DNSIdentities.java, the test log looks like:
TEST: sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java
JDK under test: (/tmp/jprt/T1/T/011642.ss145989/testproduct/linux_i586_2.6-product)
java version "1.7.0-internal"
Java(TM) SE Runtime Environment (build 1.7.0-internal-jprtadm_2010_04_06_18_32-b00)
Java HotSpot(TM) Server VM (build 18.0-b02-2010-04-07-011642.ss145989.tl-pit-2d-awt-swing, mixed mode)

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

ACTION: compile -- Passed. Compilation successful
REASON: .class file out of date or does not exist
TIME:   0.801 seconds
messages:
command: compile /tmp/jprt/T1/T/011642.ss145989/source/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.801
STDOUT:
STDERR:

ACTION: main -- Failed. Execution failed: `main' threw exception: java.net.SocketException: Broken pipe
REASON: Assumed action based on file name: run main DNSIdentities 
TIME:   0.501 seconds
messages:
command: main DNSIdentities
reason: Assumed action based on file name: run main DNSIdentities 
elapsed time (seconds): 0.501
STDOUT:
url is https://localhost:34224/
STDERR:
java.net.SocketException: Broken pipe
	at java.net.SocketOutputStream.socketWrite0(Native Method)
	at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
	at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
	at sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:314)
	at sun.security.ssl.OutputRecord.write(OutputRecord.java:303)
	at sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:757)
	at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:745)
	at sun.security.ssl.Handshaker.sendChangeCipherSpec(Handshaker.java:635)
	at sun.security.ssl.ClientHandshaker.sendChangeCipherAndFinish(ClientHandshaker.java:921)
	at sun.security.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:847)
	at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:245)
	at sun.security.ssl.Handshaker.processLoop(Handshaker.java:545)
	at sun.security.ssl.Handshaker.process_record(Handshaker.java:481)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:907)
	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1143)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1170)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1154)
	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:439)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1164)
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:459)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
	at DNSIdentities.doClientSide(DNSIdentities.java:709)
	at DNSIdentities.startClient(DNSIdentities.java:815)
	at DNSIdentities.<init>(DNSIdentities.java:746)
	at DNSIdentities.main(DNSIdentities.java:733)
	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:613)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:717)

JavaTest Message: Test threw exception: java.net.SocketException: Broken pipe
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.net.SocketException: Broken pipe

TEST RESULT: Failed. Execution failed: `main' threw exception: java.net.SocketException: Broken pipe

                                    

Comments
EVALUATION

The TLS server will close the socket after a sleep, "Thread.sleep(2000)". However, it is not enough for some test environment. Need to improve the test that the close will not occure until the client is ready to close.
                                     
2010-04-08
PUBLIC COMMENTS

changes: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/89f4ec9e4b33
                                     
2010-04-10



Hardware and Software, Engineered to Work Together