-
Notifications
You must be signed in to change notification settings - Fork 862
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
S3 ListObjectsV2Async hangs despite cancellation token in case of network connectivity issues #3529
Comments
Hello @david-helf, Thank you for reporting the issue. Since you mentioned that this issue is non-reproducible at will, are you able to enable verbose logging for the SDK? It may provide valuable insights into the state of the operation. You could enable verbose logging by adding the following lines of code to your application before calling Amazon.AWSConfigs.LoggingConfig.LogResponses = Amazon.ResponseLoggingOption.Always;
Amazon.AWSConfigs.LoggingConfig.LogTo = Amazon.LoggingOptions.SystemDiagnostics;
Amazon.AWSConfigs.AddTraceListener("Amazon", new System.Diagnostics.ConsoleTraceListener()); Additionally, I can attempt to reproduce the issue at my end by simulating network disruptions while running your provided code snippet. Having said that, the .NET SDK is likely passing the Regards, |
hello @bhoradc, thank you for the quick response and suggestion. We will look into how we can integrate the verbose logging within our application. |
This issue has not received a response in 5 days. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled. |
@bhoradc It may take a while to retrieve the logs on our end. Could you archive any key findings from your testing in the meantime? |
@david-helf Please update once you have verbose logs or are able to come up with code which reproduces this scenario consistently. I guess @bhoradc used your code to reproduce the issue, but wasn't able to get the same error as you were getting in production environment. In your use case, SDK retry mechanism might be kicking in although this could be confirmed from verbose logs. Thanks, |
Describe the bug
In certain cases of network connectivity issues, calling AmazonS3Client.ListObjectsV2Async to get a list of files in the bucket causes the method to hang indefinitely. This occurs despite passing a CancellationToken with a timeout, which should cancel the request after the specified period. While we have not been able to reproduce the issue manually, it has intermittently occurred in production, where the call does not respect the cancellation token, leading to prolonged hangs and impacting service stability.
Regression Issue
Expected Behavior
ListObjectsV2Async is terminated after the token is cancelled
Current Behavior
ListObjectsV2Async is not terminated after the token is cancelled and hangs indefinitely
Reproduction Steps
We cannot manually reproduce the issue. Therefore i provide an example code snippet to show how we use the client.
Possible Solution
No response
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
AWSSDK.S3 3.7.305.7
Targeted .NET Platform
.NET 8
Operating System and version
Debian 12
The text was updated successfully, but these errors were encountered: