-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
SIGABRT in Aws::S3Crt::Model::GetObjectRequest when partSize is configured to 5GB #3125
Comments
As an aside, is it possible to turn off the auto_ranged_get behaviour in S3CrtClient and do a single GET? |
What you are looking for is multipart_upload_threshold, but unfortunately it has not been exposed on cpp sdk side yet. We can use this ticket to track exposing it in crt client config. CRT uses part size as a hint to buffer pooling allocator, which is used to avoid allocating mem over and over again for buffers. by setting part size to 5gb you are blowing past the default buffer pool budget of 2gb and looks like we are missing sanity checking somewhere to error out in this case. You can increase buffer budget by setting memory_limit_in_bytes, but that will use up a lot of mem if you are setting part sizes to 5GB. In general setting part size is not a recommended approach to control when splitting happens or not. On a side note, why do you want to disable MPU behavior? Using regular low level s3 client in this case might be an alternative depending on what you want to achieve. |
Thank you @DmitriyMusatkin for looking into this.
I want to save on number of PUT/GET API calls done as every call has a cost associated to it. I know S3CrtClient is built to maximise throughput by doing MPU, but I'm ok to sacrifice it. I was thinking of still prefering to use S3CrtClient over S3Client because:
Thank you for creating a ticket to expose the Also just want to confirm, once I've set the As an additional request, it seems the low level s3_client in |
@sbiscigl I do have this issue as well. Appreciate your help! |
MPUs yes, ranges GETs no, but that configuration is exposed now and will be tagged later. researching the other questions. |
I dont think that use case is something that supported very well in crt right now. |
Thank you both for your detailed replies.
Understood, so it seems even after exposing @DmitriyMusatkin I'd just like to confirm the same with S3Client (and not S3CrtClient), as I plan to switch to using it:
Additionally, a suggestion is to document these facts in the README, about S3CrtClient vs S3Client in terms of their buffering requirements. |
Yes, multipart_upload_threshold will allow you to force crt to only do one request, but it will still need to allocate memory for the whole request. Windowing stuff affects how many reqs crt runs in parallel to not overwhelm consumer, but it will not allow you to force download to complete in 1 api call.
|
I noticed you also opened this issue here about using the non crt S3 client. We are still working on fixing that, but I wanted to ask if you had any other questions related to s3crt? |
@jmklix I'm satisfied with the details @DmitriyMusatkin shared. And decided to use the S3Client. Although had one more question on S3CrtClient: |
CRT pools buffers and has overall limit on mem consumption that is determined from the target throughput and is configurable using mem limit in bytes setting. For any target throughput < 25Gbps, mem limit is set to 2 GB. And it maxes out at 8GB for anything over 75Gbps |
Describe the bug
I want to turn off S3CrtClient's default behaviour of doing multi-range GETs and multi-part PUTs. So I set
Aws::S3Crt::ClientConfiguration.partSize set to 5GB. So that only for objects greater than 5GB, will a multi-part PUT will happen (5GB is chosen because that is the size limit of a single PUT call). Otherwise, I want only a single PUT/GET to happen for objects lesser than 5GB.
However, my application is crashing. As per the stack trace, it seems the client is automatically doing a ranged GET of 5GB in size and trying to allocate a buffer of that size, which results in an assertion failing as the buffer pool limit is only 2GB, resulting in SIGABRT.
Here's the stack trace:
Using lldb to print the meta_request->part_size:
The buffer pool limit being:
Expected Behavior
No crash should happen.
Current Behavior
Application crashes.
Reproduction Steps
Possible Solution
No response
Additional Information/Context
I also tried setting
config.downloadMemoryUsageWindow = 100 * 1024 * 1024;
but has no effect and I still see the crash.What I am looking for is to not do ranged GETs for objects smaller than 5GB. Similarly, not do multi-part PUTs for objects smaller than 5GB.
AWS CPP SDK version used
1.11.411
Compiler and Version used
Apple clang version 15.0.0 (clang-1500.3.9.4)
Operating System and version
MacOS 14.4.1
The text was updated successfully, but these errors were encountered: