<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [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:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Possible fix for #4345 .
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4346
-- Commit Summary --
* core: check and recover if broken circular list
-- File Changes --
M src/core/timer.c (71)
M src/modules/tm/timer.c (9)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4346.patchhttps://github.com/kamailio/kamailio/pull/4346.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4346
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4346(a)github.com>
Hello,
recently I added a new option that can be set for an integer
modparam: PARAM_USE_SHM (i.e., PARAM_INT | PARAM_USE_SHM). The pointer
given in the exports structure has to be the address of a pointer to an
int. The result is that the modparam will allocated an integer in shared
memory and store the provided value there. It makes it possible to change
the value at runtime via the new rpc command: modparam.setn.
An example of use is the keylog_mode parameter from tls module.
This should simplify coding in the future when one needs to add a new int
parameter that can be changed at runtime, without need to code the full set
of allocating shared memory and implementing dedicated rpc commands.
There are several such parameters already (e.g., all these modparams to
enable/disable features like for sipdump), they can be reviewed if they
should be migrated or not, but it is also fine to be kept like they are,
some of they might have custom processing behind the rpc command.
Cheers,
Daniel
--
Daniel-Constantin Mierla - https://www.asipto.com
- Kamailio Consultancy And Training Services -
https://twitter.com/miconda - https://www.linkedin.com/in/miconda
Hello,
there is (still) some incoherence in dispatcher module regarding the
marking of a destination (e.g., to inactive state) and execution of
event route.
First, which I tried to address earlier today, was that ds_mark_dst()
was taking in consideration the value of ds_probing_threshold, which was
intended for keepalives, so the use of the function was not having any
effect (as documented) till it was used so many times as the parameter
value, probably not noticed so far because the default value for the
parameter is 1. Similar would be for setting destination active and the
value of ds_inactive_threshold.
Going on the same execution path as with setting the state of a
destination based on keepalives, the use of ds_mark_dst() results in
running the event routes, which I am not sure it is really expected. But
then, setting the state of a destination via RPC is not running event
routes and it was done immediately via reinitialising the state, without
any relation to ds_probing_threshold or ds_inactive_threshold.
So the questions would be:
1) the documented way is the expected one on admin-instructed state
update (via config functions or rpc), respectively do it immediately,
without considering ds_probing_threshold or ds_inactive_threshold? It is
like now in git master branch, but for many years the config functions
took in consideration the parameters.
2) shall event routes be executed only on SIP keepalives, or also on
admin-instructed state update (via config functions or rpc)? Or leave it
only for keepalives and config functions, like it is now, with updating
documentation to be clear.
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com
<!--
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…
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.o…
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 now using kamailio on the edge as a presence proxy to scale presence. We have 3 internal kamailio instances handling the actual subscriptions and publishing. This works well, however, once per 24-36hours we experience a crash on the border proxy instance. We did not experience this when using the border proxy as a presence server (there was no proxying SUBSCRIBE).
### Troubleshooting
#### Reproduction
I believe this is happening when a customers network randomly experiences issues where it doesn't receive our replies to subscribes (and continues to send a subscribe). Logs are below.
#### 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.
-->
Here's the output while replacing any sensitive info in the payload.
```
GNU gdb (Debian 13.1-3) 13.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/kamailio...
Reading symbols from /usr/lib/debug/.build-id/ce/c19d0ed1a928e4e25a84ae20d77e9c904a4892.debug...
warning: Can't open file /dev/zero (deleted) during file-backed mapping note processing
[New LWP 26]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `kamailio -DD -E -m 8000 -M 512 -f /etc/kamailio/kamailio.cfg -P /var/run/kamail'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 via_builder (len=len@entry=0x7ffed7e3ecb8, msg=msg@entry=0x7ff9529548b0, send_info=send_info@entry=0x7ff764d20bb0, branch=branch@entry=0x7ffed7e3ecc0, extra_params=0x0,
hp=hp@entry=0x7ffed7e3ebb0) at core/msg_translator.c:2910
2910 core/msg_translator.c: No such file or directory.
(gdb) bt full
#0 via_builder (len=len@entry=0x7ffed7e3ecb8, msg=msg@entry=0x7ff9529548b0, send_info=send_info@entry=0x7ff764d20bb0, branch=branch@entry=0x7ffed7e3ecc0, extra_params=0x0,
hp=hp@entry=0x7ffed7e3ebb0) at core/msg_translator.c:2910
via_len = <optimized out>
extra_len = <optimized out>
line_buf = <optimized out>
max_len = <optimized out>
via_prefix_len = <optimized out>
address_str = <optimized out>
port_str = 0x0
send_sock = 0x0
comp_len = <optimized out>
comp_name_len = <optimized out>
port = <optimized out>
proto = <optimized out>
ip = {af = 536870912, len = 0, u = {addrl = {534820896, 1586192}, addr32 = {534820896, 0, 1586192, 0}, addr16 = {47136, 8160, 0, 0, 13328, 24, 0, 0},
addr = " \270\340\037\000\000\000\000\0204\030\000\000\000\000"}}
from = 0x0
local_addr = {s = {sa_family = 16, sa_data = "#\000\000\000\000\000\020\000\000\000\000\000\000"}, sin = {sin_family = 16, sin_port = 35, sin_addr = {s_addr = 0},
sin_zero = "\020\000\000\000\000\000\000"}, sin6 = {sin6_family = 16, sin6_port = 35, sin6_flowinfo = 0, sin6_addr = {__in6_u = {
__u6_addr8 = "\020\000\000\000\000\000\000\000\003\000\000\000\000\000\000", __u6_addr16 = {16, 0, 0, 0, 3, 0, 0, 0}, __u6_addr32 = {16, 0, 3, 0}}},
sin6_scope_id = 3000082688}, sas = {ss_family = 16,
__ss_padding = "#\000\000\000\000\000\020\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000\000\241\321\262cg\357`@\000\000\000\000\000\000\000X\f-\177!V\000\000\020\016\217R\371\177\000\000\001\000\000\000!V\000\000*\000\000\000\000\000\000\000\001\000\000\000\376\177\000\000\004\360;\177!V\000\000\250,A\177!V\000\000\000\355\343\327\376\177\000\000\000\241\321\262cg\357`h\256\006R\371\177\000", __ss_align = 94701866020241}}
con = 0x0
rxavp = 0x0
xname = {s = 0x0, len = -2141140176}
__func__ = "via_builder"
#1 0x000056217f155030 in create_via_hf (len=len@entry=0x7ffed7e3ecb8, msg=msg@entry=0x7ff9529548b0, send_info=send_info@entry=0x7ff764d20bb0, branch=branch@entry=0x7ffed7e3ecc0)
at core/msg_translator.c:3232
via = <optimized out>
extra_params = {s = 0x0, len = 0}
hp = {host = 0x56217f4fb380 <default_global_address>, port = 0x56217f4fb370 <default_global_port>}
sbuf = "\331\023\000\000\001", '\000' <repeats 18 times>
--Type <RET> for more, q to quit, c to continue without paging--info locals
slen = <optimized out>
xparams = <optimized out>
id_buf = <optimized out>
id_len = 0
__func__ = "create_via_hf"
__llevel = <optimized out>
__kld = <optimized out>
#2 0x000056217f1592f7 in build_req_buf_from_sip_req (msg=msg@entry=0x7ff9529548b0, returned_len=returned_len@entry=0x7ffed7e3eeac, send_info=send_info@entry=0x7ff764d20bb0,
mode=mode@entry=128) at core/msg_translator.c:2096
len = 581
new_len = <optimized out>
received_len = 0
rport_len = 0
uri_len = 0
via_len = 0
body_delta = 0
line_buf = 0x0
received_buf = 0x0
rport_buf = 0x0
new_buf = 0x0
buf = 0x56217f5866c0 <buf> "SUBSCRIBE sip:74@sip.domain.co SIP/2.0\r\nVia: SIP/2.0/UDP 12.171.207.82:25744;branch=z9hG4bK1805670803;rport\r\nFrom: \"Heather Myers\" <sip:1086448@sip.domain.co>;tag=1805518213\r\nTo: <sip:74@sip.domain.co>\r\nCa"...
path_buf = {s = 0x0, len = 0}
offset = 0
s_offset = 0
size = <optimized out>
via_anchor = 0x7ff952951300
via_lump = <optimized out>
via_rm = <optimized out>
via_insert_param = 0x0
path_anchor = <optimized out>
path_lump = <optimized out>
branch = {s = 0x7ff952954ed8 "z9hG4bKc7ed.5819b4295fe83f981a2fc19b7f739d7e.0", len = 46}
flags = 262273
--Type <RET> for more, q to quit, c to continue without paging--list
udp_mtu = <optimized out>
di = {send_sock = 0x0, to = {s = {sa_family = 18608, sa_data = "\225R\371\177\000\000\002\000\023\331\n4\001\r"}, sin = {sin_family = 18608, sin_port = 21141, sin_addr = {
s_addr = 32761}, sin_zero = "\002\000\023\331\n4\001\r"}, sin6 = {sin6_family = 18608, sin6_port = 21141, sin6_flowinfo = 32761, sin6_addr = {__in6_u = {
__u6_addr8 = "\002\000\023\331\n4\001\r\000\000\000\000\000\000\000", __u6_addr16 = {2, 55571, 13322, 3329, 0, 0, 0, 0}, __u6_addr32 = {3641901058, 218182666, 0, 0}}},
sin6_scope_id = 0}, sas = {ss_family = 18608, __ss_padding = "\225R\371\177\000\000\002\000\023\331\n4\001\r", '\000' <repeats 103 times>, __ss_align = 0}}, id = 0,
send_flags = {f = 0, blst_imask = 0}, proto = 0 '\000', proto_pad0 = 0 '\000', proto_pad1 = 0}
ret = <optimized out>
__func__ = "build_req_buf_from_sip_req"
error00 = <optimized out>
#3 0x00007ff951fbe90d in prepare_new_uac (t=t@entry=0x7ff764d20880, i_req=i_req@entry=0x7ff9529548b0, branch=branch@entry=0, uri=<optimized out>, uri@entry=0x7ff9529548e8,
path=<optimized out>, path@entry=0x7ff952954f60, next_hop=<optimized out>, fsocket=0x7ff9528f0e10, snd_flags=..., fproto=<optimized out>, flags=<optimized out>,
instance=<optimized out>, ruid=<optimized out>, location_ua=<optimized out>) at ./src/modules/tm/t_fwd.c:482
shbuf = 0x0
add_rm_backup = <optimized out>
body_lumps_backup = <optimized out>
parsed_uri_bak = {user = {
s = 0x56217f5866ce <buf+14> "74(a)sip.domain.co SIP/2.0\r\nVia: SIP/2.0/UDP 12.171.207.82:25744;branch=z9hG4bK1805670803;rport\r\nFrom: \"Heather Myers\" <sip:1086448@sip.domain.co>;tag=1805518213\r\nTo: <sip:74@sip.domain.co>\r\nCall-ID: 0_18056"..., len = 2}, passwd = {s = 0x0, len = 0}, host = {
s = 0x56217f5866d1 <buf+17> "sip.domain.co SIP/2.0\r\nVia: SIP/2.0/UDP 12.171.207.82:25744;branch=z9hG4bK1805670803;rport\r\nFrom: \"Heather Myers\" <sip:1086448@sip.domain.co>;tag=1805518213\r\nTo: <sip:74@sip.domain.co>\r\nCall-ID: 0_18056078"..., len = 11}, port = {s = 0x0, len = 0}, params = {s = 0x0, len = 0}, sip_params = {s = 0x0, len = 0}, headers = {
s = 0x0, len = 0}, port_no = 0, proto = 0, type = SIP_URI_T, flags = 0, transport = {s = 0x0, len = 0}, ttl = {s = 0x0, len = 0}, user_param = {s = 0x0, len = 0}, maddr = {
s = 0x0, len = 0}, method = {s = 0x0, len = 0}, lr = {s = 0x0, len = 0}, r2 = {s = 0x0, len = 0}, gr = {s = 0x0, len = 0}, transport_val = {s = 0x0, len = 0}, ttl_val = {
s = 0x0, len = 0}, user_param_val = {s = 0x0, len = 0}, maddr_val = {s = 0x0, len = 0}, method_val = {s = 0x0, len = 0}, lr_val = {s = 0x0, len = 0}, r2_val = {s = 0x0,
len = 0}, gr_val = {s = 0x0, len = 0}}
ret = -1
len = 32761
parsed_uri_ok_bak = <optimized out>
free_new_uri = 1
msg_uri_bak = {s = 0x0, len = 0}
dst_uri_bak = {s = 0x7ff9529525f0 "sip:10.52.1.13:5081", len = 19}
dst_uri_backed_up = 1
path_bak = {s = 0x0, len = 0}
free_path = 1
instance_bak = {s = 0x0, len = 0}
```
#### 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).
-->
```
ERROR 2025-01-10T06:00:31.847348563Z [resource.labels.containerName: kamailio] 8(28) CRITICAL: {1 1 SUBSCRIBE 0_1907143137(a)192.168.100.28} tm [timer.h:188]: _set_fr_retr(): already added: 0x7ff763e62250 , tl=0x7ff763e62270!!!
ERROR 2025-01-10T06:00:31.847388483Z [resource.labels.containerName: kamailio] 8(28) CRITICAL: {1 1 SUBSCRIBE 0_1907143137(a)192.168.100.28} tm [t_fwd.c:1613]: t_send_branch(): BUG: retransmission already started for: 0x7ff763e62250
ERROR 2025-01-10T06:00:31.847394809Z [resource.labels.containerName: kamailio] 8(28) ERROR: {1 1 SUBSCRIBE 0_1907143137(a)192.168.100.28} sl [sl_funcs.c:428]: sl_reply_error(): stateless error reply used: No error (0/SL)
ERROR 2025-01-10T06:00:31.847400738Z [resource.labels.containerName: kamailio] 8(28) BUG: {1 1 SUBSCRIBE 0_1907143137(a)192.168.100.28} tm [t_lookup.c:2052]: t_unref(): REQ_ERR DELAYED should have been caught much earlier for 0x7ff763e61f70: 24 (hex 18)
ERROR 2025-01-10T06:00:47.346744773Z [resource.labels.containerName: kamailio] 45(65) ERROR: <core> [core/tcp_main.c:4818]: tcpconn_main_timeout(): connect 64.63.142.90:12190 failed (timeout)
ERROR 2025-01-10T06:00:58.274915089Z [resource.labels.containerName: kamailio] 45(65) CRITICAL: <core> [core/pass_fd.c:281]: receive_fd(): EOF on 20
ERROR 2025-01-10T06:01:02.715789076Z [resource.labels.containerName: kamailio] 0(1) ALERT: <core> [main.c:805]: handle_sigs(): child process 26 exited by a signal 11
ERROR 2025-01-10T06:01:02.715827333Z [resource.labels.containerName: kamailio] 0(1) ALERT: <core> [main.c:809]: handle_sigs(): core was generated
ERROR 2025-01-10T06:01:02.718815287Z [resource.labels.containerName: kamailio] 45(65) CRITICAL: <core> [core/pass_fd.c:281]: receive_fd(): EOF on 25
ERROR 2025-01-10T06:01:02.720985493Z [resource.labels.containerName: kamailio] 45(65) CRITICAL: <core> [core/pass_fd.c:281]: receive_fd(): EOF on 23
ERROR 2025-01-10T06:01:02.725450552Z [resource.labels.containerName: kamailio] 45(65) CRITICAL: <core> [core/pass_fd.c:281]: receive_fd(): EOF on 30
```
#### 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
I can atleast say that when this segfault happens that these logs are always present right before the crash. However, I also see instances of these logs without a crash immediately following.
On the proxy we are doing this is withindlg route to send subscribes to the presence route:
```
if KSR.is_SUBSCRIBE() and KSR.is_myself_ruri() then
-- in-dialog subscribe requests
ksr_route_presence();
KSR.x.exit();
end
```
Any then this is our ksr_route_presence():
```
function ksr_route_presence()
if not KSR.is_SUBSCRIBE() then return 1; end
local fuser = KSR.kx.get_fuser();
if fuser=='' then
KSR.xlog.xinfo('Subscription attempt without username from IP ' .. KSR.kx.get_srcip() .. ' - Rejecting\n');
KSR.sl.sl_send_reply(404, 'Not Found');
KSR.x.exit();
end
KSR.pv.sets('$avp(s:tenant)', string.match(fuser, '-(.*)'));
local setId = '6' .. KSR.kx.get_def('DEFAULT_DISPATCH_SET');
local modeId = '7';
if KSR.dispatcher.ds_select_dst(setId, modeId)<0 then
KSR.sl.send_reply(404, 'No destination');
KSR.x.exit();
end
KSR.corex.set_send_socket(KSR.kx.get_def('PRIVATE_LISTEN_IP') .. ':' .. KSR.kx.get_def('INTERNAL_PORT'));
KSR.tm.t_on_failure('ksr_route_rtf_dispatch');
ksr_route_relay();
end
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.8.4 (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`)
-->
```
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
```
```
Linux gke-us-south1-external-sip-800ca69e-qyb3 5.15.0-1048-gke #53-Ubuntu SMP Tue Nov 28 00:39:01 UTC 2023 x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4102
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4102(a)github.com>
stefan-mititelu-idt created an issue (kamailio/kamailio#4345)
<!--
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…
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.o…
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
Crash in kamailio 5.8.5 due to broken "next" pointer of circular double linked list of expired timers.
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
-
#### Reproduction
Not easily reproducible
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### 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.
-->
```
(gdb) bt full
#0 timer_list_expire (slow_mark=<optimized out>, slow_l=0x7ff891b59d60, h=0x7ff891b56ff0, t=<optimized out>) at core/timer.c:850
tl = 0x7ff89d214810
ret = <optimized out>
tl = <optimized out>
ret = <optimized out>
#1 timer_handler () at core/timer.c:925
saved_ticks = <optimized out>
run_slow_timer = 0
i = <optimized out>
saved_ticks = <optimized out>
run_slow_timer = <optimized out>
i = <optimized out>
__func__ = "timer_handler"
__llevel = <optimized out>
__kld = {v_facility = <optimized out>, v_level = <optimized out>, v_lname = <optimized out>, v_fname = <optimized out>, v_fline = <optimized out>, v_mname = <optimized out>,
v_func = <optimized out>, v_locinfo = <optimized out>, v_pid = <optimized out>, v_pidx = <optimized out>}
__llevel = <optimized out>
__kld = {v_facility = <optimized out>, v_level = <optimized out>, v_lname = <optimized out>, v_fname = <optimized out>, v_fline = <optimized out>, v_mname = <optimized out>,
v_func = <optimized out>, v_locinfo = <optimized out>, v_pid = <optimized out>, v_pidx = <optimized out>}
#2 timer_main () at core/timer.c:963
No locals.
#3 0x000055e671830461 in main_loop () at main.c:1933
i = <optimized out>
pid = <optimized out>
si = 0x0
si_desc = "udp receiver child=15 sock=x.x.x.x:5080 (y.y.y.y:5080)", '\000' <repeats 16 times>, "\002\000\000\000\004\000\000\000\n_\022:\372\177\000\000\003\000\000\000\000\000\000\000\000kt\234s8\b\rThu Jul \a\000\000\000\000\000\000"
nrprocs = <optimized out>
woneinit = 1
__func__ = "main_loop"
error = <optimized out>
#4 0x000055e671824ff2 in main (argc=<optimized out>, argv=<optimized out>) at main.c:3257
cfg_stream = <optimized out>
c = <optimized out>
r = <optimized out>
tmp = 0x7ffe2850be85 ""
tmp_len = 0
port = 5060
proto = 0
aproto = 0
ahost = 0x0
aport = 0
options = 0x55e671bacd30 ":f:cm:M:dVIhEeb:B:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:"
ret = -1
seed = 1220594137
rfd = <optimized out>
debug_save = <optimized out>
debug_flag = <optimized out>
--Type <RET> for more, q to quit, c to continue without paging--
dont_fork_cnt = <optimized out>
n_lst = <optimized out>
p = <optimized out>
st = {st_dev = 22, st_ino = 1081, st_nlink = 2, st_mode = 16888, st_uid = 109, st_gid = 115, __pad0 = 0, st_rdev = 0, st_size = 40, st_blksize = 4096, st_blocks = 0,
st_atim = {tv_sec = 1751525619, tv_nsec = 801181720}, st_mtim = {tv_sec = 1751525619, tv_nsec = 117175705}, st_ctim = {tv_sec = 1751525636, tv_nsec = 937332387},
__glibc_reserved = {0, 0, 0}}
l1 = <optimized out>
tbuf = "\000\000\000\000\000\000\000\000\030\"U(\376\177\000\000\000\000\000\000 ", '\000' <repeats 27 times>, "\001\000\000\000\000\000\000\000\366u\256\003\001", '\000' <repeats 67 times>, "\060Wj\242\372\177\000\000\004\000\000\024\000\000\000\000@!k\242\372\177", '\000' <repeats 138 times>, "\020\000\000\000\000\000\000\000 \265P(\376\177\000\000\020\000\000\000\376\177\000\000\060\265P(\376\177\000\000\370\264P(\376\177\000\000x\221\205\242\372\177\000\000\300\t\000\000\300\t\000\000x\221\205\242\372\177\000\000\300\t\000\000\300\t\000\000L\206\204\242\372\177\000\000\300\t\000\000\300\t\000\000L\206\204\242\372\177\000\000\300\t\000\000\300\t\000\000\300\t\000\000\300\t\000\000\377\377\377\377\000\000\000\000\020_\202\242\372\177\000\000H\000\000\000\000\000\000\000\312<k\242\372\177\000\000`\200\205\242d\000\000\000\000kt\234s8\b\r\377\377\377\377\000\000\000\000j[j\242\372\177\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\000\000\000\200\000\000\000\000\000\377\377\377\377\377\377\377\377\377\265\360\000\000\000\000\000\302\000\000\000\000\000\000"
option_index = 12
long_options = {{name = 0x55e671bab333 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x55e671bb4a8e "version", has_arg = 0, flag = 0x0, val = 118}, {
name = 0x55e671bc48d1 "alias", has_arg = 1, flag = 0x0, val = 1024}, {name = 0x55e671bab338 "subst", has_arg = 1, flag = 0x0, val = 1025}, {
name = 0x55e671bab33e "substdef", has_arg = 1, flag = 0x0, val = 1026}, {name = 0x55e671bab347 "substdefs", has_arg = 1, flag = 0x0, val = 1027}, {
name = 0x55e671bab351 "server-id", has_arg = 1, flag = 0x0, val = 1028}, {name = 0x55e671bab35b "loadmodule", has_arg = 1, flag = 0x0, val = 1029}, {
name = 0x55e671bab366 "modparam", has_arg = 1, flag = 0x0, val = 1030}, {name = 0x55e671bab36f "log-engine", has_arg = 1, flag = 0x0, val = 1031}, {
name = 0x55e671bb4bab "debug", has_arg = 1, flag = 0x0, val = 1032}, {name = 0x55e671bab37a "cfg-print", has_arg = 0, flag = 0x0, val = 1033}, {
name = 0x55e671bab384 "atexit", has_arg = 1, flag = 0x0, val = 1034}, {name = 0x55e671bab38b "all-errors", has_arg = 0, flag = 0x0, val = 1035}, {name = 0x0, has_arg = 0,
flag = 0x0, val = 0}}
__func__ = "main"
```
Some more debugging info:
```
(gdb) p tl
$203 = (struct timer_ln *) 0x7ff89d214810
(gdb) p h
$202 = (struct timer_head *) 0x7ff891b56ff0
(gdb) p *(struct timer_ln *) 0x7ff891e21af0
$6 = {next = 0x7ff891e24b00, prev = 0x7ff89d214810, expire = 1057066680, initial_timeout = 480, data = 0x7ff891e21af0, f = 0x55e671a570a0 <compat_old_handler>, flags = 512,
slow_idx = 0}
(gdb) p *tl
$205 = {next = 0x0, prev = 0x7ff891b56ff0, expire = 1057066648, initial_timeout = 48, data = 0xfffffffe, f = 0x7ffa91f77e30 <retr_buf_handler>, flags = 512, slow_idx = 0}
(gdb) p *h
$204 = {next = 0x0, prev = 0x7ff891e00e10}
(gdb) p *(struct timer_ln *) 0x7ff891e00e10
$7 = {next = 0x7ff891b56ff0, prev = 0x7ff89e47d538, expire = 1057066680, initial_timeout = 16, data = 0x7ff891e00e10, f = 0x55e671a570a0 <compat_old_handler>, flags = 512,
slow_idx = 0}
(gdb) p h->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev
$198 = (struct timer_ln *) 0x7ff891e21af0
(gdb) p h->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev
$199 = (struct timer_ln *) 0x7ff89d214810
(gdb) p h->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev
$200 = (struct timer_ln *) 0x7ff891b56ff0
(gdb) p h->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev->prev
$201 = (struct timer_ln *) 0x7ff891e00e10
```
#### 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).
-->
```
(gdb) p *(struct retr_buf *)((char *)(tl)-((size_t)((char *)&((struct retr_buf*)(0))->timer - (char *)0)))
$13 = {rbtype = 0, flags = 164, t_active = 0, branch = 0, buffer_len = 1021,
buffer = 0x7ff897731ef0 "KDMQ sip:usrloc@x.x.x.x:5040;transport=tcp SIP/2.0\r\nVia: SIP/2.0/TCP y.y.y.y:5045;branch=z9hG4bK6411.2eec64c5", '0' <repeats 24 times>, ".0\r\nTo: <sip:usrloc@x.x.x.x:5040;transport=tcp>\r\nFrom: <sip:usrloc@y.y.y.y:5040;transport=tcp>;tag=ea5c1e4b006551edd6973f0c22cc35ec-9c6994fe\r\nCSeq: 10 KDMQ\r\nCall-ID: 3bc128ce41f9d5e5-3737(a)x.x.x.x\r\nContent-Length: 574\r\nUser-Agent: UNITE 3.0\r\nMax-Forwards: 1\r\nContent-Type: application/json\r\n\r\n{\"action\":1,\"aor\":\"01537833832a5ccc75058ef5839f\",\"ruid\":\"uloc-a71cb2-68662908-e99-e6b85\",\"c\":\"sip:01537833832a5ccc75058ef5839f@z.z.z.z:11916;transport=TCP\",\"received\":\"sip:x.x.x.x:11916;transport=tcp\",\"path\":\"<sip:z.z.z.z:5040;transport=tcp;lr;received=sip:w.w.w.w:11916%3Btransport%3Dtcp;socket=clientTCPListener>\",\"callid\":\"0_912990869(a)192.168.1.7\",\"user_agent\":\"Yealink SIP-T30 t.t.t.t\",\"instance\":\"\",\"expires\":1751822448,\"cseq\":28,\"flags\":0,\"cflags\":96,\"q\":-1,\"last_modified\":1751822148,\"methods\":16383,\"reg_id\":0,\"server_id\":10951858,\"xavps\":{}}", my_T = 0x7ff89d214510, timer = {next = 0x0, prev = 0x7ff891b56ff0, expire = 1057066648, initial_timeout = 48, data = 0xfffffffe,
f = 0x7ffa91f77e30 <retr_buf_handler>, flags = 512, slow_idx = 0}, dst = {send_sock = 0x7ffa9264fae0, to = {s = {sa_family = 2,
sa_data = "\023\260\n_\020\210\000\000\000\000\000\000\000"}, sin = {sin_family = 2, sin_port = 45075, sin_addr = {s_addr = 2282774282},
sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 2, sin6_port = 45075, sin6_flowinfo = 2282774282, sin6_addr = {__in6_u = {
__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, sin6_scope_id = 0}, sas = {ss_family = 2,
__ss_padding = "\023\260\n_\020\210", '\000' <repeats 111 times>, __ss_align = 0}}, id = 0, send_flags = {f = 4, blst_imask = 0}, proto = 2 '\002', proto_pad0 = 0 '\000',
proto_pad1 = 0}, retr_expire = 1057066599, fr_expire = 1057066648}
```
### Possible Solutions
Check if "next" list is broken and recover the pointers form "prev" list, and viceversa.
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
Using 1s transaction timeout for KDMQs.
* **Kamailio Version** - output of `kamailio -v`
```
5.8.5 kamailio version
```
* **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`)
-->
```
Debian 11
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4345
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4345(a)github.com>
descartin created an issue (kamailio/kamailio#4313)
<!--
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…
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.o…
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
Hello how are you, we are deploying a kamailio instance on 5.5.6 version
```
version: kamailio 5.5.6 (x86_64/linux) 0125f8-dirty
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, 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_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 32MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 0125f8 -dirty
compiled on 12:01:31 May 21 2025 with gcc 12.2.0
```
and after some minutes processing calls we are seeing some core like this
```
(gdb) bt
#0 __strlen_evex () at ../sysdeps/x86_64/multiarch/strlen-evex.S:79
#1 0x00007f5753edc258 in __vfprintf_internal (s=s@entry=0x7ffc848f6aa0,
format=format@entry=0x5570eb867da8 "%s: %.*s%s%s%sBUG: qm: fragm. %p (address %p) beginning overwritten (%lx)! Memory allocator was called from %s:%u. Fragment marked by %s:%lu. Exec from %s:%u.\n",
ap=ap@entry=0x7ffc848f6cc8, mode_flags=mode_flags@entry=0) at ./stdio-common/vfprintf-process-arg.c:397
#2 0x00007f5753efc758 in __vsnprintf_internal (
string=0x7ffc848f6d40 "CRITICAL: <core> [core/mem/q_malloc.c:123]: qm_debug_check_frag(): BUG: qm: fragm. 0x7f569357aae0 (address 0x7f569357ab18) beginning overwritten (663d610a0d303030)! Memory allocator was called from co"..., maxlen=<optimized out>, maxlen@entry=960,
format=format@entry=0x5570eb867da8 "%s: %.*s%s%s%sBUG: qm: fragm. %p (address %p) beginning overwritten (%lx)! Memory allocator was called from %s:%u. Fragment marked by %s:%lu. Exec from %s:%u.\n",
args=args@entry=0x7ffc848f6cc8, mode_flags=mode_flags@entry=0) at ./libio/vsnprintf.c:114
#3 0x00007f5753f7ef2c in __vsyslog_internal (pri=138, fmt=<optimized out>, ap=ap@entry=0x7ffc848f7150, mode_flags=mode_flags@entry=0) at ./misc/syslog.c:218
#4 0x00007f5753f7f536 in __syslog (pri=<optimized out>, fmt=<optimized out>) at ./misc/syslog.c:91
#5 0x00005570eb6d8f25 in qm_debug_check_frag (qm=0x7f5692cd8000, f=0x7f569357aae0, file=0x5570eb861995 "core: core/usr_avp.c", line=627, efile=0x5570eb867c25 "core/mem/q_malloc.c", eline=511) at core/mem/q_malloc.c:123
#6 0x00005570eb6dd50f in qm_free (qmp=0x7f5692cd8000, p=0x7f569357ab18, file=0x5570eb861995 "core: core/usr_avp.c", func=0x5570eb863260 <__func__.8> "destroy_avp_list_unsafe", line=627, mname=0x5570eb861990 "core")
at core/mem/q_malloc.c:511
#7 0x00005570eb6b32c3 in destroy_avp_list_unsafe (list=0x7f5693545238) at core/usr_avp.c:627
#8 0x00007f57524b3ba9 in free_cell_helper (dead_cell=0x7f5693545038, silent=1, fname=0x7f57525b7bdf "h_table.c", fline=466) at h_table.c:255
#9 0x00007f57524b49a2 in free_hash_table () at h_table.c:466
#10 0x00007f57524e8772 in tm_shutdown () at t_funcs.c:88
#11 0x00005570eb6081a0 in destroy_modules () at core/sr_module.c:842
#12 0x00005570eb3d8161 in cleanup (show_status=1) at main.c:575
#13 0x00005570eb3d9da8 in shutdown_children (sig=15, show_status=1) at main.c:718
#14 0x00005570eb3dd0bc in handle_sigs () at main.c:816
#15 0x00005570eb3ea5d1 in main_loop () at main.c:1903
#16 0x00005570eb3f3f9c in main (argc=15, argv=0x7ffc848f8168) at main.c:3061
```
we are using debian12, and we see this log on the system when the crash
```
2025-07-08T06:21:55.874670+00:00 mad-proxy-4 kernel: [4744966.979706] traps: kamailio[3282034] general protection fault ip:7f18c2a719d8 sp:7ffde5c84d68 error:0 in libc.so.6[7f18c2930000+155000]
2025-07-08T06:21:55.910639+00:00 mad-proxy-4 kernel: [4744967.018138] traps: kamailio[3282015] general protection fault ip:561437233f64 sp:7ffde5c859a0 error:0 in kamailio[561436f31000+425000]
2025-07-08T06:21:55.919781+00:00 mad-proxy-4 systemd[1]: theseus.service: Main process exited, code=killed, status=11/SEGV
2025-07-08T06:21:55.919880+00:00 mad-proxy-4 systemd[1]: theseus.service: Failed with result 'signal'.
```
The traffic which seems is causing the issue may be using sipt module, functions sipt_set_calling and sipt_destination
the libc version we have in the system is
```
ii libc6:amd64 2.36-9+deb12u10 amd64 GNU C Library: Shared libraries
ii libc6-dbg:amd64 2.36-9+deb12u10 amd64 GNU C Library: detached debugging symbols
ii libc6-dev:amd64 2.36-9+deb12u10 amd64 GNU C Library: Development Libraries and Header Files
ii libc6-i386 2.36-9+deb12u10 amd64 GNU C Library: 32-bit shared libraries for AMD64
```
could be possible any issue with the module sipt related to the library we are using?
I checked commits between 5.5.6 and 6.0 and I think the difference is related to kemi support and some format changes only
thanks a lot and regards
david escartin
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### 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.
-->
```
#0 __strlen_evex () at ../sysdeps/x86_64/multiarch/strlen-evex.S:79
79 ../sysdeps/x86_64/multiarch/strlen-evex.S: No existe el fichero o el directorio.
(gdb) bt
#0 __strlen_evex () at ../sysdeps/x86_64/multiarch/strlen-evex.S:79
#1 0x00007f5753edc258 in __vfprintf_internal (s=s@entry=0x7ffc848f6aa0,
format=format@entry=0x5570eb867da8 "%s: %.*s%s%s%sBUG: qm: fragm. %p (address %p) beginning overwritten (%lx)! Memory allocator was called from %s:%u. Fragment marked by %s:%lu. Exec from %s:%u.\n",
ap=ap@entry=0x7ffc848f6cc8, mode_flags=mode_flags@entry=0) at ./stdio-common/vfprintf-process-arg.c:397
#2 0x00007f5753efc758 in __vsnprintf_internal (
string=0x7ffc848f6d40 "CRITICAL: <core> [core/mem/q_malloc.c:123]: qm_debug_check_frag(): BUG: qm: fragm. 0x7f569357aae0 (address 0x7f569357ab18) beginning overwritten (663d610a0d303030)! Memory allocator was called from co"..., maxlen=<optimized out>, maxlen@entry=960,
format=format@entry=0x5570eb867da8 "%s: %.*s%s%s%sBUG: qm: fragm. %p (address %p) beginning overwritten (%lx)! Memory allocator was called from %s:%u. Fragment marked by %s:%lu. Exec from %s:%u.\n",
args=args@entry=0x7ffc848f6cc8, mode_flags=mode_flags@entry=0) at ./libio/vsnprintf.c:114
#3 0x00007f5753f7ef2c in __vsyslog_internal (pri=138, fmt=<optimized out>, ap=ap@entry=0x7ffc848f7150, mode_flags=mode_flags@entry=0) at ./misc/syslog.c:218
#4 0x00007f5753f7f536 in __syslog (pri=<optimized out>, fmt=<optimized out>) at ./misc/syslog.c:91
#5 0x00005570eb6d8f25 in qm_debug_check_frag (qm=0x7f5692cd8000, f=0x7f569357aae0, file=0x5570eb861995 "core: core/usr_avp.c", line=627, efile=0x5570eb867c25 "core/mem/q_malloc.c", eline=511) at core/mem/q_malloc.c:123
#6 0x00005570eb6dd50f in qm_free (qmp=0x7f5692cd8000, p=0x7f569357ab18, file=0x5570eb861995 "core: core/usr_avp.c", func=0x5570eb863260 <__func__.8> "destroy_avp_list_unsafe", line=627, mname=0x5570eb861990 "core")
at core/mem/q_malloc.c:511
#7 0x00005570eb6b32c3 in destroy_avp_list_unsafe (list=0x7f5693545238) at core/usr_avp.c:627
#8 0x00007f57524b3ba9 in free_cell_helper (dead_cell=0x7f5693545038, silent=1, fname=0x7f57525b7bdf "h_table.c", fline=466) at h_table.c:255
#9 0x00007f57524b49a2 in free_hash_table () at h_table.c:466
#10 0x00007f57524e8772 in tm_shutdown () at t_funcs.c:88
#11 0x00005570eb6081a0 in destroy_modules () at core/sr_module.c:842
#12 0x00005570eb3d8161 in cleanup (show_status=1) at main.c:575
#13 0x00005570eb3d9da8 in shutdown_children (sig=15, show_status=1) at main.c:718
#14 0x00005570eb3dd0bc in handle_sigs () at main.c:816
#15 0x00005570eb3ea5d1 in main_loop () at main.c:1903
#16 0x00005570eb3f3f9c in main (argc=15, argv=0x7ffc848f8168) at main.c:3061
```
#### 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
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.5.6 (x86_64/linux) 0125f8-dirty
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, 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_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 32MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 0125f8 -dirty
compiled on 12:01:31 May 21 2025 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`)
-->
```
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
Linux mad-proxy-4.bts.io 6.1.0-30-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.124-1 (2025-01-12) x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4313
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4313(a)github.com>
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [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:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
This PR introduces a new mode on the modparam `evlreq_mode` to allow for choosing what should emit the local-request event. It enables the ACK that are generated from kamailio to also emit the event if the user chose to do so.
With this PR the modes are
- 0 for None
- 1 for Cancel
- 2 for Acks
- 3 for Both
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4343
-- Commit Summary --
* tm: Trigger local-request event for ACK on negative replies
* update for kemi
* tm: add validation for the evlreq_mode param
-- File Changes --
M src/modules/tm/config.h (10)
M src/modules/tm/t_reply.c (60)
M src/modules/tm/tm.c (6)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4343.patchhttps://github.com/kamailio/kamailio/pull/4343.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4343
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4343(a)github.com>
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [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
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [x] PR should be backported to stable branches
- [ ] Tested changes locally
#### Description
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4335
-- Commit Summary --
* ims_ipsec_pcscf: fill_contact() build AOR from VIA as fallback on SIP_REPLY
-- File Changes --
M src/modules/ims_ipsec_pcscf/cmd.c (39)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4335.patchhttps://github.com/kamailio/kamailio/pull/4335.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4335
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4335(a)github.com>