SL-18623 LLAvatarRenderInfoAccountant coroutine crash

For unknown reason allocations of these coroutines often crash on client machines.
1. Limit quantity of coros running in parallel by reducing retries and wait time
2. Print out more diagnostic info
master
Andrey Kleshchev 2023-08-01 01:07:51 +03:00
parent 2531144643
commit ef9cb58a9e
2 changed files with 14 additions and 2 deletions

View File

@ -282,6 +282,7 @@ std::string LLCoros::launch(const std::string& prefix, const callable_t& callabl
catch (std::bad_alloc&)
{
// Out of memory on stack allocation?
printActiveCoroutines();
LL_ERRS("LLCoros") << "Bad memory allocation in LLCoros::launch(" << prefix << ")!" << LL_ENDL;
}

View File

@ -79,8 +79,14 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoGetCoro(std::string url, U64
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("AvatarRenderInfoAccountant", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
// Going to request each 15 seconds either way, so don't wait
// too long and don't repeat
httpOpts->setRetries(0);
httpOpts->setTimeout(SECS_BETWEEN_REGION_REQUEST);
LLSD result = httpAdapter->getAndSuspend(httpRequest, url, httpOpts);
LLWorld *world_inst = LLWorld::getInstance();
if (!world_inst)
@ -190,6 +196,11 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(std::string url, U
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("AvatarRenderInfoAccountant", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
// Going to request each 60+ seconds, timeout is 30s.
// Don't repeat too often, will be sending newer data soon
httpOpts->setRetries(1);
LLWorld *world_inst = LLWorld::getInstance();
if (!world_inst)
@ -256,7 +267,7 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(std::string url, U
regionp = NULL;
world_inst = NULL;
LLSD result = httpAdapter->postAndSuspend(httpRequest, url, report);
LLSD result = httpAdapter->postAndSuspend(httpRequest, url, report, httpOpts);
world_inst = LLWorld::getInstance();
if (!world_inst)