-
Notifications
You must be signed in to change notification settings - Fork 856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeMap should not close executor service in JDK19 #4395
Comments
@scrocquesel thank you for reaching out, we'll review the PR #4404. |
Same here. I have a Quarkus application, and tests are hanging forever in Jenkins because we have Java 20. Also running tests from the IDE you can detect the issue because you need to terminate the tests manually. |
Fixed via PR #4649, released in SDK version |
|
Describe the bug
With JDK19+, the first loop in the
AttributeMap::close
method could lead to deadlock waiting for the executor service to terminate in the same thread that should stop the executor service.aws-sdk-java-v2/utils/src/main/java/software/amazon/awssdk/utils/AttributeMap.java
Lines 86 to 89 in 0c5df5e
Starting JDK 19+, ExecutorService now implements AutoCloseable. I know this version is not yet supported but excluding explicitely ExecutorService from the first loop will avoid issues in the future and let users move to newer JDK version
Expected Behavior
I should be able to Close the Client and terminate the overriden executor service in this order in the same thread.
Current Behavior
The actual code lead to a deadlock
Reproduction Steps
Possible Solution
AttributeMap::close
UnmanagedScheduledExecutorService::awaitTermination
Additional Information/Context
Stack trace of the origin of the deadlock
AWS Java SDK version used
2.20.129
JDK version used
19+
Operating System and version
linux
The text was updated successfully, but these errors were encountered: