[sr-dev] [kamailio/kamailio] Kamailio crash with DMQ!? (Issue #3905)
### Description Kamailio version 5.7.4 crashed with a core file. Maybe it's related to the dmq module. Debugging Data ``` (gdb) bt full #0 atomic_inc_int (var=0x7f57) at ../../core/parser/../mem/../atomic/atomic_x86.h:236 No locals. #1 cfg_update_local (no_cbs=) at ../../core/cfg/cfg_struct.h:381 group = last_cb = 0x7f57c99545e0 prev_cb = group = last_cb = prev_cb = __func__ = "cfg_update_local" #2 worker_loop (id=id@entry=2) at worker.c:57 worker = current_job = peer_response = {resp_code = 1, content_type = {s = 0x55ea7b42cfca "\205\300\017\210\r\002", len = 15}, reason = {s = 0x0, len = 2}, body = { s = 0x7ffcf6347c30 "\001", len = 2069833640}} ret_value = not_parsed = dmq_node = 0x0 __func__ = "worker_loop" #3 0x7f57d9426a11 in child_init (rank=) at dmq.c:321 i = 2 newpid = __func__ = "child_init" #4 0x55ea7b42cfca in init_mod_child (m=0x7f57dd005640, rank=rank@entry=0) at core/sr_module.c:911 ret = 0 __func__ = "init_mod_child" #5 0x55ea7b42cfa4 in init_mod_child (m=0x7f57dd005b90, rank=rank@entry=0) at core/sr_module.c:903 ret = __func__ = "init_mod_child" #6 0x55ea7b42cfa4 in init_mod_child (m=0x7f57dd006910, rank=rank@entry=0) at core/sr_module.c:903 ret = __func__ = "init_mod_child" #7 0x55ea7b42cfa4 in init_mod_child (m=0x7f57dd006e70, rank=rank@entry=0) at core/sr_module.c:903 ret = __func__ = "init_mod_child" #8 0x55ea7b42cfa4 in init_mod_child (m=0x7f57dd008660, rank=rank@entry=0) at core/sr_module.c:903 ret = __func__ = "init_mod_child" #9 0x55ea7b42cfa4 in init_mod_child (m=0x7f57dd0089d0, rank=rank@entry=0) at core/sr_module.c:903 ret = __func__ = "init_mod_child" #10 0x55ea7b42cfa4 in init_mod_child (m=0x7f57dd008d70, rank=rank@entry=0) at core/sr_module.c:903 ret = __func__ = "init_mod_child" #11 0x55ea7b43239e in init_child (rank=rank@entry=0) at core/sr_module.c:990 ret = type = __func__ = "init_child" #12 0x55ea7b288365 in main_loop () at main.c:1929 i = pid = si = 0x0 si_desc = "udp receiver child=15 sock=172.20.21.4:5060\000\000\000\000\000H\211\064\366\374\177\000\000\301'C{\352U\000\000\276\000\000\000\002\000\000\000\017\247`{\352U\000\000\062\323b{\352U\000\000U\024\000\000\000\000\000\000\004\000_{\352U\000\000\000\272\030D\344\223ԃ\270Rc{\352U\000\000\004\000\000\000\000\000\000" nrprocs = woneinit = 1 __func__ = "main_loop" error = #13 0x55ea7b27be9e in main (argc=, argv=) at main.c:3213 cfg_stream = c = r = tmp = 0x7ffcf6349e4e "" tmp_len = -554008000 port = 32599 proto = 0 ahost = 0x0 aport = 0 options = 0x55ea7b5f2cc8 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:" ret = -1 seed = 1892320457 rfd = debug_save = debug_flag = dont_fork_cnt = n_lst = p = st = {st_dev = 0, st_ino = 0, st_nlink = 0, st_mode = 0, st_uid = 0, st_gid = 0, __pad0 = 0, st_rdev = 0, st_size = 0, st_blksize = 0, st_blocks = 0, st_atim = {tv_sec = 0, tv_nsec = 0}, st_mtim = {tv_sec = 0, tv_nsec = 0}, st_ctim = {tv_sec = 0, tv_nsec = 0}, __glibc_reserved = {0, 0, 0}} tbuf = '\000' , " ", '\000' , "\006\000\000\000\000\000\000\200", '\000' , "\006\000\000\000\000\000\000\200", '\000' ... option_index = 9 long_options = {{name = 0x55ea7b5f12ea "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x55ea7b5fa98e "version", has_arg = 0, flag = 0x0, val = 118}, { name = 0x55ea7b60a690 "alias", has_arg = 1, flag = 0x0, val = 1024}, {name = 0x55ea7b5f12ef "subst", has_arg = 1, flag = 0x0, val = 1025}, {name = 0x55ea7b5f12f5 "substdef", has_arg = 1, flag = 0x0, val = 1026}, {name = 0x55ea7b5f12fe "substdefs", has_arg = 1, flag = 0x0, val = 1027}, {name = 0x55ea7b5f1308 "server-id", has_arg = 1, flag = 0x0, val = 1028}, {name = 0x55ea7b5f1312 "loadmodule", has_arg = 1, flag = 0x0, val = 1029}, {name = 0x55ea7b5f131d "modparam", has_arg = 1, flag = 0x0, val = 1030}, { name = 0x55ea7b5f1326 "log-engine", has_arg = 1, flag = 0x0, val = 1031}, {name = 0x55ea7b5faaab "debug", has_arg = 1, flag = 0x0, val = 1032}, { name = 0x55ea7b5f1331 "cfg-print", has_arg = 0, flag = 0x0, val = 1033}, {name = 0x55ea7b5f133b "atexit", has_arg = 1, flag = 0x0, val = 1034}, { name = 0x55ea7b5f1342 "all-errors", has_arg = 0, flag = 0x0, val = 1035}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}} __func__ = "main" (gdb) info locals No locals. (gdb) list 231 in ../../core/parser/../mem
[sr-dev] [kamailio/kamailio] pkg: Add systemd template for starting multiple kamailio services (PR #3904)
Pre-Submission Checklist - [x] Commit message has the format required by CONTRIBUTING guide - [x] Commits are split per component (core, individual modules, libs, utils, ...) - [x] Each component has a single commit (if not, squash them into one commit) - [x] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated) Type Of Change - [ ] Small bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: - [x] PR should be backported to stable branches - [x] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description This PR aims to allow multiple kamailio instances with different configs to be managed by systemd. The new `kamailio@.service` is the systemd template file, where one can provide an instance name after `systemctl start kamailio@dev`, to start a new kamailio instance with name `kamailio-dev` and use config file found in `/etc/kamailio/kamailio-dev.cfg`. I tested that this file and its content can work by placing the file in `/etc/systemd/system/kamailio@.service` and using the above `dev` instance name as an example. Kamailio loads and handles any new messages along with the default kamailio service. My question right now, as I am not really familiar with the packaging workflow, is this an appropriate way to accomplish it. If yes what should be modified to install this alongside the normal `kamailio.service`. Any feedback and review is appreciated and greatly needed! Thanks! You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/3904 -- Commit Summary -- * pkg: Add systemd template for starting multiple kamailio services -- File Changes -- A pkg/kamailio/deb/debian/kamailio@.service (26) -- Patch Links -- https://github.com/kamailio/kamailio/pull/3904.patch https://github.com/kamailio/kamailio/pull/3904.diff -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3904 You are receiving this because you are subscribed to this thread. Message ID:___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:97ba5dff: db_redis: change logs on delete
Module: kamailio Branch: master Commit: 97ba5dff468fc309acc9245108a0d7645fe45361 URL: https://github.com/kamailio/kamailio/commit/97ba5dff468fc309acc9245108a0d7645fe45361 Author: Stefan-Cristian Mititelu Committer: Stefan Mititelu Date: 2024-07-03T18:27:03+03:00 db_redis: change logs on delete --- Modified: src/modules/db_redis/redis_dbase.c --- Diff: https://github.com/kamailio/kamailio/commit/97ba5dff468fc309acc9245108a0d7645fe45361.diff Patch: https://github.com/kamailio/kamailio/commit/97ba5dff468fc309acc9245108a0d7645fe45361.patch --- diff --git a/src/modules/db_redis/redis_dbase.c b/src/modules/db_redis/redis_dbase.c index 84c0c3a9459..b3624975cf4 100644 --- a/src/modules/db_redis/redis_dbase.c +++ b/src/modules/db_redis/redis_dbase.c @@ -1827,13 +1827,13 @@ static int db_redis_perform_delete(const db1_con_t *_h, km_redis_con_t *con, "performing delete\n", CON_TABLE(_h)->len, CON_TABLE(_h)->s); else - LM_WARN("performing table scan on table '%.*s' while performing " - "delete using match key " - "'%.*s' at offset %llx\n", + LM_DBG("performing table scan on table '%.*s' while performing " + "delete using match key " + "'%.*s' at offset %llx\n", CON_TABLE(_h)->len, CON_TABLE(_h)->s, ts_scan_key->len, ts_scan_key->s, (unsigned long long)ts_scan_start); for(i = 0; i < _n; ++i) { - LM_WARN(" scan key %d is '%.*s'\n", i, _k[i]->len, _k[i]->s); + LM_DBG(" scan key %d is '%.*s'\n", i, _k[i]->len, _k[i]->s); } if(db_redis_scan_query_keys(con, CON_TABLE(_h), _n, keys, keys_count, manual_keys, manual_keys_count, ts_scan_start, ts_scan_key, ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] db_redis: change logs on delete (PR #3892)
Merged #3892 into master. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3892#event-13382597550 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] db_redis: change logs on delete (PR #3892)
Thanks for reviews. Merging this. Actually if one designs the 'keys' right for a db_redis table, should get *no* full table scans (I think, at least from my tests so far). So then will get no warnings after this merge. Full table scans are actually dangerous because consume alot of kamailio PKG memory. So if one's db_redis table is big, and full scans are performed => kamailio processes won;t be able to load it in the first palce. So the WARNING for performing full table scan is still there, because of this. Tip: For location table in db_redis i got no full table scans anymore (e.g. when contact expires or when user contacts is queried) when using this key definition: ``` modparam("db_redis", "keys", "location=entry:ruid&usrdom:username,domain&timer:expires") ``` ... because index info is added in redis for 'user@domain' or for user's contact 'expires' so only those ones need to be scanned and iterated => no full scans needed -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3892#issuecomment-2206549864 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Kamailio v5.6.6 Released
Hello, Kamailio SIP Server v5.6.6 stable release is out. This is a maintenance release of the latest stable branch, 5.6, that includes fixes since the release of v5.6.5. There is no change to database schema or configuration language structure that you have to do on previous installations of v5.6.x. Deployments running previous v5.6.x versions are strongly recommended to be upgraded to v5.6.6. Note that 5.6 is now the third last stable branch, v5.6.6 being the last planned released in 5.5.x series. The latest two stable branch are 5.7 and 5.8, with v5.8.2 being released a while ago. For more details about version 5.6.6 (including links and guidelines to download the tarball or from GIT repository), visit: * https://www.kamailio.org/w/2024/07/kamailio-v5-6-6-released/ RPM, Debian/Ubuntu packages will be available soon as well. Many thanks to all contributing and using Kamailio! Cheers, Daniel -- Daniel-Constantin Mierla (@ asipto.com) twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy and Development Services Kamailio Advanced Training -- asipto.com ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org