[DING] Re: [PING] Potential infinite waiting at JMXConnection#createConnection
kubota.yuji at gmail.com
Wed Feb 3 17:27:09 UTC 2016
Could someone please review and sponsor this fix ?
I write the details of this issue again. Please review it.
Potential infinite waiting at TCPChannel#createConnection.
This method flushes the DataOutputStream without the socket
timeout settings when choose stream protocol . If connection lost
or the destination server do not return response during the flush,
this method wait forever because the timeout settings is set the
default value of SO_TIMEOUT, i.e., infinite.
I think this issue is rarely, however serious.
I write a test program to reproduce. You can reproduce by the below.
* hg clone http://icedtea.classpath.org/people/ykubota/fixLoopAtJMXConnectorFactory/
* cd fixLoopAtJMXConnectorFactory; mvn package
* setting "stop_time" at debugcontrol.properties if you need.
* java -cp .:target/debugcontrol-1.0-SNAPSHOT.jar debugcontrol.DebugController
This program keep to wait at TCPChannel#createConnection due to
this issue. After "debugcontroltest.stop_time" ms, this program release
the waiting by sending quit to jdb which is stopping the destination
server. Finally, return 2.
Set timeout by using property-configured value:
My patch is below.
If you run the test program with modified JDK9 by my patch, the test
program will get java.net.SocketTimeoutException after the connection
timeout happen, then return 0.
2016-01-13 23:31 GMT+09:00 KUBOTA Yuji <kubota.yuji at gmail.com>:
> Hi all,
> Can somebody please review and sponsor this fix ?
> 2016-01-05 17:56 GMT+09:00 KUBOTA Yuji <kubota.yuji at gmail.com>:
>> Hi Jaroslav and core-libs-dev,
>> Thank Jaroslav for your kindness!
>> For core-libs-dev members, links the information about this issue.
>> * details of problem
>> * patch
>> * testcase for reproduce
>> Could you please review these reports?
>> Hope this patch helps to community.
>> 2016-01-04 23:51 GMT+09:00 Jaroslav Bachorik <jaroslav.bachorik at oracle.com>:
>>> Hi Yuji,
>>> On 4.1.2016 15:14, KUBOTA Yuji wrote:
>>>> Hi all,
>>>> Could you please review this patch?
>>> Sorry for the long delay. Shanliang has not been present for some time and
>>> probably this slipped the attention of the others.
>>> However, core-libs mailing list might be more appropriate place to review
>>> this change since you are dealing with s.r.t.t.TCPChannel
More information about the core-libs-dev