[OpenSER-Devel] need advice for avp lock

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Oct 23 16:51:46 CEST 2007


Hi Di-Shi,

So you access this info from a callback and not from onreply 
route...What callback it is?

Regards,
Bogdan

Di-Shi Sun wrote:
> Hi Henning,
>
> Our case is like this:
> 1. Our tm call back function was triggered by out 180 and 200. The interval
> between 180 and 200 was so short.
> 2. The call back function accessed a set of AVPs and set a flag (in AVP
> value) for every AVP to mark these AVPs were comsumed. This flag made these
> AVPs to be used only once. Since the call back function was called twice at
> almost the same time, the race condition happned that some AVPs were used
> twice.
>
> According the source code, we believe that USE_PTHREAD_MUTEX lock set is
> thread safe and can be used for AVP. But the default lock set is FAST_LOCK.
> We do not know if it can be used for AVP.
>
> Regards,
>
> Di-Shi Sun.
>
> ----- Original Message ----- 
> From: "Henning Westerholt" <henning.westerholt at 1und1.de>
> To: "Di-Shi Sun" <di-shi at transnexus.com>
> Cc: <devel at openser.org>; "Support of TransNexus" <support at transnexus.com>
> Sent: Tuesday, October 23, 2007 9:35 PM
> Subject: Re: [OpenSER-Devel] need advice for avp lock
>
>
>   
>> On Thursday 18 October 2007, Di-Shi Sun wrote:
>>     
>>> Hi Henning,
>>>
>>> I believe we met the same problem. For us, only one flag in an AVP (5
>>>       
> AVPs
>   
>>> for a call) is set and the logic is simple. So, we did not meet a crash
>>> condition. It happened 17 times in a 1M call test at 50 cps.
>>>
>>> Klaus Darilion suggested we read the tm code for the AVP lock. I will
>>>       
> study
>   
>>> it.
>>>       
>> I've studied this code too, but i found nothing helpful. What kind of
>>     
> error
>   
>> you've observed? In your first mail you spoke about a race condition, is
>>     
> the
>   
>> wrong AVP value accessed?
>>
>> Cheers,
>>
>> Henning
>>
>>
>>     
>
>
>
> _______________________________________________
> Devel mailing list
> Devel at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/devel
>
>   




More information about the Devel mailing list