[asterisk-bugs] [JIRA] (ASTERISK-23554) [patch]deadlock on forced disconnect of DAHDI PRI span

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Mon Apr 28 15:47:18 CDT 2014


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

Richard Mudgett commented on ASTERISK-23554:
--------------------------------------------

sig_pri cannot use anything in chan_dahdi as it is a lower module and intended to be statically linked with a parent channel driver which may not be chan_dahdi.


> [patch]deadlock on forced disconnect of DAHDI PRI span
> ------------------------------------------------------
>
>                 Key: ASTERISK-23554
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-23554
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_dahdi
>    Affects Versions: SVN, 12.1.1
>            Reporter: Tzafrir Cohen
>         Attachments: pri_destroy_span_nolock.patch, pri_destroy_span_prilist.patch, pri_destroy_span_threads.patch, sigpri_handle_enodev.patch
>
>
> There is a deadlock on the locks of iflock (the chan_dahdi lock of the interfaces list) and pri->lock of the specific span.
> Path 1:
> DAHDI_EVENT_REMOVED received on a B channel. Later on:
> do_monitor
> dahdi_destroy_channel_range (takes iflock)
> destroy_dahdi_pvt
> dahdi_unlink_pri_pvt (tries to take pri->lock)
> Path 2:
> pri_dchannel (takes pri->lock)
> sig_pri_handle_dchan_exception
> my_handle_dchan_exception (handling DAHDI_EVENT_REMOVED)
> pri_destroy_span
> dahdi_destroy_channel_range (tries to take iflock)
> It seems that this is esy to reproduce as DAHDI will emit a DAHDI_EVENT_REMOVED in response to any ioctl on a channel in a device that has been removed.



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



More information about the asterisk-bugs mailing list