-
Notifications
You must be signed in to change notification settings - Fork 39
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
The CRT detects the beginning of JVM destroy but doesn’t manage graceful shutdown properly #861
Comments
PS. If I change to |
I might have encountered similar issue. My codebase has an operation to read s3 file using Does CRT eventloop depend on JVM shutdown signal? how can we debug it? I am using
Thanks Update: |
Functionality related to the CRT is ref-counted. By default, the ref count starts at one (https://github.com/awslabs/aws-crt-java/blob/main/src/main/java/software/amazon/awssdk/crt/CRT.java#L406) and is decremented by a shutdown hook (https://github.com/awslabs/aws-crt-java/blob/main/src/main/java/software/amazon/awssdk/crt/CRT.java#L64C1-L70C12). If you want CRT logic to run past the initial shutdown signal, you need to add your own reference (https://github.com/awslabs/aws-crt-java/blob/main/src/main/java/software/amazon/awssdk/crt/CRT.java#L419-L426) and release it when no more work remains. |
Describe the bug
If the JVM receives a shutdown signal, the client does not stop properly.
Regression Issue
Expected Behavior
after the shutdown signal, it should cancel the current connections and inform the user about it.
Current Behavior
nothing happens after the shutdown signal, and it's stuck forever.
Reproduction Steps
Here is an example of the quarkus application with sqs sync client using aws-crt
Possible Solution
No response
Additional Information/Context
No response
aws-crt-java version used
2.29.23
Java version used
Corretto 21.0.5-amzn
Operating System and version
MacOS 15.2
The text was updated successfully, but these errors were encountered: