[asterisk-bugs] [JIRA] (ASTERISK-21234) Deadlock when using two Local channels & fax gateway (local_queryoption)

Faidon Liambotis (JIRA) noreply at issues.asterisk.org
Mon Mar 11 12:24:01 CDT 2013


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

Faidon Liambotis updated ASTERISK-21234:
----------------------------------------

    Attachment: 3
                2

Backtrace of the two deadlocked threads.
                
> Deadlock when using two Local channels & fax gateway (local_queryoption)
> ------------------------------------------------------------------------
>
>                 Key: ASTERISK-21234
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-21234
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_local
>    Affects Versions: 11.2.1
>            Reporter: Faidon Liambotis
>         Attachments: 2, 3
>
>
> There's a corner case when using two Local channels in series and having the T.38 fax gateway enabled. It seems there's a race and eventual deadlock on two channel locks (AB/BA). This quickly brings the rest of the system down (SIP monitoring thread gets stuck as is every other operation which enumerates channels and trying to get locks on them).
> The issue is fully reproducible using a load generator in 5-10' using this purposefully trivialized dialplan:
> {code}
> [incoming]
> exten => _X.,1,Set(FAXOPT(gateway)=yes)
> exten => _X.,2,Dial(Local/${EXTEN}@local2)
> [local2]
> exten => _X.,1,Set(FAXOPT(gateway)=yes)
> exten => _X.,2,Dial(Local/${EXTEN}@local1)
> [local1]
> exten => _X.,1,Set(FAXOPT(gateway)=yes)
> exten => _X.,2,Dial(SIP/sip2/${EXTEN})
> {code}
> Attached is the backtrace for the two deadlocked threads when running with the above dialplan.
> Both threads lock their respective channels in {{ast_indicate_data}}, then race in {{local_queryoption}} and deadlock each other. The whole process of locking/unlocking in {{local_queryoption}} looks fishy and is most likely the culrpit of this deadlock.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list