[asterisk-bugs] [JIRA] (ASTERISK-29821) Deadlock in bridge_channel_internal_join() on local channels.

Joshua C. Colp (JIRA) noreply at issues.asterisk.org
Mon Dec 27 04:46:44 CST 2021


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

Joshua C. Colp updated ASTERISK-29821:
--------------------------------------

    External Issue ID:   (was: ASTERISK-2974)

> Deadlock in bridge_channel_internal_join() on local channels.
> -------------------------------------------------------------
>
>                 Key: ASTERISK-29821
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29821
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/Bridging
>    Affects Versions: 18.9.0
>         Environment: Ubuntu 20.04
>            Reporter: Krzysztof Trempala
>
> We've had a couple instances of a deadlocks. Deadlocks in function bridge_channel_internal_join() on local channels.
> {noformat} 
>  [Thread_1]                                          [Thread_2]
>      |                                                   |
>  bridge_channel_internal_join(bridge_channel1)           |
>    ..                                                    |
>    ast_bridge_lock(bridge_channel1->bridge1);            |
>    bridge_channel1->chan <= "local_chan;1"               |
>    ast_channel_lock(bridge_channel1->chan);              |
>    peer = ast_local_get_peer(bridge_channel1->chan);     |
>    peer <= "local_chan;2"                                |
>      |                                                   |
>      |                                               bridge_channel_internal_join(bridge_channel2)
>      |                                                 ..  
>      |                                                 ast_bridge_lock(bridge_channe2->bridge2);
>      |                                                 bridge_channel2->chan <= "local_chan;2"
>      |                                                 ast_channel_lock(bridge_channel2->chan);
>      |                                                 peer = ast_local_get_peer(bridge_channel2->chan);
>      |                                                 peer <= "chan_local;1"
>      |                                                  ..
>      |                                                 ast_channel_lock(peer);  <== wait for lock on "chan_local;1"
>      | 
>      |
>    ast_channel_lock(peer);  <== wait for lock "local_chan;2" <== DEADLOCK
> {noformat} 



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



More information about the asterisk-bugs mailing list