JDK-8156114 : java/nio/channels/AsyncCloseAndInterrupt.java fails intermittently: SocketChannel/finishConnect/close threw an exception
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • Submitted: 2016-05-05
  • Updated: 2017-02-16
  • Resolved: 2016-10-24
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
tbd_minorResolved
Related Reports
Relates :  
Relates :  
Relates :  
Description
java/nio/channels/AsyncCloseAndInterrupt.java

Observed test fails intermittently:

#section:main
----------messages:(3/139)----------
command: main AsyncCloseAndInterrupt
reason: User specified action: run main/othervm AsyncCloseAndInterrupt 
elapsed time (seconds): 6.252
----------System.out:(0/0)----------
----------System.err:(160/5685)----------

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

FileChannel/transferTo/pre-interrupt
Thrown as expected: java.nio.channels.ClosedByInterruptException
WARNING: transferTo/close not tested

FileChannel/transferFrom/interrupt
Thrown as expected: java.nio.channels.ClosedByInterruptException

FileChannel/transferFrom/pre-interrupt
Thrown as expected: java.nio.channels.ClosedByInterruptException
WARNING: transferFrom/close not tested

FileChannel/read/interrupt
Thrown as expected: java.nio.channels.ClosedByInterruptException

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

FileChannel/read/close
Thrown as expected: java.nio.channels.AsynchronousCloseException

FileChannel/readv/interrupt
Thrown as expected: java.nio.channels.ClosedByInterruptException

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

FileChannel/readv/close
Thrown as expected: java.nio.channels.AsynchronousCloseException

FileChannel/write/interrupt
Thrown as expected: java.nio.channels.ClosedByInterruptException

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

FileChannel/write/close
Wrote 20480 bytes
Channel closed

FileChannel/writev/interrupt
Thrown as expected: java.nio.channels.ClosedByInterruptException

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

FileChannel/writev/close
Wrote 20480 bytes
Channel closed

SocketChannel/read/interrupt
Thrown as expected: java.nio.channels.ClosedByInterruptException

SocketChannel/read/pre-interrupt
Thrown as expected: java.nio.channels.ClosedByInterruptException

SocketChannel/read/close
Thrown as expected: java.nio.channels.AsynchronousCloseException

SocketChannel/read/shutdown-input
Read returned -1
Channel open, input shutdown

SocketChannel/readv/interrupt
Thrown as expected: java.nio.channels.ClosedByInterruptException

SocketChannel/readv/pre-interrupt
Thrown as expected: java.nio.channels.ClosedByInterruptException

SocketChannel/readv/close
Thrown as expected: java.nio.channels.AsynchronousCloseException

SocketChannel/readv/shutdown-input
Read returned -1
Channel open, input shutdown

SocketChannel/write/interrupt
Thrown as expected: java.nio.channels.ClosedByInterruptException

SocketChannel/write/pre-interrupt
Thrown as expected: java.nio.channels.ClosedByInterruptException

SocketChannel/write/close
Wrote 130880 bytes
Channel closed

SocketChannel/write/shutdown-output
Thrown as expected: java.nio.channels.AsynchronousCloseException

SocketChannel/writev/interrupt
Thrown as expected: java.nio.channels.ClosedByInterruptException

SocketChannel/writev/pre-interrupt
Thrown as expected: java.nio.channels.ClosedByInterruptException

SocketChannel/writev/close
Wrote 130880 bytes
Channel closed

SocketChannel/writev/shutdown-output
Thrown as expected: java.nio.channels.AsynchronousCloseException

Wait for initial Pump
Start pumping refuser ...

Wait for initial Pump done

SocketChannel/connect/interrupt
connect waiting for pumping refuser ...
connect waiting for pumping refuser ... done
Thrown as expected: java.nio.channels.ClosedByInterruptException

SocketChannel/connect/pre-interrupt
connect waiting for pumping refuser ...
connect waiting for pumping refuser ... done
Thrown as expected: java.nio.channels.ClosedByInterruptException

SocketChannel/connect/close
connect waiting for pumping refuser ...
connect waiting for pumping refuser ... done
Thrown as expected: java.nio.channels.AsynchronousCloseException

SocketChannel/finishConnect/interrupt
finishConnect waiting for pumping refuser ...
finishConnect waiting for pumping refuser ... done
Thrown as expected: java.nio.channels.ClosedByInterruptException

SocketChannel/finishConnect/pre-interrupt
finishConnect waiting for pumping refuser ...
finishConnect waiting for pumping refuser ... done
Thrown as expected: java.nio.channels.ClosedByInterruptException

SocketChannel/finishConnect/close
finishConnect waiting for pumping refuser ...
finishConnect waiting for pumping refuser ... done
java.lang.Exception: SocketChannel/finishConnect/close threw an exception
	at TestThread.finishAndThrow(TestThread.java:80)
	at AsyncCloseAndInterrupt.test(AsyncCloseAndInterrupt.java:614)
	at AsyncCloseAndInterrupt.test(AsyncCloseAndInterrupt.java:637)
	at AsyncCloseAndInterrupt.main(AsyncCloseAndInterrupt.java:735)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:531)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110)
	at java.lang.Thread.run(java.base@9-ea/Thread.java:804)
Caused by: java.nio.channels.ClosedChannelException
	at sun.nio.ch.SocketChannelImpl.ensureOpenAndUnconnected(java.base@9-ea/SocketChannelImpl.java:611)
	at sun.nio.ch.SocketChannelImpl.connect(java.base@9-ea/SocketChannelImpl.java:624)
	at AsyncCloseAndInterrupt$16.doIO(AsyncCloseAndInterrupt.java:371)
	at AsyncCloseAndInterrupt$Tester.go(AsyncCloseAndInterrupt.java:486)
	at TestThread.run(TestThread.java:55)

JavaTest Message: Test threw exception: java.lang.Exception: SocketChannel/finishConnect/close threw an exception
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.Exception: SocketChannel/finishConnect/close threw an exception
Comments
might need to do extra sleep for FINISH_CONNECT "SocketChannel/finishConnect/close" too, but extra sleep will increase the possibility of JDK-8151582.
18-05-2016