JDK-8199711 : java/nio/channels/AsynchronousChannelGroup/Unbounded.java fails
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 11
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows
  • CPU: x86_64
  • Submitted: 2018-03-15
  • Updated: 2018-03-29
  • Resolved: 2018-03-29
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
11Resolved
Related Reports
Duplicate :  
Relates :  
Description
Fails on windows with "An operation was attempted on something that is not a socket":

java.util.concurrent.ExecutionException: java.io.IOException: An operation was attempted on something that is not a socket
	at java.base/sun.nio.ch.PendingFuture.get(PendingFuture.java:183)
	at Unbounded.main(Unbounded.java:94)
	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:564)
	at com.sun.javatest.regtest.agent.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:229)
	at java.base/java.lang.Thread.run(Thread.java:842)
Caused by: java.io.IOException: An operation was attempted on something that is not a socket
	at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl.write0(Native Method)
	at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl.access$900(WindowsAsynchronousSocketChannelImpl.java:43)
	at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl$WriteTask.run(WindowsAsynchronousSocketChannelImpl.java:770)
	at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl.implWrite(WindowsAsynchronousSocketChannelImpl.java:906)
	at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:382)
	at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:387)
	... 7 more
Comments
Duplicate of JDK-8200304.
29-03-2018

We are currently seeing random networking tests failing on Windows with "An operation was attempted on something that is not a socket", another example is JDK-8198871. The issues seem to have started in jdk-11+1 when classic networking was changed from using finalizers to the new Cleaner API. The TwoStack* implementation of java.net.DatagramSocketImpl seems to have code paths that close sockets that are registered with the cleaner. When the Cleaner runs, it closes the sockets used by some victim test that is running later in the same VM.
26-03-2018