From 2ea8591bd1e62a7f03b0c76eed413ee7c87511bb Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Wed, 22 Apr 2026 20:41:59 +0300 Subject: p#475 Excess texture fetch shutdown logging --- indra/newview/lltexturefetch.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview/lltexturefetch.cpp') diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 51ade60827..144940c705 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -1297,7 +1297,7 @@ bool LLTextureFetchWorker::doWork(S32 param) else { mCanUseCapability = false; - if (gDisconnected) + if (gDisconnected || LLAppViewer::isExiting()) { // We lost connection or are shutting down. mCanUseHTTP = false; @@ -1315,6 +1315,12 @@ bool LLTextureFetchWorker::doWork(S32 param) else { mCanUseCapability = false; + if (gDisconnected || LLAppViewer::isExiting()) + { + // We lost connection or are shutting down. + mCanUseHTTP = false; + return true; // abort + } mRegionRetryAttempt++; mRegionRetryTimer.setTimerExpirySec(CAP_MISSING_EXPIRATION_DELAY); // This will happen if not logged in or if a region deoes not have HTTP Texture enabled -- cgit v1.3 From a3c380acd9256102730574afb261aa6266f9a2a5 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Thu, 13 Aug 2026 21:28:58 +0300 Subject: #6135 Make sure texture worker cleanup is reliable and that two threads won't race t delete same request --- indra/newview/lltexturefetch.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'indra/newview/lltexturefetch.cpp') diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 144940c705..a0d7aac3f3 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -2527,18 +2527,26 @@ S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const L { LL_DEBUGS("Avatar") << " requesting " << id << " " << w << "x" << h << " discard " << desired_discard << " type " << f_type << LL_ENDL; } - LLTextureFetchWorker* worker = getWorker(id); + + // Potentially we might remove a request, lock queue here instead + // of getWorker to make sure request will persist till removeRequest + lockQueue(); + LLTextureFetchWorker* worker = getWorkerAfterLock(id); if (worker) { if (worker->mHost != host) { LL_WARNS(LOG_TXT) << "LLTextureFetch::createRequest " << id << " called with multiple hosts: " << host << " != " << worker->mHost << LL_ENDL; - removeRequest(worker, true); + size_t erased_1 = mRequestMap.erase(worker->mID); + llassert_always(erased_1 > 0); + unlockQueue(); + worker->scheduleDelete(); worker = NULL; return CREATE_REQUEST_ERROR_MHOSTS; } } + unlockQueue(); S32 desired_size; std::string exten = gDirUtilp->getExtension(url); @@ -2717,9 +2725,11 @@ void LLTextureFetch::deleteAllRequests() } LLTextureFetchWorker* worker = mRequestMap.begin()->second; - unlockQueue() ; + size_t erased_1 = mRequestMap.erase(worker->mID); + llassert_always(erased_1 > 0); + unlockQueue(); - removeRequest(worker, true); + worker->scheduleDelete(); } } -- cgit v1.3