-
Type:
Bug
-
Resolution: Not an Issue
-
Priority:
P4
-
Affects Version/s: 15, 16
-
Component/s: core-libs
-
generic
-
generic
ADDITIONAL SYSTEM INFORMATION :
Adopt Open JDK 11 to Adopt Open JDK 15
A DESCRIPTION OF THE PROBLEM :
When using `thenApply` in a `CompletableFuture` and calling a method in the `thenApply` that happens to use a `Stream` and *two* filters, a deadlock occurs.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Clone https://github.com/dhinojosa/bug-httpclient-stream
2. Either run:
a. mvn clean compile exec:java -Dexec.mainClass="com.xyzcorp.httpclient.Runner"
b. mvn test
3. Notice the deadlock
4. Goto CountryFunctions#findLanguagesByRegion
5. Comment out one of the filters, there will be no more deadlock
6. Comment out both filters, there will also be no more deadlock
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Should run
ACTUAL -
Deadlock
FREQUENCY : always
Adopt Open JDK 11 to Adopt Open JDK 15
A DESCRIPTION OF THE PROBLEM :
When using `thenApply` in a `CompletableFuture` and calling a method in the `thenApply` that happens to use a `Stream` and *two* filters, a deadlock occurs.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Clone https://github.com/dhinojosa/bug-httpclient-stream
2. Either run:
a. mvn clean compile exec:java -Dexec.mainClass="com.xyzcorp.httpclient.Runner"
b. mvn test
3. Notice the deadlock
4. Goto CountryFunctions#findLanguagesByRegion
5. Comment out one of the filters, there will be no more deadlock
6. Comment out both filters, there will also be no more deadlock
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Should run
ACTUAL -
Deadlock
FREQUENCY : always