[asterisk-bugs] [JIRA] (ASTERISK-20708) Deadlock in chan_sip on transfer when trying to update redirecting information

Tim Ringenbach at Asteria Solutions Group (JIRA) noreply at issues.asterisk.org
Wed Nov 21 11:37:45 CST 2012


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

Tim Ringenbach at Asteria Solutions Group commented on ASTERISK-20708:
----------------------------------------------------------------------

I found a problem with the patch.

The last sip_pvt_unlock(p) on the original line 25881 needs to be there.

Otherwise, we first lock current.chan1, violating the locking order, but then we go on to lock p again, and return p double locked instead of just locked.
                
> Deadlock in chan_sip on transfer when trying to update redirecting information
> ------------------------------------------------------------------------------
>
>                 Key: ASTERISK-20708
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20708
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/Transfers
>    Affects Versions: 11.0.1
>            Reporter: Mark Michelson
>         Attachments: ASTERISK-20708.patch
>
>
> Issue reported by marv (Tim Ringenbach) in #asterisk-dev
> There is a code path that results in an incorrect locking order between a sip_pvt and its owner channel.
> The problem is that the owner and pvt get unlocked, then the pvt gets relocked and calls change_redirecting_information(), which calls get_rdnis(), which then calls pbx_builtin_setvar_helper() on the pvt's owner.
> A patch is attached that moves where the redirecting updates occur to a place where both the pvt and owner are unlocked so that we can safely lock them in the correct order.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list