[asterisk-dev] Fwd: [asterisk-commits] mjordan: branch 12 r426995 - /branches/12/res/res_stasis.c
Joshua Colp
jcolp at digium.com
Mon Nov 3 09:08:08 CST 2014
Matthew Jordan wrote:
> On Sun, Nov 2, 2014 at 3:29 PM, Matthew Jordan<mjordan at digium.com> wrote:
>> On Sun, Nov 2, 2014 at 1:27 AM, Corey Farrell<git at cfware.com> wrote:
>>> If it's possible for apps_registry to be NULL then it's possible for the
>>> condition to race. Maybe we need to use AO2_GLOBAL_OBJ_STATIC? Could this
>>> issue apply to the other global containers in this module (app_controls,
>>> app_bridges, app_bridges_moh, app_bridges_playback)?
>>>
>> I haven't been able to trigger a crash with anything else. I'm
>> hesitant to pull out AO2_GLOBAL_OBJ_STATIC, simply because it adds a
>> reasonable chunk of overhead on a container that should never be NULL
>> unless you are in the middle of an unload operation.
>>
>
> I thought about this some more this weekend, and I think you're
> actually right. Really, all of the global containers here should be
> protected in some fashion by an AO2_GLOBAL_OBJ_STATIC.
AO2_GLOBAL_OBJ_STATIC uses a read/write lock and the time it's accessed
should be relatively small enough that meh - penalty shouldn't be that
bad for this sorta stuff. That was my personal concern when I saw you
mention that.
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
More information about the asterisk-dev
mailing list