FIRE-34497 - Bugsplat - crash during shutdown due to null mutex.

This is evidently a race condition, not everyone is crashing and according to LL it does not repro in DeltaFPS (though it does in Atlasaurus for them too). This probably suggests that DeltaFPS just happened to move the race condition needle a little in the right direction.
master
Beq 2024-09-13 23:03:16 +01:00
parent 2824d2d23b
commit a4d6fad698
1 changed files with 12 additions and 2 deletions

View File

@ -187,8 +187,18 @@ LLPluginProcessParent::ptr_t LLPluginProcessParent::create(LLPluginProcessParent
/*static*/
void LLPluginProcessParent::shutdown()
{
LLCoros::LockType lock(*sInstancesMutex);
// <FS:Beq> FIRE-34497 - lock maybe be null during shutdown due to fiber shutdown race condition
// LLCoros::LockType lock(*sInstancesMutex);
std::unique_ptr<LLCoros::LockType> lock;
if (sInstancesMutex)
{
lock = std::make_unique<LLCoros::LockType>(*sInstancesMutex);
}
else
{
LL_WARNS("Plugin") << "shutdown called but no instances mutex available" << LL_ENDL;
}
// </FS:Beq>
mapInstances_t::iterator it;
for (it = sInstances.begin(); it != sInstances.end(); ++it)
{