United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-8022661 InetAddress.writeObject() performs flush() on object output stream
JDK-8022661 : InetAddress.writeObject() performs flush() on object output stream

Details
Type:
Bug
Submit Date:
2013-06-14
Status:
Closed
Updated Date:
2013-10-16
Project Name:
JDK
Resolved Date:
2013-08-09
Component:
core-libs
OS:
windows_xp
Sub-Component:
java.net
CPU:
Priority:
P3
Resolution:
Fixed
Affected Versions:
7u21,8
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

Description
FULL PRODUCT VERSION :
1.7.0_21-b11

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
Windows Server 2008

A DESCRIPTION OF THE PROBLEM :
InetAddress.writeObject performs flush() on object output stream.

That spoils TCP throughput when the output stream is based on a socket channel of a TCP connection, since the SYN ACK delay of 2ms of Windows will be invoked when a packet is smaller than the MTU and the next packet is about to be sent.


REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
Go to Java 7 update 15. Or insert a filtering output stream ignoring the flush().
                                    

Comments
The flush() is completely unnecessary and should be removed.

This could considered a minor performance regression, and was inadvertently introduced by 8000724.
                                     
2013-08-09
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/84004d0e3fdd
User:  chegar
Date:  2013-08-09 12:51:40 +0000

                                     
2013-08-09
Adding 7u40-defer-request:

This bug can manifest itself as a small performance regression, if the InetAddress is being serialized to a socket stream. However, this is a small performance hit, and unlikely to be a problem unless the application is serializing a large number of InetAddress instances. While I would like to defer this bug from 7u40 (due to it coming to our attention late in the release cycle ), I think it should be fixed in the next available 7 update, 7u45. Fixing in 7u45 may also be justified since the issue is a regression introduced in 7u21.
                                     
2013-08-09
Need SQE-OK to defer for 7u40.
                                     
2013-08-09
SQE ok to defer from 7u40.
                                     
2013-08-09
Adding CPU13_04-critical-watch:

This is a regression from a previous security release, 7u21. The fix is small and localized. Risk is low.
                                     
2013-08-12
Based on the nighlty test run results for the build where the fix had been integreated SQE is OK to take it inot CPU13_04.
                                     
2013-08-21
URL:   http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/84004d0e3fdd
User:  lana
Date:  2013-08-26 18:32:19 +0000

                                     
2013-08-26



Hardware and Software, Engineered to Work Together