-
Bug
-
Resolution: Fixed
-
P4
-
11.0.5
-
b20
-
x86
-
linux_redhat_7.0
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8256281 | 13.0.6 | Yuri Nesterenko | P4 | Resolved | Fixed | b01 |
JDK-8247688 | 11.0.9-oracle | Daniel Fuchs | P4 | Resolved | Fixed | b01 |
JDK-8248469 | 11.0.9 | Daniel Fuchs | P4 | Resolved | Fixed | b01 |
ADDITIONAL SYSTEM INFORMATION :
REH 7,6, Java 11.0.5
A DESCRIPTION OF THE PROBLEM :
java.net HTTP/2 client does not decrease stream count when receives 204 response and consequently the IOException "too many concurrent streams" will be thrown
It is noted that 11.0.1 works with no problems
REGRESSION : Last worked in version 11
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Create an HTTP/2 server that returns 204 response
2) Create a client that call the server continuously until an exception is thrown
3) Start the server
4) Start the client
5) Observe the exception when the calls reaches the limit set by the server during HTTP/2 handshake
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The client to call the server with no problems after reaching the limit
ACTUAL -
The IOException "too many concurrent streams" will be thrown
---------- BEGIN SOURCE ----------
public class Http2clientApplicationTests {
@Test
public void test204() throws KeyManagementException, NoSuchAlgorithmException, IOException, InterruptedException {
// Disable host name and cert verification.
final Properties sysProps = System.getProperties();
sysProps.setProperty("jdk.internal.httpclient.disableHostnameVerification", Boolean.TRUE.toString());
sysProps.setProperty("jdk.internal.httpclient.debug",Boolean.TRUE.toString());
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(null, new TrustManager[]{
new X509TrustManager() {
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
return null;
}
public void checkClientTrusted(
java.security.cert.X509Certificate[] certs, String authType) {
}
public void checkServerTrusted(
java.security.cert.X509Certificate[] certs, String authType) {
}
}
}, new SecureRandom());
HttpClient client = HttpClient.newBuilder()
.version(Version.HTTP_2)
.sslContext(sslContext)
.build();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://localhost:8443/"))
.DELETE()
.build();
try {
while (true) {
HttpResponse<String> response = client.send(request, BodyHandlers.ofString());
assertThat(response.statusCode() == 204);
}
}
catch (IOException ex) {
assertThat(ex.getMessage().equals("too many concurrent streams"));
}
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
use 11.0.1
FREQUENCY : always
REH 7,6, Java 11.0.5
A DESCRIPTION OF THE PROBLEM :
java.net HTTP/2 client does not decrease stream count when receives 204 response and consequently the IOException "too many concurrent streams" will be thrown
It is noted that 11.0.1 works with no problems
REGRESSION : Last worked in version 11
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Create an HTTP/2 server that returns 204 response
2) Create a client that call the server continuously until an exception is thrown
3) Start the server
4) Start the client
5) Observe the exception when the calls reaches the limit set by the server during HTTP/2 handshake
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The client to call the server with no problems after reaching the limit
ACTUAL -
The IOException "too many concurrent streams" will be thrown
---------- BEGIN SOURCE ----------
public class Http2clientApplicationTests {
@Test
public void test204() throws KeyManagementException, NoSuchAlgorithmException, IOException, InterruptedException {
// Disable host name and cert verification.
final Properties sysProps = System.getProperties();
sysProps.setProperty("jdk.internal.httpclient.disableHostnameVerification", Boolean.TRUE.toString());
sysProps.setProperty("jdk.internal.httpclient.debug",Boolean.TRUE.toString());
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(null, new TrustManager[]{
new X509TrustManager() {
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
return null;
}
public void checkClientTrusted(
java.security.cert.X509Certificate[] certs, String authType) {
}
public void checkServerTrusted(
java.security.cert.X509Certificate[] certs, String authType) {
}
}
}, new SecureRandom());
HttpClient client = HttpClient.newBuilder()
.version(Version.HTTP_2)
.sslContext(sslContext)
.build();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://localhost:8443/"))
.DELETE()
.build();
try {
while (true) {
HttpResponse<String> response = client.send(request, BodyHandlers.ofString());
assertThat(response.statusCode() == 204);
}
}
catch (IOException ex) {
assertThat(ex.getMessage().equals("too many concurrent streams"));
}
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
use 11.0.1
FREQUENCY : always
- backported by
-
JDK-8247688 java.net HTTP/2 client does not decrease stream count when receives 204 response
- Resolved
-
JDK-8248469 java.net HTTP/2 client does not decrease stream count when receives 204 response
- Resolved
-
JDK-8256281 java.net HTTP/2 client does not decrease stream count when receives 204 response
- Resolved