JDK-8151582 : (ch) test java/nio/channels/AsyncCloseAndInterrupt.java failing due to "Connection succeeded"
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 8,9
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2016-03-10
  • Updated: 2020-07-28
  • Resolved: 2016-03-20
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 8 JDK 9 Other
8u251Fixed 9 b112Fixed openjdk7uFixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
SocketChannel/finishConnect/close 
finishConnect wait for pumping refuser ... 
java.lang.Exception: SocketChannel/finishConnect/close threw an exception 
at TestThread.finishAndThrow(TestThread.java:80) 
at AsyncCloseAndInterrupt.test(AsyncCloseAndInterrupt.java:602) 
at AsyncCloseAndInterrupt.test(AsyncCloseAndInterrupt.java:622) 
at AsyncCloseAndInterrupt.main(AsyncCloseAndInterrupt.java:720) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:520) 
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:92) 
at java.lang.Thread.run(Thread.java:804) 
Caused by: java.lang.RuntimeException: Connection succeeded 
at AsyncCloseAndInterrupt$16.doIO(AsyncCloseAndInterrupt.java:374) 
at AsyncCloseAndInterrupt$Tester.go(AsyncCloseAndInterrupt.java:485) 
at TestThread.run(TestThread.java:55) 

= = = = = = = = = = = = = = = = = = = = = = = = = = = =
SocketChannel/finishConnect/interrupt 
finishConnect wait for pumping refuser ... 
java.lang.Exception: SocketChannel/finishConnect/interrupt threw an exception 
at TestThread.finishAndThrow(TestThread.java:80) 
at AsyncCloseAndInterrupt.test(AsyncCloseAndInterrupt.java:602) 
at AsyncCloseAndInterrupt.test(AsyncCloseAndInterrupt.java:609) 
at AsyncCloseAndInterrupt.main(AsyncCloseAndInterrupt.java:720) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:520) 
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:92) 
at java.lang.Thread.run(Thread.java:804) 
Caused by: java.lang.RuntimeException: Connection succeeded 
at AsyncCloseAndInterrupt$16.doIO(AsyncCloseAndInterrupt.java:374) 
at AsyncCloseAndInterrupt$Tester.go(AsyncCloseAndInterrupt.java:485) 
at TestThread.run(TestThread.java:55) 
Comments
Fix Request (8u) This stabilizes the test and keeps codebases in sync (I see 8u251). This is a testbug, so it is not critical and can be deferred to next release. Applies cleanly to 8u, passes tier1 tests.
24-03-2020

RFR: http://mail.openjdk.java.net/pipermail/nio-dev/2016-March/003574.html
10-03-2016

It's a test issue. The issue can be reproduced locally within 50 rounds of run. Root cause: even if server's connection backlog seems to be saturated sometime, subsequent connections may still success. Suggested Fix: Pass in parameter backlog as 1 when ServerSocket calls bind to make the socket server's backlog queue as short as possible. In pumpRefuser, try to connect to refuser server as quick as possible. The fix run successfully for 1000 rounds locally. JPRT result: http://scaaa637.us.oracle.com//archive/2016/03/2016-03-04-075229.oracle.dev
10-03-2016

in Mach 5 http://java.se.oracle.com/mach5/job/9-dev-tier2-linux-x64-openonly/1379/testReport/junit/java_nio_channels_AsyncCloseAndInterrupt/java/AsyncCloseAndInterrupt/ http://java.se.oracle.com/mach5/view/9-dev-test/job/9-dev-tier2-linux-i586/858/artifact/JTwork/jdk_test/java/nio/channels/AsyncCloseAndInterrupt.jtr/*view*/ http://java.se.oracle.com/mach5/view/9-dev-test/job/9-dev-tier2-linux-x64-openonly/1734/artifact/JTwork/jdk_test/java/nio/channels/AsyncCloseAndInterrupt.jtr/*view*/ http://java.se.oracle.com/mach5/job/9-dev-tier2-linux-x64-openonly/1787/testReport/junit/java_nio_channels_AsyncCloseAndInterrupt/java/AsyncCloseAndInterrupt/ http://java.se.oracle.com/mach5/job/9-dev-tier2-linux-x64/1833/testReport/junit/java_nio_channels_AsyncCloseAndInterrupt/java/AsyncCloseAndInterrupt/
10-03-2016