Review request for bug 8015762: java/nio/channels/DatagramChannel/AdaptDatagramSocket.java fails intermittently

Eric Wang yiming.wang at oracle.com
Wed Sep 11 01:58:40 PDT 2013


Hi Alan,

Sorry for late. I have re-fixed this failure, Can you please help to review?
I executed the tests on the host jsn-vm49.us for thousands times and 
found the test failed as setting SO_TIMEOUT for 5 seconds is not enough 
to wait response sent by a new created thread of UdpEchoRequest. It may 
caused by thread schedule as there's maybe more than 3 threads executing 
at sametime or full GC as lots of UdpEchoRequest created in runtime.

The fix is to change the SO_TIMEOUT from 5 seconds to 10 and not create 
a new thread of UdpEchoRequest to send response. I have run the fix for 
20000 times, it works fine.
http://cr.openjdk.java.net/~ewang/8015762/webrev.01/ 
<http://cr.openjdk.java.net/%7Eewang/8015762/webrev.01/>

Thanks,
Eric
On 2013/8/14 4:55, Alan Bateman wrote:
> On 13/08/2013 12:29, Eric Wang wrote:
>> Hi,
>>
>> Please help to review the fix below for bug 
>> https://jbs.oracle.com/bugs/browse/JDK-8015762.
>> http://cr.openjdk.java.net/~ewang/8015762/webrev.00/
>>
>> The test AdaptDatagramSocket fails intermittently as it runs depended 
>> on thread schedule. The fix to adjust the thread priority and sleep 
>> time to make the test more stable.
> I think I need to understand this issue further to properly review 
> this. From the stack trace in the bug report then it looks like it's 
> the "test(address, 5000, false, false)" case that is timing out. Is it 
> definitely the case that is failing (intermittently) and have you 
> managed to duplicate it?
>
> -Alan



More information about the nio-dev mailing list