[asterisk-bugs] [JIRA] (ASTERISK-24356) Directed pickup causes deadlock

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Mon Sep 29 17:07:28 CDT 2014


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

Richard Mudgett updated ASTERISK-24356:
---------------------------------------

    Attachment: jira_asterisk_24356_v13.patch

[^jira_asterisk_24356_v13.patch] - Patch that suspends the PJSIP channel serializer thread before starting a masquerade involving that channel.  This avoids the deadlock while the masquerade is fixing up the private channel pointers.

> Directed pickup causes deadlock
> -------------------------------
>
>                 Key: ASTERISK-24356
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24356
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_pjsip
>    Affects Versions: 13.0.0-beta2
>            Reporter: Richard Mudgett
>            Assignee: Richard Mudgett
>         Attachments: backtrace.txt, core_show_locks.txt, jira_asterisk_24356_v13.patch
>
>
> Performing a directed pickup of PJSIP channels can result in a deadlock.
> Steps to reproduce:
> # Party A(100) calls Party B(200)
> # External process uses an AMI Originate to have Party C(202) pickup the call to Party B.
> # When Party C answers, a deadlock is likely to happen.
> Party B and C happen to be Digium D40 phones.
> Sample extensions.conf:
> {noformat}
> [connected_line_send]
> exten = s,1,NoOp(Connected line update)
> same = n,Return
> [call_pickup]
> exten = s,1,NoOp(Directed pickup)
> same = n,PickupChan(${PICKUP_CHAN})
> same = n,Hangup()
> [default]
> exten = 200,1,NoOp(Party A calling Party B)
> same = n,Set(__CONNECTED_LINE_SEND_SUB=connected_line_send,s,1)
> same = n,Dial(PJSIP/200,30,kKtT)
> same = n,Hangup()
> {noformat}
> AMI Originate to pickup call to Party B
> {noformat}
> Action: Originate
> CallerID: PBX <0>
> Channel: PJSIP/202
> Timeout: 30000
> Context: call_pickup
> Exten: s
> Priority: 1
> Account: pickmeup
> Variable: PICKUP_CHAN=PJSIP/200
> {noformat}
> The deadlock is between the channel masquerade to pickup the call and the PJSIP channel processing a 180 Ringing message.
> I think a recent change made this deadlock more likely to happen.



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



More information about the asterisk-bugs mailing list