[asterisk-bugs] [JIRA] (ASTERISK-27058) Deadlock in ICE / SRTP

Michael Walton (JIRA) noreply at issues.asterisk.org
Thu Jun 15 15:53:57 CDT 2017


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

Michael Walton updated ASTERISK-27058:
--------------------------------------

    Attachment: res_rtp_asterisk-turn-deadlock-fix.patch

Patch against 13.16.0

> Deadlock in ICE / SRTP
> ----------------------
>
>                 Key: ASTERISK-27058
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27058
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_rtp_asterisk
>    Affects Versions: 13.17.0, 14.5.0
>         Environment: N/A
>            Reporter: Michael Walton
>         Attachments: res_rtp_asterisk-turn-deadlock-fix.patch
>
>
> Occasionally, when using chan_sip (and possibly PJSIP) with WebRTC ICE/SRTP and a TURN service, the Asterisk instance will encounter deadlock between the PJNATH timer_worker_thread and ioqueue_worker_thread. 
> I have a "special" version of Asterisk 11 where I've ported PJProject 2.6 because of the many deadlock issues of earlier versions of PJNATH, and found this deadlock still exists. I believe it is also as a result present in Asterisk 13 and 14. 
> The problem comes down to the classic potentially unordered use of multiple locks, for which the "group lock" was introduced in PJ (https://trac.pjsip.org/repos/ticket/1617). Unfortunately, this group lock has not been used consistently from res_rtp_asterisk. In particular, when pj_turn_sock_create() is called, it is passed a NULL instead of the existing group lock for the ICE session, causing PJ to allocate a new lock for TURN. And the potential for deadlock.



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



More information about the asterisk-bugs mailing list