-
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
AWSSDK.S3 ListObjectsV2 API returns Size incorrectly every other request for some subset of files +/- 2 bytes #3325
Comments
Upgrading to the latest AWSSDK.S3 seems to fix the issue in local testing. I do not know why, as I don't see any release notes or Pull Request history indicating issues with these two methods. I will deploy the fix to PROD tonight, and if it seems to go away over the next 3 days, will close this request. |
The problem is still happening on the latest AWSSDK.S3 nuget package. https://www.nuget.org/packages/AWSSDK.S3/3.7.308.5 Strange that I could not reproduce the problem locally. Locally, i have: dotnet --list-runtimes which returns:
On different servers, I have:
Important to note, although I am using async-await interface, my usage is serial, so the thread-safety issues with .NET 6 HttpClient members should not be relevant here if applicable. |
I've asked our IT department to patch the .NET runtime on these servers to rule out the runtime as the root cause of this bug. |
We upgraded the .NET Runtime to 6.0.31 and the bug still exists. Please do the needful and revert back if you need any confidential information with guidance on how to confidentially provide the exact bucket and prefix values. |
Closing. Sorry - this is a bug on our end. This file had more than one version, and the previous version had more bytes than the previous version. When writing the new version, we were using the old file handle, which left 2 trailing bytes from the end of the previous file. Moving to use |
Comments on closed issues are hard for our team to see. |
Describe the bug
There appears to be some prior bugs around this (see: aws/aws-cli#5216), with Amazon stating the issue is caused by third parties using the old ListObjects API. In this case, we are using ListObjectsV2 with GetObjectAsync and us-east-1 region for all requests.
Every other request, the Size is logged as either 84676 or 84674.
This is coming through a third party bucket we are licensed to data on, but I thought to log a formal public issue here for people confused by this as much as I am, and link the third party to this ticket so they can reference it in a AWS support request. This problem has been happening since 2023-03-29 04:30:11.6484437 UTC, but we only caught it today.
I'm also guessing this has caused extra data charges, given this ~84674-84676 byte file has been re-downloaded 57,265 times and counting.
Expected Behavior
S3 Object Size should not be spurious across ListObjectsV2 requests.
Current Behavior
S3 Object Size is not consistent across multiple requests.
Reproduction Steps
Example C# code - you will need to populate AwsClientConfiguration with the appropriate Region, AccessKey and SecretKey, otherwise this is a http://sscce.org/ example
Possible Solution
No idea - requires S3 Amazon Engineers to investigate.
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
AWSSDK.S3 3.5.3.2
Targeted .NET Platform
.NET 6
Operating System and version
Microsoft Windows Server 2016 Datacenter
The text was updated successfully, but these errors were encountered: