-
Bug
-
Resolution: Incomplete
-
P4
-
None
-
22
-
x86_64
-
linux
A DESCRIPTION OF THE PROBLEM :
Using one HttpClient instance for consequtive requesting one host leads to cumulative collecting in jdk.internal.net.http.HttpClientImpl#subscribers and after some time the jvm crahes with out of memory exception.
Normally the sunscriber removes itself via subscriber.onComplete() invocation in jdk.internal.net.http.Stream#schedule method but sometimes it not happened particulatrly when following branch visited:
private void schedule() {
private void schedule() {
...
} else {
if (stopRequested) break;
return;
}
...
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create a HttpClient instance,
2. do many post requests
3. observe unexpected subscriber instances in jdk.internal.net.http.HttpClientImpl#subscribers despite the requests have been finished
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
jdk.internal.net.http.HttpClientImpl#subscribers must be empty
ACTUAL -
jdk.internal.net.http.HttpClientImpl#subscribers cumulatively grow
FREQUENCY : always
Using one HttpClient instance for consequtive requesting one host leads to cumulative collecting in jdk.internal.net.http.HttpClientImpl#subscribers and after some time the jvm crahes with out of memory exception.
Normally the sunscriber removes itself via subscriber.onComplete() invocation in jdk.internal.net.http.Stream#schedule method but sometimes it not happened particulatrly when following branch visited:
private void schedule() {
private void schedule() {
...
} else {
if (stopRequested) break;
return;
}
...
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create a HttpClient instance,
2. do many post requests
3. observe unexpected subscriber instances in jdk.internal.net.http.HttpClientImpl#subscribers despite the requests have been finished
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
jdk.internal.net.http.HttpClientImpl#subscribers must be empty
ACTUAL -
jdk.internal.net.http.HttpClientImpl#subscribers cumulatively grow
FREQUENCY : always