[asterisk-bugs] [JIRA] (ASTERISK-25885) res_pjsip: Race condition between adding contact and automatic expiration

George Joseph (JIRA) noreply at issues.asterisk.org
Mon Apr 11 16:31:56 CDT 2016


     [ https://issues.asterisk.org/jira/browse/ASTERISK-25885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Joseph closed ASTERISK-25885.
------------------------------------


> res_pjsip: Race condition between adding contact and automatic expiration
> -------------------------------------------------------------------------
>
>                 Key: ASTERISK-25885
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25885
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_pjsip, Resources/res_pjsip_registrar
>    Affects Versions: 13.8.0
>            Reporter: Joshua Colp
>            Assignee: George Joseph
>
> There exists a race condition between res_pjsip_registrar and the code which expires contacts when querying contacts of an AOR. It is possible for the registrar thread and another thread to both retrieve and delete the contact. This is problematic given the following scenario:
> 1. Registrar retrieves contacts
> 2. Other thread retrieves contacts
> 3. Registrar causes deletion of expired contacts
> 4. Registrar adds new contacts
> 5. Other thread deletes expired contacts (as it has stale/old contacts)
> 6. Newly added contacts are gone that were expired
> This requires the same contacts to be expired and added, and for it to happen close.
> This is seen often enough in the tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/ tests.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list