hishamway created an issue (kamailio/kamailio#4808)
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature
requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration
file, ask on sr-users mailing list:
*
https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.kamailio.org/
If you have questions about developing extensions to Kamailio or its existing C
code, ask on sr-dev mailing list:
*
https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.kamailio.org/
Please try to fill this template as much as possible for any issue. It helps
the developers to troubleshoot the issue.
Note that an issue report may be closed automatically after about 2 months
if there is no interest from developers or community users on pursuing it, being
considered expired. In such case, it can be reopened by writing a comment that
includes
the token `/notexpired`. About two weeks before considered expired, the issue is
marked with the label `stale`, trying to notify the submitter and everyone else
that might be interested in it. To remove the label `stale`, write a comment
that
includes the token `/notstale`. Also, any comment postpone the `expire`
timeline,
being considered that there is interest in pursuing the issue.
If there is no content to be filled in a section, the entire section can be
removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a
comment).
-->
### Description
<!--
We are heavily relying on nats message to update presence info in our kamailio
server.
we have
event_route[nats:presence] {
xlog("L_INFO", "received event payload [$natsData]");
pua_json_publish($natsData);
}
$natsData varies from dialog and message-summary. Everything working fine even
pkg mem and shm memory is looking good, but we are experienceing a 2% increase
in overall memory usage of kamailio server.
upon investigation
admin@sipcore2:~$ ps aux | grep kamailio
kamailio 2640591 0.0 1.8 377628 36336 ? SNl Jun16 0:00
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640595 0.1 2.7 377820 54748 ? SN Jun16 41:54
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640596 0.1 2.7 377828 54740 ? SN Jun16 41:55
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640597 0.1 2.7 377800 54712 ? SN Jun16 42:12
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640598 0.1 2.7 377800 54764 ? SN Jun16 42:01
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640599 0.1 2.7 377820 54396 ? SN Jun16 41:51
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640600 0.1 2.7 377808 54720 ? SN Jun16 41:52
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640601 0.1 2.7 377804 54728 ? SN Jun16 42:14
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640602 0.1 2.7 377796 54804 ? SN Jun16 41:43
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640603 0.1 1.9 377628 37916 ? SN Jun16 33:56
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640604 0.1 1.9 377628 37996 ? SN Jun16 34:04
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640605 0.1 1.9 377628 38504 ? SN Jun16 33:57
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640606 0.1 1.9 377628 38544 ? SN Jun16 34:01
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640607 0.0 1.8 377628 37424 ? SN Jun16 0:46
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640608 0.0 1.7 377628 34532 ? SN Jun16 19:49
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640609 0.1 1.8 377776 36392 ? SN Jun16 29:19
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640610 0.1 1.8 377628 37220 ? SN Jun16 23:23
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640611 0.0 1.8 377628 35884 ? SN Jun16 0:16
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640612 0.0 1.8 377628 36368 ? SN Jun16 0:03
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640613 0.0 1.8 377628 36764 ? SN Jun16 0:00
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640614 0.0 1.4 377628 29420 ? SN Jun16 0:06
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640615 0.0 1.4 377628 29508 ? SN Jun16 0:08
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640616 0.0 1.6 377628 33064 ? SN Jun16 0:08
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640617 0.0 1.4 377628 29232 ? SN Jun16 0:06
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640618 0.0 1.3 377628 27160 ? SN Jun16 0:01
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640619 0.0 1.8 380140 36364 ? SN Jun16 16:09
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640620 0.0 0.8 377628 16408 ? SN Jun16 1:06
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640621 0.0 1.9 377628 39256 ? SN Jun16 7:38
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640622 0.0 1.9 377628 39444 ? SN Jun16 7:39
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640623 0.0 0.6 443240 12528 ? SNl Jun16 0:01
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640624 0.0 22.8 901992 454004 ? SNl Jun16 4:05
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640625 0.0 1.5 443164 31556 ? SNl Jun16 2:58
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640626 0.0 1.4 443164 28380 ? SNl Jun16 2:56
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640627 0.0 0.6 377628 12096 ? SN Jun16 0:00
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640628 0.0 0.8 377628 16380 ? SN Jun16 0:59
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640629 0.0 0.6 377628 12844 ? SN Jun16 0:19
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640640 0.0 0.6 377628 12844 ? SN Jun16 0:19
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640641 0.0 0.6 377628 12844 ? SN Jun16 0:20
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
kamailio 2640642 0.0 0.6 377628 13004 ? SN Jun16 0:15
/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/main.cfg -m
256 -M 32 --atexit=no
admin 3177222 0.0 0.0 3884 1908 pts/0 S+ 11:42 0:00 grep kamailio
sudo kamcmd core.ps
2640623
NATS Subscriber
2640624
NATS Subscriber
2640624 is the child process handling Nat's subscriber.
-->
### Troubleshooting
#### Reproduction
<!--
Our current configurations
# ----- nats params -----
modparam("nats", "nats_url", "NATS_URL")
modparam("nats", "num_publish_workers", 2)
modparam("nats", "subject_queue_group", "NATS_PRESENCE_SUBJECT_QUEUE_GROUP")
modparam("nats", "subject_queue_group", "NATS_SIP_USER_SUBJECT_QUEUE_GROUP")
# ----- presence params -----
modparam("presence_dialoginfo", "force_dummy_dialog", 1)
modparam("presence_xml", "force_dummy_presence", 1)
modparam("presence_xml", "force_active", 1)
modparam("presence_xml", "disable_winfo", 1)
modparam("presence_xml", "disable_bla", 1)
modparam("presence", "db_url", PRESENCE_DBURL)
modparam("presence", "db_update_period", 30)
modparam("presence", "db_table_lock_type", 0)
modparam("presence", "subs_db_mode", 2)
modparam("presence", "publ_cache", 2)
modparam("presence", "timeout_rm_subs", 1)
modparam("presence", "local_log_level", 2)
modparam("presence", "startup_mode", 1)
modparam("presence", "send_fast_notify", 1)
modparam("presence", "clean_period", 30)
modparam("presence", "cseq_offset", 0)
modparam("presence", "expires_offset", 0)
modparam("presence", "min_expires_action", 1)
modparam("presence", "min_expires", 60)
modparam("presence", "max_expires", 3600)
modparam("presence", "sip_uri_match", 1)
modparam("presence", "waitn_time", 5)
modparam("presence", "notifier_processes", 1)
modparam("presence", "force_delete", 0)
modparam("presence", "active_watchers_table", "active_watchers")
modparam("presence", "subs_remove_match", 1)
modparam("presence", "enable_dmq", 0)
modparam("presence", "pres_subs_mode", 0)
event_route[nats:presence] {
xlog("L_INFO", "received event payload [$natsData]");
pua_json_publish($natsData);
}
-->
#### Debugging Data
<!--
If you got a core dump, use gdb to extract troubleshooting data - full
backtrace,
local variables and the list of the code at the issue location.
gdb /path/to/kamailio /path/to/corefile
bt full
info locals
list
If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->
```
(paste your debugging data here)
```
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by
Kamailio, add them next, or attach to issue, or provide a link to download them
(e.g., to a pastebin site).
-->
```
(paste your log messages here)
```
#### SIP Traffic
<!--
If the issue is exposed by processing specific SIP messages, grab them with
ngrep or save in a pcap file, then add them next, or attach to issue, or
provide a link to download them (e.g., to a pastebin site).
-->
```
(paste your sip traffic here)
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally,
provide a pull request with a fix.
-->
### Additional Information
- [ ] LLM/AI Assistants were involved in discovery, analysis or submitting of
the issue
- [*] It happened in a production deployment
- [ ] It happened in a testing or development deployment
- [ ] Testing or fuzzing tools were used to generate SIP traffic when it
happened
* **Kamailio Version** - output of `kamailio -v`
```
admin@sipcore1:~$ sudo kamailio -V
version: kamailio 5.8.6 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE,
USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, Q_MALLOC,
F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT,
USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES,
TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_BUFFER_SIZE
262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 12.2.0
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu
16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `lsb_release -a` and `uname -a`)
-->
```
admin@sipcore1:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
admin@sipcore1:~$ uname -a
Linux sipcore1.local 6.1.0-32-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian
6.1.129-1 (2025-03-06) x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4808
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/[email protected]>_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the
sender!