[asterisk-dev] [Code Review] 2860: pjsip: race condition in registrar

Olle E Johansson reviewboard at asterisk.org
Tue Sep 17 00:19:07 CDT 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2860/#review9712
-----------------------------------------------------------


A good test would be to take five phones - or one good old Asterisk with multiple register= lines - and "turn them off and on again" (IT Crowd). That way you will create a race. Just a suggestion.

- Olle E Johansson


On Sept. 17, 2013, 12:08 a.m., Kevin Harwell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2860/
> -----------------------------------------------------------
> 
> (Updated Sept. 17, 2013, 12:08 a.m.)
> 
> 
> Review request for Asterisk Developers, Joshua Colp and Mark Michelson.
> 
> 
> Bugs: AST-1213
>     https://issues.asterisk.org/jira/browse/AST-1213
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> While handling a registration request a race condition could occur if/when two+ clients registered at the same time.  This happened when one request obtained a copy of the current contacts for an AOR and another request did the same before the first request updated.  Thus the second would update and overwrite the first (or vice-versa depending on which actually updated first).  In the case of it being the same contact two "add" events would be raised.
> 
> pjsip registration handling is now serialized to alleviate this issue.
> 
> 
> Diffs
> -----
> 
>   branches/12/res/res_pjsip_registrar.c 399015 
> 
> Diff: https://reviewboard.asterisk.org/r/2860/diff/
> 
> 
> Testing
> -------
> 
> Had a few phones register themselves with asterisk using pjsip registration.  Also ran all the pjsip registration testsuite tests and made sure they all passed.
> 
> 
> Thanks,
> 
> Kevin Harwell
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130917/2148747e/attachment-0001.htm>


More information about the asterisk-dev mailing list