[asterisk-bugs] [JIRA] (ASTERISK-25645) res_rtp_asterisk: Lock inversion
Steve Davies (JIRA)
noreply at issues.asterisk.org
Thu Dec 24 04:22:32 CST 2015
[ https://issues.asterisk.org/jira/browse/ASTERISK-25645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Davies updated ASTERISK-25645:
------------------------------------
Attachment: deadlocked_threads.txt
On investigation I found 3 threads that are locking up, but that does make sense.
Thread 36 is the PJ callback on ICE complete, which holds the PJ group lock, and wants the DTLS lock.
Threads 34 and 3 are Asterisk RTP threads which call dtls_srtp_check_pending() with the DTLS lock, and IF this results in a write via pj_ice_sess_send_data(), will subsequently require the PJ group lock.
ASTERISK-25275 suggests that disabling the group lock might be a thing, but that seems to fly in the face of everything sane :-O
> 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: Joshua Colp
> Attachments: deadlocked_threads.txt
>
>
> 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