JDK-8202481 : RegisterDuringSelect.java fails with java.util.concurrent.ExecutionException: java.nio.channels.ClosedSelectorException
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 11
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: x86_64
  • Submitted: 2018-05-01
  • Updated: 2019-09-19
  • Resolved: 2018-07-14
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.
JDK 11 JDK 12
11Fixed 12 b03Fixed
Related Reports
Relates :  
Description
java/nio/channels/Selector/RegisterDuringSelect.java fails with the following exception

java.util.concurrent.ExecutionException: java.nio.channels.ClosedSelectorException
	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
	at RegisterDuringSelect.main(RegisterDuringSelect.java:106)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at com.sun.javatest.regtest.agent.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:229)
	at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.nio.channels.ClosedSelectorException
	at java.base/sun.nio.ch.SelectorImpl.ensureOpen(SelectorImpl.java:70)
	at java.base/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:116)
	at java.base/sun.nio.ch.SelectorImpl.select(SelectorImpl.java:132)
	at RegisterDuringSelect$1.call(RegisterDuringSelect.java:47)
	at RegisterDuringSelect$1.call(RegisterDuringSelect.java:43)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	... 1 more
Comments
The selectLoop method in the test needs to handle ClosedSelectorException.
01-05-2018