From 1b78d59dc118f6acd20b58c64ba4b197c0a4eac4 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 13 Feb 2020 12:40:24 +0200 Subject: SL-12631 Update llteleportflags.h in the viewer to match the simulator --- indra/llmessage/llteleportflags.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llmessage') diff --git a/indra/llmessage/llteleportflags.h b/indra/llmessage/llteleportflags.h index b3fcad036e..fd1e702832 100644 --- a/indra/llmessage/llteleportflags.h +++ b/indra/llmessage/llteleportflags.h @@ -44,6 +44,8 @@ const U32 TELEPORT_FLAGS_VIA_REGION_ID = 1 << 12; const U32 TELEPORT_FLAGS_IS_FLYING = 1 << 13; const U32 TELEPORT_FLAGS_SHOW_RESET_HOME = 1 << 14; const U32 TELEPORT_FLAGS_FORCE_REDIRECT = 1 << 15; // used to force a redirect to some random location - used when kicking someone from land. +const U32 TELEPORT_FLAGS_VIA_GLOBAL_COORDS = 1 << 16; +const U32 TELEPORT_FLAGS_WITHIN_REGION = 1 << 17; const U32 TELEPORT_FLAGS_MASK_VIA = TELEPORT_FLAGS_VIA_LURE | TELEPORT_FLAGS_VIA_LANDMARK -- cgit v1.2.3 From 80fe2157fe43e46f16b33fc75ab8ef7de428d275 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 15 Aug 2020 12:36:27 +0300 Subject: SL-13783 Workaround for enqueueCoprocedure() crash with asset storage --- indra/llmessage/llcoproceduremanager.cpp | 6 ++++++ indra/llmessage/llcoproceduremanager.h | 1 + 2 files changed, 7 insertions(+) (limited to 'indra/llmessage') diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp index 74cdff2b00..e1ca388dd7 100644 --- a/indra/llmessage/llcoproceduremanager.cpp +++ b/indra/llmessage/llcoproceduremanager.cpp @@ -137,6 +137,12 @@ LLCoprocedureManager::~LLCoprocedureManager() } +void LLCoprocedureManager::initSingleton() +{ + // workaround until we get mutex into initializePool + initializePool("VAssetStorage"); +} + LLCoprocedureManager::poolPtr_t LLCoprocedureManager::initializePool(const std::string &poolName) { // Attempt to look up a pool size in the configuration. If found use that diff --git a/indra/llmessage/llcoproceduremanager.h b/indra/llmessage/llcoproceduremanager.h index 7d0e83180c..f323b16878 100644 --- a/indra/llmessage/llcoproceduremanager.h +++ b/indra/llmessage/llcoproceduremanager.h @@ -39,6 +39,7 @@ class LLCoprocedureManager : public LLSingleton < LLCoprocedureManager > { LLSINGLETON(LLCoprocedureManager); virtual ~LLCoprocedureManager(); + /*virtual*/ void initSingleton(); public: typedef boost::function SettingQuery_t; -- cgit v1.2.3 From 58ba75f6dd4c7c5c93ea9f14cef7f2194aa00e08 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 18 Aug 2020 16:00:25 +0300 Subject: SL-13783 Workaround for enqueueCoprocedure() crash #2 --- indra/llmessage/llcoproceduremanager.cpp | 11 +++++------ indra/llmessage/llcoproceduremanager.h | 1 - 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp index 0684f47df2..3f55bda1e3 100644 --- a/indra/llmessage/llcoproceduremanager.cpp +++ b/indra/llmessage/llcoproceduremanager.cpp @@ -140,12 +140,6 @@ LLCoprocedureManager::~LLCoprocedureManager() close(); } -void LLCoprocedureManager::initSingleton() -{ - // workaround until we get mutex into initializePool - initializePool("VAssetStorage"); -} - LLCoprocedureManager::poolPtr_t LLCoprocedureManager::initializePool(const std::string &poolName) { // Attempt to look up a pool size in the configuration. If found use that @@ -197,8 +191,13 @@ LLUUID LLCoprocedureManager::enqueueCoprocedure(const std::string &pool, const s void LLCoprocedureManager::setPropertyMethods(SettingQuery_t queryfn, SettingUpdate_t updatefn) { + // functions to discover and store the pool sizes mPropertyQueryFn = queryfn; mPropertyDefineFn = updatefn; + + // workaround until we get mutex into initializePool + initializePool("VAssetStorage"); + initializePool("Upload"); } //------------------------------------------------------------------------- diff --git a/indra/llmessage/llcoproceduremanager.h b/indra/llmessage/llcoproceduremanager.h index 8540ced8cc..70204ba02b 100644 --- a/indra/llmessage/llcoproceduremanager.h +++ b/indra/llmessage/llcoproceduremanager.h @@ -40,7 +40,6 @@ class LLCoprocedureManager : public LLSingleton < LLCoprocedureManager > { LLSINGLETON(LLCoprocedureManager); virtual ~LLCoprocedureManager(); - /*virtual*/ void initSingleton(); public: typedef boost::function SettingQuery_t; -- cgit v1.2.3 From e4350fb9ef1a44416f0ef7873595db41b05dafc4 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 19 Aug 2020 21:27:58 +0300 Subject: SL-13811 Crash on coroprocedure Coroprosedure should stop on 'stop' exception --- indra/llmessage/llcoproceduremanager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/llmessage') diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp index 3f55bda1e3..969cd162fb 100644 --- a/indra/llmessage/llcoproceduremanager.cpp +++ b/indra/llmessage/llcoproceduremanager.cpp @@ -415,6 +415,14 @@ void LLCoprocedurePool::coprocedureInvokerCoro( { coproc->mProc(httpAdapter, coproc->mId); } + catch (const LLCoros::Stop &) + { + LL_INFOS("CoProcMgr") << "Viewer is shutting Down. Stopping coprocedure('" << coproc->mName + << "', id=" << coproc->mId.asString() + << ") in pool '" << mPoolName << "'" << LL_ENDL; + mActiveCoprocs.erase(itActive); + throw; // let toplevel handle this as LLContinueError + } catch (...) { LOG_UNHANDLED_EXCEPTION(STRINGIZE("Coprocedure('" << coproc->mName -- cgit v1.2.3 From 2f52a37e6a240a4a950779f2ef769a4fbd3baaf5 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 22 Aug 2020 23:01:20 +0300 Subject: SL-13811 Crash on coroprocedure --- indra/llmessage/llcoproceduremanager.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp index 969cd162fb..2494c31613 100644 --- a/indra/llmessage/llcoproceduremanager.cpp +++ b/indra/llmessage/llcoproceduremanager.cpp @@ -77,12 +77,12 @@ public: /// inline size_t countActive() const { - return mActiveCoprocs.size(); + return mActiveCoprocsCount; } /// Returns the total number of coprocedures either queued or in active processing. /// - inline size_t count() const + inline S32 count() const { return countPending() + countActive(); } @@ -113,12 +113,10 @@ private: // because the consuming coroutine might outlive this LLCoprocedurePool // instance. typedef boost::shared_ptr CoprocQueuePtr; - typedef std::map ActiveCoproc_t; std::string mPoolName; - size_t mPoolSize, mPending{0}; + size_t mPoolSize, mActiveCoprocsCount, mPending; CoprocQueuePtr mPendingCoprocs; - ActiveCoproc_t mActiveCoprocs; LLTempBoundListener mStatusListener; typedef std::map CoroAdapterMap_t; @@ -281,6 +279,8 @@ void LLCoprocedureManager::close(const std::string &pool) LLCoprocedurePool::LLCoprocedurePool(const std::string &poolName, size_t size): mPoolName(poolName), mPoolSize(size), + mActiveCoprocsCount(0), + mPending(0), mPendingCoprocs(boost::make_shared(DEFAULT_QUEUE_SIZE)), mHTTPPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID), mCoroMapping() @@ -406,8 +406,7 @@ void LLCoprocedurePool::coprocedureInvokerCoro( } // we actually popped an item --mPending; - - ActiveCoproc_t::iterator itActive = mActiveCoprocs.insert(ActiveCoproc_t::value_type(coproc->mId, httpAdapter)).first; + mActiveCoprocsCount++; LL_DEBUGS("CoProcMgr") << "Dequeued and invoking coprocedure(" << coproc->mName << ") with id=" << coproc->mId.asString() << " in pool \"" << mPoolName << "\" (" << mPending << " left)" << LL_ENDL; @@ -417,10 +416,6 @@ void LLCoprocedurePool::coprocedureInvokerCoro( } catch (const LLCoros::Stop &) { - LL_INFOS("CoProcMgr") << "Viewer is shutting Down. Stopping coprocedure('" << coproc->mName - << "', id=" << coproc->mId.asString() - << ") in pool '" << mPoolName << "'" << LL_ENDL; - mActiveCoprocs.erase(itActive); throw; // let toplevel handle this as LLContinueError } catch (...) @@ -429,13 +424,13 @@ void LLCoprocedurePool::coprocedureInvokerCoro( << "', id=" << coproc->mId.asString() << ") in pool '" << mPoolName << "'")); // must NOT omit this or we deplete the pool - mActiveCoprocs.erase(itActive); + mActiveCoprocsCount--; continue; } LL_DEBUGS("CoProcMgr") << "Finished coprocedure(" << coproc->mName << ")" << " in pool \"" << mPoolName << "\"" << LL_ENDL; - mActiveCoprocs.erase(itActive); + mActiveCoprocsCount--; } } -- cgit v1.2.3 From a42045994dacbf687cb986d8f1a644f0399cffb5 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 28 Aug 2020 01:22:35 +0300 Subject: SL-13555 'Second Life quit unexpectedly' error message --- indra/llmessage/llcoproceduremanager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp index 2494c31613..26684a4d9e 100644 --- a/indra/llmessage/llcoproceduremanager.cpp +++ b/indra/llmessage/llcoproceduremanager.cpp @@ -414,8 +414,10 @@ void LLCoprocedurePool::coprocedureInvokerCoro( { coproc->mProc(httpAdapter, coproc->mId); } - catch (const LLCoros::Stop &) + catch (const LLCoros::Stop &e) { + LL_INFOS("LLCoros") << "coprocedureInvokerCoro terminating because " + << e.what() << LL_ENDL; throw; // let toplevel handle this as LLContinueError } catch (...) -- cgit v1.2.3 From 4ebba5b91845b7cccd3af697da3fd71fb0779ab5 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 2 Sep 2020 09:22:46 +0300 Subject: SL-13891 Coroutine creation was requested on exit --- indra/llmessage/llexperiencecache.cpp | 16 ++++++++-------- indra/llmessage/llexperiencecache.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/llexperiencecache.cpp b/indra/llmessage/llexperiencecache.cpp index 7d96ac4b02..64c01bd9eb 100644 --- a/indra/llmessage/llexperiencecache.cpp +++ b/indra/llmessage/llexperiencecache.cpp @@ -85,15 +85,15 @@ const F64 LLExperienceCache::DEFAULT_EXPIRATION = 600.0; const S32 LLExperienceCache::DEFAULT_QUOTA = 128; // this is megabytes const int LLExperienceCache::SEARCH_PAGE_SIZE = 30; +bool LLExperienceCache::sShutdown = false; + //========================================================================= -LLExperienceCache::LLExperienceCache(): - mShutdown(false) +LLExperienceCache::LLExperienceCache() { } LLExperienceCache::~LLExperienceCache() { - } void LLExperienceCache::initSingleton() @@ -122,7 +122,7 @@ void LLExperienceCache::cleanup() { cache_stream << (*this); } - mShutdown = true; + sShutdown = true; } //------------------------------------------------------------------------- @@ -344,7 +344,7 @@ void LLExperienceCache::requestExperiences() ostr << urlBase << "?page_size=" << PAGE_SIZE1; RequestQueue_t requests; - while (!mRequestQueue.empty()) + while (!mRequestQueue.empty() && !sShutdown) { RequestQueue_t::iterator it = mRequestQueue.begin(); LLUUID key = (*it); @@ -398,8 +398,6 @@ void LLExperienceCache::idleCoro() LL_INFOS("ExperienceCache") << "Launching Experience cache idle coro." << LL_ENDL; do { - llcoro::suspendUntilTimeout(SECS_BETWEEN_REQUESTS); - if (mEraseExpiredTimer.checkExpirationAndReset(ERASE_EXPIRED_TIMEOUT)) { eraseExpired(); @@ -410,7 +408,9 @@ void LLExperienceCache::idleCoro() requestExperiences(); } - } while (!mShutdown); + llcoro::suspendUntilTimeout(SECS_BETWEEN_REQUESTS); + + } while (!sShutdown); // The coroutine system will likely be shut down by the time we get to this point // (or at least no further cycling will occur on it since the user has decided to quit.) diff --git a/indra/llmessage/llexperiencecache.h b/indra/llmessage/llexperiencecache.h index f9ff69c2b6..1c97133723 100644 --- a/indra/llmessage/llexperiencecache.h +++ b/indra/llmessage/llexperiencecache.h @@ -142,7 +142,7 @@ private: LLFrameTimer mEraseExpiredTimer; // Periodically clean out expired entries from the cache CapabilityQuery_t mCapability; std::string mCacheFileName; - bool mShutdown; + static bool sShutdown; // control for coroutines, they exist out of LLExperienceCache's scope, so they need a static control void idleCoro(); void eraseExpired(); -- cgit v1.2.3