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

Matthias Hensler (JIRA) noreply at issues.asterisk.org
Tue Dec 28 04:06:44 CST 2021


    [ https://issues.asterisk.org/jira/browse/ASTERISK-29821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=257490#comment-257490 ] 

Matthias Hensler commented on ASTERISK-29821:
---------------------------------------------

Just to chime in here. When updating from 18.8.0 to 18.9.0 we ran into a deadlock too after only some hours of usage. Since I hadn't any sensible debug output at the time I rolled back to 18.8.0 and had no issues since then.

I suspect that our deadlock was the same problem and looking forward to have above patch included into 18.10.0 (not sure if I can give a shot before that unfortunately, as I have to wait until holidays are over here).

> 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: Joshua C. Colp
>              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