[asterisk-bugs] [JIRA] (ASTERISK-25645) res_rtp_asterisk: Lock inversion
Dade Brandon (JIRA)
noreply at issues.asterisk.org
Mon Jan 4 09:14:33 CST 2016
[ https://issues.asterisk.org/jira/browse/ASTERISK-25645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=228809#comment-228809 ]
Dade Brandon commented on ASTERISK-25645:
-----------------------------------------
@jcolp is this actionable for reverting 24ae124e4 and 965a0eee from 13/master?
I haven't played with how pjproject links in 13, or looked in to their group locks -- if they've indeed merged locking of ice->stun_cfg.timer_heap->lock (previous versions locked this in on_ice_complete) and ice->mutex (requested in pj_ice_sess_send_data) then this problem would feasibly affect anyone with pjproject 2.4.5 using dtls, unless the new group lock architecture is somehow cognicient that they don't need the same structures. I feel like I'm missing something though, because that seems like a pjproject bug to me -- if they're locking around "user-space" code (the cb.on_ice_callback) that may call something quite obvious, like pj_ice_sess_send_data.
> res_rtp_asterisk: Lock inversion
> --------------------------------
>
> Key: ASTERISK-25645
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-25645
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Resources/res_rtp_asterisk
> Reporter: Steve Davies
> Attachments: deadlocked_threads.txt, experimental_anti_deadlock
>
>
> Reported by Steve Davies on asterisk-dev:
> commit 5e6b1476a087407a052f007d326c504cfeefebe7
> ASTERISK-25614
> 2 code paths which approximate the following will cause a lock-inversion deadlock:
> approximate call orders are:
> a)
> pj_timer_heap_poll (PJ_LOCK)
> ast_rtp_on_ice_complete
> ast_rtp_instance_set_remote_address
> remote_address_set
> ast_rtp_remote_address_set
> (DTLS_LOCK)
> ...
> b)
> ast_pbx...
> app_dial
> bridge...
> read
> rtp_read
> ...
> __rtp_recvfrom
> (DTLS_LOCK)
> dtls_srtp_check_pending
> __rtp_sendto
> pj_ice_sess_send_data
> (PJ_LOCK)
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list