JDK-8280868 : LineBodyHandlerTest.java creates and discards too many clients
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-01-28
  • Updated: 2023-01-04
  • Resolved: 2022-02-02
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 17 JDK 19
17.0.7-oracleFixed 19 b09Fixed
Related Reports
Relates :  
Description
The LineBodyHandlerTest.java creates and discards many clients (64).
The test has been observed failing intermittently on some systems (Windows 10) while trying to open the client's selector, apparently due to some connection limit (see below).

It seems that using a single client reduces the occurrences in which the test fails. 

java.io.IOException: Unable to establish loopback connection
at java.base/sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:99)
at java.base/sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:65)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
at java.base/sun.nio.ch.PipeImpl.<init>(PipeImpl.java:188)
at java.base/sun.nio.ch.WEPollSelectorImpl.<init>(WEPollSelectorImpl.java:78)
at java.base/sun.nio.ch.WEPollSelectorProvider.openSelector(WEPollSelectorProvider.java:33)
at java.base/java.nio.channels.Selector.open(Selector.java:295)
at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.<init>(HttpClientImpl.java:719)
at java.net.http/jdk.internal.net.http.HttpClientImpl.<init>(HttpClientImpl.java:323)
... 33 more
Caused by: java.net.ConnectException: Connection timed out: connect
at java.base/sun.nio.ch.Net.connect0(Native Method)
at java.base/sun.nio.ch.Net.connect(Net.java:579)
at java.base/sun.nio.ch.Net.connect(Net.java:586)
at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:853)
at java.base/java.nio.channels.SocketChannel.open(SocketChannel.java:285)
at java.base/sun.nio.ch.PipeImpl$Initializer$LoopbackConnector.run(PipeImpl.java:129)
at java.base/sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:81) 
Comments
Fix request [17u] I backport this for parity with 17.0.7-oracle. No risk, only a test change. Clean backport. Test passes. SAP nightly testing passed.
04-01-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/1019 Date: 2023-01-01 20:05:25 +0000
01-01-2023

Changeset: 47800bf3 Author: Daniel Fuchs <dfuchs@openjdk.org> Date: 2022-02-02 17:11:22 +0000 URL: https://git.openjdk.java.net/jdk/commit/47800bf3da181ae0ee612b14d95773fd1dc90350
02-02-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7263 Date: 2022-01-28 09:45:02 +0000
28-01-2022