United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6710579 : (ch) test/java/nio/channels/AsyncCloseAndInterrupt fails (lnx)

Details
Type:
Bug
Submit Date:
2008-06-04
Status:
Closed
Updated Date:
2011-05-17
Project Name:
JDK
Resolved Date:
2011-05-17
Component:
core-libs
OS:
generic
Sub-Component:
java.nio
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Backport:

Sub Tasks

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



Hardware and Software, Engineered to Work Together