8003253: TEST_BUG: java/nio/channels/AsynchronousChannelGroup/Unbounded.java hang intermittently [win]

Alan Bateman Alan.Bateman at oracle.com
Sat Nov 10 14:07:16 PST 2012


There have been a couple of reports of this test hanging on Windows.

The test checks that the default channel group uses an unbounded thread 
pool. When a read operation completes then the completion handle awaits 
on a barrier and the test completes when there are 256 threads (plus the 
main thread) get to the barrier. The problem is that the test completely 
ignores the case where I/O operations fail and this happens periodically 
on Windows because the close may be abrupt. The 1-line fix to this is to 
do a shutdownOutput so that the connection is closed gracefully. The 
only changes are just to add additional diagnostic output and to ensure 
that a failure causes the test to terminate in a timely manner.

The webrev with the changes is here:

http://cr.openjdk.java.net/~alanb/8003253/webrev/

-Alan.


More information about the nio-dev mailing list