[asterisk-bugs] [JIRA] (ASTERISK-27058) Deadlock in ICE / SRTP
Michael Walton (JIRA)
noreply at issues.asterisk.org
Thu Jun 15 15:33:58 CDT 2017
Michael Walton created ASTERISK-27058:
-----------------------------------------
Summary: 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: 14.5.0, 13.17.0
Environment: N/A
Reporter: Michael Walton
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 its many deadlock issues, 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