Hi,

Thanks for the feedback Sheet. This is great!

I'm in the process of merging fixes from 1.23 as well as this and  
other fixes steve and bao did on http-texture. I'm planning to get the  
whole merge completed by tomorrow noon (I hit a couple of conflicts  
and broken unit tests I needed to fix). If all goes as planned, we  
should have that spiffy new build to play with for the test sprint  
Thursday :)

Cheers,
- Merov

On May 26, 2009, at 6:13 PM, Sheet Spotter wrote:

> The patch that Steve Linden provided resolves the deadlock I  
> detailed in the
> comments of VWR-13437.
>
> The patch releases a mutex earlier, prior to making one of the calls  
> that
> led to the deadlock. Releasing the mutex earlier eliminates that  
> deadlock.
>
> Previously the HTTP-Texture viewer would hang on me after only a few  
> minutes
> of moving my camera using Alt-Mouse. After manually applying the  
> patch I
> have been unable to hang the viewer.
>
> Thank you Steve!
>
>
> Sheet Spotter
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Steve  
> Bennetts
> Sent: May 26, 2009 11:54 AM
> To: Second Life Developer Mailing List
> Subject: Re: [sldev] lltexturefetch.cpp patch for http-texture
> and/orsnowglobe
>
> So, adding that lock exposed a flaw in the logic resulting in a
> deadlock. Below is the fix for that. The problem was that
> LLTextureCache::update() was keeping the mutex protecting mReaders[]  
> and
> mWriters[] locked while calling completed() in the responders, however
> readComplete() and writeComplete() (calls to which get triggered by  
> the
> responders) do their own locking of the mutex, triggering the  
> deadlock.
> There is no reason for the mutex to be locked while calling these
> completed() functions.
>
> -Steve
>
>
> Index: lltexturecache.cpp
> ===================================================================
> --- lltexturecache.cpp    (revision 121571)
> +++ lltexturecache.cpp    (revision 121572)
> @@ -779,6 +779,9 @@
>         }
>     }
>
> +    unlockWorkers();
> +
> +    // call 'completed' with workers list unlocked (may call
> readComplete() or writeComplete()
>     for (responder_list_t::iterator iter1 = completed_list.begin();
>          iter1 != completed_list.end(); ++iter1)
>     {
> @@ -787,8 +790,6 @@
>         responder->completed(success);
>     }
>
> -    unlockWorkers();
> -
>     return res;
> }
>
>
>
> Steve Bennetts wrote:
>> We will be applying this patch next week, but if someone wants to  
>> play,
>> I just discovered this major bug in lltexturefetch.cpp:
>>
>> void LLTextureFetchWorker::callbackDecoded(bool success, LLImageRaw*
>> raw, LLImageRaw* aux)
>> {
>> +    LLMutexLock lock(&mWorkMutex);
>>
>>    ...
>>
>>
>> The missing mutex lock here can cause all sorts of terrible  
>> artifacts.
>> Don't know if this will fix everything, but it definitely addresses  
>> at
>> least one of the crashes I have been seeing.
>>
>> -Steve
>>
>>
>> _______________________________________________
>> Policies and (un)subscribe information available here:
>> http://wiki.secondlife.com/wiki/SLDev
>> Please read the policies before posting to keep unmoderated posting
> privileges
>>
> _______________________________________________
> Policies and (un)subscribe information available here:
> http://wiki.secondlife.com/wiki/SLDev
> Please read the policies before posting to keep unmoderated posting
> privileges
>
> _______________________________________________
> Policies and (un)subscribe information available here:
> http://wiki.secondlife.com/wiki/SLDev
> Please read the policies before posting to keep unmoderated posting  
> privileges

_______________________________________________
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/SLDev
Please read the policies before posting to keep unmoderated posting privileges

Reply via email to