[asterisk-bugs] [JIRA] (ASTERISK-28997) res_pjsip: Asterisk locks up and stops processing any SIP requests

Yury Kirsanov (JIRA) noreply at issues.asterisk.org
Tue Jul 21 18:38:25 CDT 2020


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

Yury Kirsanov commented on ASTERISK-28997:
------------------------------------------

cat /etc/asterisk/sorcery.conf 
[res_pjsip]
 
; maximum_objects:  How many object to allow in the cache at 1 time.
; expire_on_reload:  If res_pjsip is reloaded, should the cache be flushed?
; object_lifetime_maximum; How long should an object remain in the cache before it's flushed.
 
; There is only ever 1 row in the ps_globals table but it's referenced heavily and rarely
; changes.  You may choose to leave this in pjsip.conf and comment out these 2 lines.
; On recent versions of Asterisk, the global section is only read on a pjsip reload which
; effectively caches the settings without an expiration time.
;global/cache=memory_cache,maximum_objects=2,expire_on_reload=yes,object_lifetime_maximum=3600
;global=config,pjsip.conf,criteria=type=global
 
; There is only ever 1 row in the ps_systems table and it's not referenced after startup.
; You may chose to leave this in pjsip.conf and comment out these 2 lines.
;system/cache=memory_cache,maximum_objects=2,expire_on_reload=yes,object_lifetime_maximum=3600
;system=config,pjsip.conf,criteria=type=system
 
; endpoints, aors, and auths are heavily read objects but are only written to when their
; configuration is changed.  Set the maximum_objects to the number of extensions, plus the
; number of peered PBXes, plus the number of hosts defined for all providers (a provider
; with 10 hosts defined will use 10 endpoints, 10 aors and 1 auth).  Add a few to spare.
; When a configuration change is made to an object, the specific object is flushed from the
; cache so the object_lifetime_maximum of 15 minutes is just a fail-safe.
endpoint/cache=memory_cache,maximum_objects=3000,expire_on_reload=yes,object_lifetime_maximum=900
endpoint=config,pjsip.conf,criteria=type=endpoint
 
aor/cache=memory_cache,maximum_objects=3000,expire_on_reload=yes,object_lifetime_maximum=900
aor=config,pjsip.conf,criteria=type=aor
 
auth/cache=memory_cache,maximum_objects=3000,expire_on_reload=yes,object_lifetime_maximum=900
auth=config,pjsip.conf,criteria=type=auth
 
; contacts are both read from and written to regularly by Asterisk.
contact/cache=memory_cache,maximum_objects=3000,expire_on_reload=yes,object_lifetime_maximum=900
contact=astdb,registrator
 
 
[res_pjsip_endpoint_identifier_ip]
; There will be 1 ip identifier for each host across all providers plus 1 for each peered PBX.
identify/cache=memory_cache,maximum_objects=150,expire_on_reload=yes,object_lifetime_maximum=900
identify=config,pjsip.conf,criteria=type=identify
 
 
[res_pjsip_outbound_registration]
; There could be 1 outbound registration for each host across all providers depending on whether
; the provider requires them.
registration/cache=memory_cache,maximum_objects=150,expire_on_reload=yes,object_lifetime_maximum=900
registration=config,pjsip.conf,criteria=type=registration

[res_pjsip_outbound_publish]
outbound-publish/cache=memory_cache,maximum_objects=150,expire_on_reload=yes,object_lifetime_maximum=900
outbound-publish=config,pjsip.conf,criteria=type=outbound-publish


> res_pjsip: Asterisk locks up and stops processing any SIP requests
> ------------------------------------------------------------------
>
>                 Key: ASTERISK-28997
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28997
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_pjsip, Resources/res_sorcery_memory_cache
>    Affects Versions: 16.11.1
>         Environment: Ubuntu Linux 18.04.4 LTS, kernel 4.15.0-111-generic
>            Reporter: Yury Kirsanov
>            Assignee: Yury Kirsanov
>            Severity: Minor
>              Labels: fax
>         Attachments: backtrace-threads.txt, taskprocessors.txt, threads.txt
>
>
> Hi,
> We have a problem with one of many of our Asterisk-based servers. From time to time it just locks up and stops processing SIP messages, complaining about pjsip/distributor queue has reached 500 scheduled tasks. We have several servers based on same Asterisk version with exactly the same environment, but different Asterisk configuration files, some have more SIP devices and more complex dial plans, some has less.
> This issue happens at any time of the day and I don't see any way to reproduce it. There is no segfault generated as Asterisk keeps running, the only thing is that all distributor queues are overflown for some reason.
> After Asterisk restart it starts to work like nothing happened. I've checked all network interfaces and there is no DDoS attack or anything like that.
> Our Asterisk is patched with ASTERISK-28923 patch and it's the same server that was segfaulting before. Other similar servers are running unpatched version of Asterisk 16.11.1.
> I'm attaching debug logs that I was able to grab during this lockup. Asterisk was compiled with 'NO_DEBUG' option.
> Please let me know if I can provide any additional information or recompile Asterisk with some additional debug versions. Thanks!



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



More information about the asterisk-bugs mailing list