diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-08-01 01:07:51 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-08-01 01:07:51 +0300 |
commit | ef9cb58a9ea6e37f5ca8c61c258560b2ee72c8d8 (patch) | |
tree | d773f39bbdf76995b43a88a020c2c185d26b4a52 /indra | |
parent | 2531144643bfb9208d829cfb8ff0d594b9e4aaee (diff) |
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
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcommon/llcoros.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llavatarrenderinfoaccountant.cpp | 15 |
2 files changed, 14 insertions, 2 deletions
diff --git a/indra/llcommon/llcoros.cpp b/indra/llcommon/llcoros.cpp index 70d8dfc8b9..fe2adf051b 100644 --- a/indra/llcommon/llcoros.cpp +++ b/indra/llcommon/llcoros.cpp @@ -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; } diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp index 293c9d60a1..a6c9a41fa4 100644 --- a/indra/newview/llavatarrenderinfoaccountant.cpp +++ b/indra/newview/llavatarrenderinfoaccountant.cpp @@ -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) |