JDK-8161991 : (ch) java/nio/channels/AsynchronousSocketChannel/Basic.java failed due to RuntimeException: WritePendingException expected
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 8u381,9,10
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • CPU: x86_64
  • Submitted: 2016-07-21
  • Updated: 2023-08-17
  • Resolved: 2018-04-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 11
11 b11Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8304588 :  
Description
----------System.out:(6/163)----------
-- bind --
-- socket options --
-- connect --
-- asynchronous close when connecting --
-- asynchronous close when reading --
-- asynchronous close when writing --
----------System.err:(13/773)----------
java.lang.RuntimeException: WritePendingException expected
	at Basic.testCloseWhenPending(Basic.java:343)
	at Basic.main(Basic.java:61)
	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:533)
	at com.sun.javatest.regtest.agent.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:226)
	at java.lang.Thread.run(java.base@9-ea/Thread.java:843)

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

result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: WritePendingException expected


test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: WritePendingException expected

Comments
URL: http://hg.openjdk.java.net/jdk/jdk/rev/799e6e42b95f User: mli Date: 2018-04-20 07:16:58 +0000
20-04-2018

This could be a timing issue in the test. It is not inconceivable that current line 344 try { ch.write(genBuffer()); // line 344 throw new RuntimeException("WritePendingException expected"); } catch (WritePendingException x) { } completes between invocations of the infinite sequence of write(ByteBuffer,A,CompletionHandler) initiated at current line 330.
17-02-2017