[asterisk-bugs] [JIRA] (ASTERISK-24540) Presence Causes Deadlock

Matt Jordan (JIRA) noreply at issues.asterisk.org
Mon Feb 16 12:01:36 CST 2015


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

Matt Jordan commented on ASTERISK-24540:
----------------------------------------

{quote}
It appears that Asterisk 11 performs a lookup on the realtime database for every call when the peer is defined in realtime. It also looks like this is the case when cache is enabled also. 
{quote}

It depends on how the peers are configured.

If the inbound request can be matched based on the user name in the {{From}} field, then the peer should be found. However, if this misses, then the peer will be looked for in realtime, which will typically result in two DB queries: one to get the peer by the user name; if that fails, another to get it by IP address. If both of those fail, *then* we look to see if we can match the peer statically by IP address. If that fails, we try realtime again (even though it most likely will fail).

This is sub-optimal; at the same time, there are a lot of nasty traps in that code. I would suspect that changing it and not breaking a lot of things would be non-trivial.

I'm fine accepting this issue on that notion, but without a well written and well tested patch, I doubt this issue will get much traction - particularly when {{chan_pjsip}} generally handles this case better already.

> Presence Causes Deadlock
> ------------------------
>
>                 Key: ASTERISK-24540
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24540
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/General
>    Affects Versions: 1.8.32.0, 11.14.0, 11.14.1, 13.2.0
>         Environment: CentOS 6.4, CentOS 6.5, CentOS 7
>            Reporter: Ross Beer
>            Assignee: Ross Beer
>         Attachments: backtrace-threads_21-11-2014-clean.txt, backtrace-threads-clean_server2.txt, backtrace-threads-clean.txt, lsof_24-11-2014_1158.txt, server2_additional_debug.txt, threads.txt
>
>
> We are experiencing an issue where the SIP channel driver pauses and does not allow further registrations or calls to progress.
> Looking at core dumps shows lock waits for app_dial and presence.
> Unfortunately asterisk had not been compiled with the correct settings so I will need to provide further back traces when the issue happens again, however have attached the files I have now.



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



More information about the asterisk-bugs mailing list