JDK-6710579 : (ch) test/java/nio/channels/AsyncCloseAndInterrupt fails (lnx)
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-06-04
  • Updated: 2011-05-17
  • Resolved: 2011-05-17
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 Availabitlity Release.

To download the current JDK release, click here.
JDK 7
7 b30Fixed
Description
test/java/nio/channels/AsyncCloseAndInterrupt.java is failing on Linux:

$ java AsyncCloseAndInterrupt
Initializing refuser...  53 connections

FileChannel/transferTo/interrupt
Transferred 65536 bytes
Channel open

FileChannel/transferTo/pre-interrupt
Thrown as expected: java.nio.channels.ClosedByInterruptException

FileChannel/transferTo/close
Exception in thread "main" java.lang.Exception: FileChannel/transferTo/close timed out
        at TestThread.finishAndThrow(TestThread.java:83)
        at AsyncCloseAndInterrupt.test(AsyncCloseAndInterrupt.java:570)
        at AsyncCloseAndInterrupt.test(AsyncCloseAndInterrupt.java:590)
        at AsyncCloseAndInterrupt.main(AsyncCloseAndInterrupt.java:647)

Comments
EVALUATION Where the transfer methods use memory mapped I/O then closing the channel has no effect. Ths test already skips this sub-test on Solaris for this reason and should be skipped on Linux aswell. This bug will track updating the test to disable this sub-test. For jdk7 we need to re-examine this area ( minimally the transferTo method should throw AsynchronousCloseException and maybe it is possible to amaned the specification to allow for implementations where the closing the channel doesn't interrupt the transfer).
2008-06-04