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

Joshua Colp (JIRA) noreply at issues.asterisk.org
Thu Mar 31 09:52:56 CDT 2016


Joshua Colp created ASTERISK-25885:
--------------------------------------

             Summary: 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


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 message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list