-
Notifications
You must be signed in to change notification settings - Fork 886
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
ByteBufferStoringSubscriber.blockingTransferTo hanging indefinitely #5755
Comments
Note that |
## Description of change This change adds a new S3Client to TestFixtures -- FaultyS3Client. The purpose of this client to inject failures to S3 Interactions and test for resiliency of the library. #### Relevant issues AWS Java SDK V2 has an issue of getting stuck time to time: aws/aws-sdk-java-v2#5755 With this PR we are reproducing a similar behaviour. In the follow-up PRs we will implement defense in depth mechanisms. #### Does this contribution introduce any breaking changes to the existing APIs or behaviors? No. #### Does this contribution introduce any new public APIs or behaviors? No. #### How was the contribution tested? This is a test contribution itself. New tests are disabled. Confirmed `./gradlew integrationTest` are still passing with the 2 trusted SDK clients and not triggered with the faulty client. #### Does this contribution need a changelog entry? No. --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the [Developer Certificate of Origin (DCO)](https://developercertificate.org/).
Hi @liuchang0520, the support case you had with us got resolved, so I'm marking this issue to auto close soon. One recommendation is to make sure to close the inputstream after the stream reading is finished. If you (or anyone else) are still experiencing this same hanging issue, please let us know, ideally also providing a self-contained repro code (we're not able to reproduce the hanging in our side). |
The inputStream is correctly closed on our application side. |
Please disregard the support case as it doesn't really capture the issue. |
## Description of change This PR adds timeout and retry logic to S3SdkObjectClient in case S3AsyncClinet cannot response to request for given time. #### Relevant issues AWS Java SDK V2 has an issue of getting stuck time to time: aws/aws-sdk-java-v2#5755 #### Does this contribution introduce any breaking changes to the existing APIs or behaviors? No #### Does this contribution introduce any new public APIs or behaviors? No #### How was the contribution tested? - Executed integration tests - Executed unit tests #### Does this contribution need a changelog entry? No #### Next Steps - In a follow-up PR, we need to make timeout configurable --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the [Developer Certificate of Origin (DCO)](https://developercertificate.org/). --------- Co-authored-by: Erdogan Ozkoca <[email protected]>
My team is also hitting this. It's hard to reproduce, as it rarely happens. Our use case is that we run spark clusters to benchmark our library: https://github.com/awslabs/analytics-accelerator-s3, and we see Spark tasks get stuck, till eventually the Spark job times out. thread dump show suspiciously similar stack trace to this one:
Wondering if it's getting stuck in this Line 128 in 6fb4cb6
|
Hey @liuchang0520 , are you using the CRT client? |
@ahmarsuhail No we are not using CRT client |
Describe the bug
Our application uses SDK v2
s3AsyncClient
to sendgetObject
request and chain futures to process the response.We noticed that the sdk client thread
sdk-async-response-*
is stuck when reading the InputStream converted byAsyncResponseTransformer.toBlockingInputStream()
.Implementation following:
Futures to read from inputStream is chained based on this
future
:Stack trace following:
A couple of questions:
s3AsyncClient.getObject
:e.g. Is there a way to specify timeout when using the S3AsyncClient to avoid indefinite blocking ?
Could we expose exception so we can handle it from client side to avoid the indefinite blocking ?
Regression Issue
Expected Behavior
We expect the reading from inputStream to be successful into the destination buffer.
Current Behavior
The inputStream reading blocks indefinitely(
software.amazon.awssdk.utils.async.ByteBufferStoringSubscriber.blockingTransferTo
)Reproduction Steps
Same as the code snippet above.
Possible Solution
No response
Additional Information/Context
No response
AWS Java SDK version used
2.27.9
JDK version used
Java 21
Operating System and version
Linux Wolfi, aarch64
The text was updated successfully, but these errors were encountered: