Skip to content

DefaultRateLimiter get stuck indefinitely #2949

Closed
@qqwangxiaow

Description

@qqwangxiaow

Describe the bug

We have set a 100MB upload rate limit for the AWS S3 SDK, but sometimes the upload threads get stuck
indefinitely.

config.writeRateLimiter = Aws::MakeShared<Aws::Utils::RateLimits::DefaultRateLimiter<>>("s3", 100 * 1024 * 1024);

stack

#0 0x00007fca25e097fd in nanosleep () at ../sysdeps/unix/syscall-template.S:84
#1 0x00000000005db796 in std::this_thread::sleep_for<long, std::ratio<1l, 1000l> > (__rtime=...) at /usr/include/c++/9/thread:378
#2 Aws::Utils::RateLimits::DefaultRateLimiter<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1l> >, true>::ApplyAndPayForCost (this=this@entry=0x3dc4510, cost=614)
at external/_maindata_deps_extaws/aws-cpp-sdk-core/include/aws/core/utils/ratelimiter/DefaultRateLimiter.h:115
#3 0x000000000084e9d1 in Aws::Http::CurlHttpClient::MakeRequestInternal(Aws::Http::HttpRequest&, std::shared_ptrAws::Http::Standard::StandardHttpResponse&, Aws::Utils::RateLimits::RateLimiterInterface*, Aws::Utils::RateLimits::RateLimiterInterface*) const () at external/_maindata_deps_extaws/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp:461
#4 0x0000000000851acb in Aws::Http::CurlHttpClient::MakeRequest(std::shared_ptrAws::Http::HttpRequest const&, Aws::Utils::RateLimits::RateLimiterInterface*, Aws::Utils::RateLimits::RateLimiterInterface*) const () at external/_maindata_deps_extaws/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp:719
#5 0x000000000099a26c in Aws::Client::AWSClient::AttemptOneRequest(std::shared_ptrAws::Http::HttpRequest const&, Aws::AmazonWebServiceRequest const&, char const*, char const*) const ()
at /usr/include/c++/9/bits/char_traits.h:372
#6 0x000000000099bf2e in Aws::Client::AWSClient::AttemptExhaustively(Aws::Http::URI const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod, char const*, char const*) const ()
at external/_maindata_deps_extaws/aws-cpp-sdk-core/source/client/AWSClient.cpp:225
#7 0x000000000099dc55 in Aws::Client::AWSXMLClient::MakeRequest(Aws::Http::URI const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod, char const*, char const*) const ()
at external/_maindata_deps_extaws/aws-cpp-sdk-core/source/client/AWSClient.cpp:917

Expected Behavior

restart the work

Current Behavior

stuck forever

Reproduction Steps

low probability event

Possible Solution

No response

Additional Information/Context

No response

AWS CPP SDK version used

1.7.336

Compiler and Version used

gcc-9

Operating System and version

Debian GNU/Linux 9.8 (stretch)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.closed-for-stalenessp2This is a standard priority issueresponse-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 10 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions