[asterisk-bugs] [JIRA] (ASTERISK-29505) pjsip contact handling should only process the current asterisk system

Andrew Yager (JIRA) noreply at issues.asterisk.org
Thu Jul 1 07:18:33 CDT 2021


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

Andrew Yager commented on ASTERISK-29505:
-----------------------------------------

Example log chunk showing the issue…

{code}
    -- Removed contact 'sip:106-domain1 at 1.1.1.1:5060;x-ast-txp=UDP' from AOR '106-domain1' due to expiration
  == Contact 106-domain1/sip:106-domain1 at 1.1.1.1:5060;x-ast-txp=UDP has been deleted
    -- Removed contact 'sip:107-domain2 at 1.1.1.1:5060;x-ast-txp=UDP' from AOR '107-domain2' due to expiration
    -- Removed contact 'sip:106-domain1 at 1.1.1.1:5060;x-ast-txp=UDP' from AOR '106-domain1' due to expiration
    -- Removed contact 'sip:208-domain3 at 1.1.1.1:5060;x-ast-txp=UDP' from AOR '208-domain3' due to expiration
[Jul  1 22:15:32] WARNING[2040]: res_odbc.c:538 ast_odbc_print_errors: SQL Execute returned an error: 40001: [ma-3.1.13][10.5.8-MariaDB-1:10.5.8+maria~bionic]Deadlock found when trying to get lock; try restarting transaction
[Jul  1 22:15:32] WARNING[2040]: res_odbc.c:433 ast_odbc_prepare_and_execute: SQL Execute error -1!
    -- Removed contact 'sip:212-domain3 at 1.1.1.1:5060;x-ast-txp=UDP' from AOR '212-domain3' due to expiration
    -- Removed contact 'sip:206-domain3 at 1.1.1.1:5060;x-ast-txp=UDP' from AOR '206-domain3' due to expiration
    -- Removed contact 'sip:209-domain3 at 1.1.1.1:5060;x-ast-txp=UDP' from AOR '209-domain3' due to expiration
    -- Removed contact 'sip:211-domain3 at 1.1.1.1:5060;x-ast-txp=UDP' from AOR '211-domain3' due to expiration
    -- Removed contact 'sip:202-domain3 at 1.1.1.1:5060;x-ast-txp=UDP' from AOR '202-domain3' due to expiration
[Jul  1 22:15:32] WARNING[2040]: res_odbc.c:538 ast_odbc_print_errors: SQL Execute returned an error: 40001: [ma-3.1.13][10.5.8-MariaDB-1:10.5.8+maria~bionic]Deadlock found when trying to get lock; try restarting transaction
[Jul  1 22:15:32] WARNING[2040]: res_odbc.c:433 ast_odbc_prepare_and_execute: SQL Execute error -1!
    -- Removed contact 'sip:204-domain3 at 1.1.1.1:5060;x-ast-txp=UDP' from AOR '204-domain3' due to expiration
{code}

> pjsip contact handling should only process the current asterisk system
> ----------------------------------------------------------------------
>
>                 Key: ASTERISK-29505
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29505
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_pjsip
>    Affects Versions: 18.4.0, 18.5.0
>            Reporter: Andrew Yager
>
> In a multi-server environment with PJSIP using realtime tables, each asterisk server validates and expires all contacts, even if the server is not the active server (based on the systemname).
> Each server with access to the contacts table will independently try to expire contacts at expiration time.
> This has the effect of creating frequent deadlocks on MySQL environments in high volume contact environments (maybe around 1500+) unnecessarily.
> While the specific behaviour that is here is probably complex, it seems that:
> a) only one server should expire contacts, and this should ideally be the system that actually inserted the record
> b) if that system is unavailable, I'm not sure what I think the correct behaviour should be, but given a server will not show a contact that it is not the "owner" of it probably should just do nothing



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



More information about the asterisk-bugs mailing list