JDK-6419424 : (ch) test/java/nio/channels/AsyncCloseAndInterrupt.java fails in 5.0u8 and mustang (linux only)
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2006-04-28
  • Updated: 2014-09-25
  • Resolved: 2006-05-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
5.0u8Fixed 6 b85Fixed
Related Reports
Relates :  
Description
test/java/nio/channels/AsyncCloseAndInterrupt.java is failing on Linux with 5.0u8 and Mustang since the integration of 6380091.

6380091 fixes a reliability problem that arises when a SocketChannel is closed before any I/O is done. That fix is okay but it exposes another bug in the finishConnect implementation whereby it doesn't record the thread while doing the poll - that is needed on Linux for signallying purposes. The implication of the is that finishConnect does not throw CloseByInterruptedException when interrupted.

Comments
EVALUATION See description.
28-04-2006

SUGGESTED FIX ------- SocketChannelImpl.java ------- *** /tmp/sccs.dDaapo Fri Apr 28 12:30:18 2006 --- SocketChannelImpl.java Fri Apr 28 12:07:47 2006 *************** *** 525,530 **** --- 525,531 ---- begin(); if (isOpen()) { synchronized (blockingLock()) { + readerThread = NativeThread.current(); if (!isBlocking()) { for (;;) { n = checkConnect(fd, false, *************** *** 552,557 **** --- 553,559 ---- } } } finally { + readerThread = 0; end((n > 0) || (n == IOStatus.UNAVAILABLE)); assert IOStatus.check(n); }
28-04-2006