Problem
- Product Name: VisiBroker for Java
 - Product Version: 7.0
 - Product Component: ORB
 - Platform/OS version: All
 - JDK: 1.5.0
 - Patch Level: All
 
When the user is trying to send a large file (usually larger than 1MB) between ORB applications across different platforms, an error similar to the one shown below will be observed:
 
 org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 215 completed: No
 at com.sun.corba.se.impl.logging.ORBUtilSystemException.transportReadTimeoutExceeded(ORBUtilSystemException.java:2572)
 t com.sun.corba.se.impl.logging.ORBUtilSystemException.transportReadTimeoutExceeded(ORBUtilSystemException.java:2598)
 …….
The thread that reads from the socket does not wait or block for the data in the socket. It tries to read to check if there is any data. If there is none, then the thread goes to sleep for 100ms. After that, it wakes up and reads off the socket in loop.
The time interval seems too short, so if the socket has not filled up yet, the reading thread will sleep for a longer timer interval, for example(105ms) and the time interval will continue to be longer if data is not ready yet. This is causing the reading thread finally reach timeout.
It affects the default com.sun.CORBA.transport.ORBTCPReadTimeouts property in Window platform.
Resolution
The problem did not appeare in JDK 1.4. A workaround proposed by SUN is to adjust the ORBTCPReadTimeouts to a value like "1:15000:300:1". This value will configure the socket to check the socket every 1ms.
The CORBA system property must be specified at the java command line for both the client and server.
-Dcom.sun.CORBA.transport.ORBTCPReadTimeouts=1:15000:300:1
For more detailed usage of ORBTCPReadTimeouts, please refer to the following description:
a. TRANSPORT_TCP_INITIAL_TIME_TO_WAIT: initial time to wait in milliseconds if a transport tcp read returns 0 bytes. In the example above, the value of 1 is for this parameter.
b. TRANSPORT_TCP_MAX_TIME_TO_WAIT: max time to spend in cumulative waits in milliseconds if a transport tcp read returns 0 bytes. The value is 15000 for the above example.
c. TRANSPORT_TCP_GIOP_HEADER_MAX_TIME_TO_WAIT: max time to spend in cumulative waits in milliseconds A value of 300 is set in the above example.
d. TRANSPORT_TCP_TIME_TO_WAIT_BACKOFF_FACTOR: A backoff percentage used to compute the next amount of time to wait on a subsequent transport tcp read of 0 bytes. This parameter is set to 1 in the above example.
#jdk
#COMM_FAILURE
#Security
#com.sun.CORBA.transport.ORBTCPReadTimeouts
#VisiBroker