[asterisk-bugs] [JIRA] Commented: (ASTERISK-20212) Deadlock / TCP SIP Stack

Mark Michelson (JIRA) noreply at issues.asterisk.org
Tue Aug 21 13:20:07 CDT 2012


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

Mark Michelson commented on ASTERISK-20212:
-------------------------------------------

I can confirm based on the backtrace and core show locks that it's the exact same situation you previously experienced.

I have uploaded two patches to this issue. Hopefully, you will only need one of them.

ASTERISK-20212_v1.patch contains a fix where for TCP connections (not TLS though) we eschew the use of FILE handles in favor of direct actions on file descriptors. This was an idea that was suggested to me by people who have seen odd behavior when trying to mix FILE handles and file descriptors together.

ASTERISK-20212_v2.patch contains the same change from ASTERISK-20212_v1.patch plus it changes the polling to only check for normal incoming data and not for priority data.

Please try ASTERISK-20212_v1.patch first and see if it appears to fix the problem. If it does, then that's great, we won't need the change from v2 at all. If you do experience the issue with v1, then revert and try v2 instead. Hopefully one of these will solve the issue.

If it turns out to solve the issue, then the patch I have provided will likely not go into the code as-is since it is designed solely to assist with SIP TCP connections. A better patch will need to be made which eliminates the use of FILE handles from all places in Asterisk where TCP/TLS connections are used.

> Deadlock / TCP SIP Stack
> ------------------------
>
>                 Key: ASTERISK-20212
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20212
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/TCP-TLS
>    Affects Versions: 10.7.0
>         Environment: CentOS 5.7 / Asterisk 10.7.0
>            Reporter: Phil Ciccone
>         Attachments: ASTERISK-20212_v1.patch, ASTERISK-20212_v2.patch, backtrace-threads-2.txt, backtrace-threads.txt, core-show-locks-2.txt, core-show-locks.txt, locked_thread_and_bt_full.txt
>
>
> We have been experiencing Asterisk deadlocks for the past week, from at the time, what seemed like nowhere. We upgraded to the latest 10.7.0 stable and enabled the debug flag and disabled optimizations in hopes to catch the deadlock. It seems from looking at the locks we have some sort of problem with our TCP connected SIP devices. Things are now starting to make sense as connecting TCP SIP devices is something newer that we started to do. The deadlocks we experience happen anywhere from every-other-day to several times a day, all involving a restart. Would you be so kind as to look at the attached backtrace and locks output?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list