JDK-8199438 : java/nio/channels/AsynchronousSocketChannel/StressLoopback.java fail on win-x64
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 11
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • CPU: x86_64
  • Submitted: 2018-03-12
  • Updated: 2019-01-15
  • 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.
Other
tbdFixed
Related Reports
Duplicate :  
Relates :  
Description
java/nio/channels/AsynchronousSocketChannel/StressLoopback.java fail on win-x64 

----------System.out:(7/220)----------
1276173849 -> 1276173849 (PASS)
49796568 -> 49015013 (FAIL)
1241191860 -> 1241191860 (FAIL)
1326252524 -> 1326252524 (FAIL)
1208332530 -> 1208332530 (FAIL)
1295833104 -> 1295833104 (FAIL)
1257027013 -> 1257027013 (FAIL)
----------System.err:(48/3970)----------
java.io.IOException: An operation was attempted on something that is not a socket
	at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl.read0(Native Method)
	at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl.access$700(WindowsAsynchronousSocketChannelImpl.java:43)
	at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl$ReadTask.run(WindowsAsynchronousSocketChannelImpl.java:507)
	at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl.implRead(WindowsAsynchronousSocketChannelImpl.java:652)
	at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:276)
	at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:297)
	at java.base/java.nio.channels.AsynchronousSocketChannel.read(AsynchronousSocketChannel.java:425)
	at StressLoopback$Sink$1.completed(StressLoopback.java:153)
	at StressLoopback$Sink$1.completed(StressLoopback.java:146)
	at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:127)
	at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:282)
	at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl$ReadTask.completed(WindowsAsynchronousSocketChannelImpl.java:575)
	at java.base/sun.nio.ch.Iocp$EventHandlerTask.run(Iocp.java:387)
	at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:842)
	at java.base/jdk.internal.misc.InnocuousThread.run(InnocuousThread.java:134)
java.io.IOException: An established connection was aborted by the software in your host machine
	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:399)
	at java.base/java.nio.channels.AsynchronousSocketChannel.write(AsynchronousSocketChannel.java:582)
	at StressLoopback$Source$1.completed(StressLoopback.java:113)
	at StressLoopback$Source$1.completed(StressLoopback.java:105)
	at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:127)
	at java.base/sun.nio.ch.Invoker$2.run(Invoker.java:219)
	at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:842)
	at java.base/jdk.internal.misc.InnocuousThread.run(InnocuousThread.java:134)
java.lang.RuntimeException: Test failed - see log for details
	at StressLoopback.main(StressLoopback.java:82)
	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)

JavaTest Message: Test threw exception: java.lang.RuntimeException
JavaTest Message: shutting down test

result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Test failed - see log for details
Comments
Duplicate of JDK-8200304.
29-03-2018

There are several tests on Windows currently failing with "An operation was attempted on something that is not a socket". We believe the issue is a bug in the TwoStacks implementation of java.net.DatagramSocketImpl and started with jdk-11+1 with the change to this code to use the socket cleaner. A fix is in the works for this issue and I think we can close several issues in JIRA once it is confirmed that it is the reason why random sockets are being closed on Windows.
27-03-2018