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

Krzysztof Trempala (JIRA) noreply at issues.asterisk.org
Mon Dec 27 05:40:44 CST 2021


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

Krzysztof Trempala updated ASTERISK-29821:
------------------------------------------

    Status: Waiting for Feedback  (was: Waiting for Feedback)

Patch is OK. No deadlocks in the 30 minute test.

> 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
>            Assignee: Krzysztof Trempala
>              Labels: patch
>         Attachments: ASTERISK-29821.diff
>
>
> 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