[sldev] lltexturefetch.cpp patch for http-textureand/orsnowglobe
Philip Rosedale
philip at lindenlab.com
Wed May 27 17:38:08 PDT 2009
Cool stuff - can't crash it yet! It would be great if as many people as
possible can give this a try and see how it runs. See folks in the
thursday meeting where we can test it some more.
Philip
Philippe Bossut (Merov Linden) wrote:
> Hi there,
>
> Just to let everybody know that the delicate "1.23 + http-texture" merge
> is completed and I migrated the result to projects/2009/http-texture
> (aka snowglobe). The builds completed successfully and you can now pick
> the results there:
> -
> Windows: http://secondlife.com/developers/opensource/downloads/2009/http-texture/2324/Second_Life_1-23-2-2324_OSS_Setup.exe
> -
> Darwin: http://secondlife.com/developers/opensource/downloads/2009/http-texture/2324/SecondLife_1_23_2_2324_OSS.dmg
> -
> Linux: http://secondlife.com/developers/opensource/downloads/2009/http-texture/2324/SecondLife-i686-1.23.2.2324.tar.bz2
>
> Those contain steve's patch plus a couple of other fixes he contributed
> internally over the weekend.
>
> Unless folks report catastrophic crashes, we'll be using those tomorrow
> during the test sprint.
>
> Cheers,
> - Merov
>
> On May 26, 2009, at 10:13 PM, Philippe Bossut (Merov Linden) wrote:
>
>> 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: sldev-bounces at lists.secondlife.com
>>> <mailto:sldev-bounces at lists.secondlife.com>
>>> [mailto:sldev-bounces at lists.secondlife.com] 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
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Policies and (un)subscribe information available here:
> http://wiki.secondlife.com/wiki/SLDev
> Please read the policies before posting to keep unmoderated posting privileges
More information about the SLDev
mailing list