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

Joshua Colp (JIRA) noreply at issues.asterisk.org
Mon Dec 18 10:42:08 CST 2017


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

Joshua Colp updated ASTERISK-23554:
-----------------------------------

    Affects Version/s: 13.18.4

> [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, 13.18.4
>            Reporter: Tzafrir Cohen
>         Attachments: pri_destroy_span_nolock.patch, pri_destroy_span_prilist.patch, pri_destroy_span_threads.patch, sigpri_handle_enodev_1.patch, sigpri_handle_enodev.patch, test.sh
>
>
> 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