<!--
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>
- URL: https://github.com/kamailio/kamailio/commit/483d7190cdd193b56570cb6b8bfef92…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:16:59+02:00
dispatcher: docs - more details about using algorithm 12
(cherry picked from commit 1b62f165d541cf88fe37778f0e23232e45e86b3d)
- URL: https://github.com/kamailio/kamailio/commit/716e89dd5a86fd17c3c60a7815796a0…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:26:44+02:00
dispatcher: added ds_mark_addr(state, group, uri)
- set the state of a target by group and address
(cherry picked from commit d85e63e7c5fb422151ba0d8a08b47cedc4929d8d)
- URL: https://github.com/kamailio/kamailio/commit/9ed2e519dfb5933afd4a151b8bece0f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:28:25+02:00
core: dset - wrapper function to reset request uri
(cherry picked from commit e01f50fa3de5b0eb24ba0852917d682fe1d83ea1)
- URL: https://github.com/kamailio/kamailio/commit/8d2a9aa3748d0a5ee2f0dec588f4821…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:28:39+02:00
dispatcher: use rewrite/reset uri for event route with faked msg
(cherry picked from commit a878e7f2ec015015f53b1ad152554a81c9422674)
- URL: https://github.com/kamailio/kamailio/commit/499e886f265f02d87124e71f1a53a1d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:29:03+02:00
dispatcher: set state from config without depending on keepalive thresholds
(cherry picked from commit a70a55df0dbe5fc9231329327e3d6acf6a37c5c4)
- URL: https://github.com/kamailio/kamailio/commit/30893f0027363e0ca83ac1b50a5ffcf…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:34:05+02:00
dispatcher: renamed field to reflect better the purpose and print in rpc result
(cherry picked from commit deb8405b403a5a8da4f2aac3aa167e2a84d15d91)
- URL: https://github.com/kamailio/kamailio/commit/00fcc56fdb11d1bbb14291aaf4b348e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:35:05+02:00
dispatcher: $dsv(name) extended to return setid and uri
(cherry picked from commit 0e914414e48637168ab9ab682a9463412cf8f3fe)
- URL: https://github.com/kamailio/kamailio/commit/9d07b43816658b6e2683dedfcab655b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:35:16+02:00
dispatcher: clone dispatcher uri for event route variable
(cherry picked from commit db65368108b0de14e40cbbd7c92561e5c8740dac)
- URL: https://github.com/kamailio/kamailio/commit/6e36d3fdb0f0794ec3f57c7265d2839…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:35:53+02:00
core: print ip and port in log message
(cherry picked from commit 092ad634a2741ad21fd29586a30bd2bcb9ac653b)
- URL: https://github.com/kamailio/kamailio/commit/97c904c02ad797473a82d41d815a8e8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:37:30+02:00
nghttp2: docs updated to use the proper $nghttp2(path) variable
(cherry picked from commit b513666f76d2220d8914fadcc4968845efbf170f)
- URL: https://github.com/kamailio/kamailio/commit/3d9bf7d271fa9f01014600c34083f21…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:38:18+02:00
rtpengine: aliased rtpengine_destroy() to rtpengine_delete()
- make it easier to migrate from rtp proxy by replacing the module name
inside routing blocks
(cherry picked from commit 32db0297d27093181ff4eb0530cc1a67d680e99f)
- URL: https://github.com/kamailio/kamailio/commit/ef4a1349470bb05fbf52f78103310a6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:38:25+02:00
rtpengine: docs section for rtpengine_destroy()
(cherry picked from commit 3020ddd9ad832a51cb04aef9d717935bcae5405f)
- URL: https://github.com/kamailio/kamailio/commit/40db3cacd06952f47f90311a04f6c98…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:38:56+02:00
uac: small reformatting for reg_copy_shm() macro
(cherry picked from commit 9187303af7689d435112f69fdbec45b7c5687351)
- URL: https://github.com/kamailio/kamailio/commit/6a2516c12094d375ba63ef5b9cd021b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:39:34+02:00
secsipid: docs update to reflect better the use of private/public key
(cherry picked from commit 64635de552896fbf354e52656ec4ee93f1d87e6f)
- URL: https://github.com/kamailio/kamailio/commit/12b46a0e8fe7f904834f6a4c0ae2991…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:39:50+02:00
microhttpd: rework resetting the data field
(cherry picked from commit 4083714575e2cb7500c67fb8a0b99ff371bf8576)
- URL: https://github.com/kamailio/kamailio/commit/c648866f63c6aabcc058aa49439e6c6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:40:28+02:00
kex: formatted pkg rpc export structure
(cherry picked from commit e153560eec82787c92c7bb6522dfa7a106781bfd)
- URL: https://github.com/kamailio/kamailio/commit/183f71fba0b0a948816a03d1d690e1f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:41:47+02:00
seas: update main process variable after the internal fork()
- probably module should be updated to use internal API fork_process()
(cherry picked from commit d18f7189a9664f3c2cca65c76e068ad1951a0c19)
- URL: https://github.com/kamailio/kamailio/commit/cc09f81443946be5948356eff4ddc29…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:41:56+02:00
sms: update main process variable after the internal fork()
- probably module should be updated to use internal API fork_process()
(cherry picked from commit 92949eb21a3ce6869fce01f9b080d9502f61edf8)
- URL: https://github.com/kamailio/kamailio/commit/c2f382afb529cdbd0dbd16c73680794…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:42:03+02:00
cplc: update main process variable after the internal fork()
- probably module should be updated to use internal API fork_process()
(cherry picked from commit 508e59090960322d1709b7e56a41300d0e948600)
- URL: https://github.com/kamailio/kamailio/commit/d8453e714abe2d80f8953d40b67a0ec…
Author: Bastian Triller <bastian.triller(a)gmail.com>
Date: 2025-08-03T15:42:30+02:00
uac: Fix From/To header restore with dialog store
When replacing From/To header and using dialog module to store original
URIs (modparam restore_dlg=1), restoring of headers does not work for
replies to in-dialog requests sent upstream.
Add in-dialog request's direction to TM callback parameter, so correct
URIs are restored for replies to upstream in-dialog requests.
(cherry picked from commit 0d4ffb74a949ae6e390d334b30ec51cedb001226)
- URL: https://github.com/kamailio/kamailio/commit/c58ac37fced3a0d0a6ae95107d3733e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:43:32+02:00
dispatcher: check rewrite_uri() return code
(cherry picked from commit 34c903a6a4658852bfef0edfb78614b83700a5e9)
- URL: https://github.com/kamailio/kamailio/commit/00def1b816472d7eff9ecb22654ecea…
Author: ÐилÑн ÐалаÑзов <git-dpa(a)aegee.org>
Date: 2025-08-03T15:44:10+02:00
dialog: use capital letter at start of sentence
(cherry picked from commit cc22bfc5199855f990156fb6a533c67dbc9049e9)
- URL: https://github.com/kamailio/kamailio/commit/8818cd8fc6d37a395a4e8b15675eba6…
Author: Bastian Triller <bastian.triller(a)gmail.com>
Date: 2025-08-03T15:44:15+02:00
htable: Fix typo
(cherry picked from commit 93586580259fe2d71899a3a4d83868f89362f695)
- URL: https://github.com/kamailio/kamailio/commit/165b19e4a8f684350529a87823cae41…
Author: Bastian Triller <bastian.triller(a)gmail.com>
Date: 2025-08-03T15:44:21+02:00
core: Fix typos
(cherry picked from commit 6b92933080230f9546c9559aba9ecdfad7759a15)
- URL: https://github.com/kamailio/kamailio/commit/0b543ae073653af9fe27b35fcbd327c…
Author: Bastian Triller <bastian.triller(a)gmail.com>
Date: 2025-08-03T15:44:27+02:00
pv: Fix typo
(cherry picked from commit a426a2e113c4b41af36ee4240cc10460a6cb537a)
- URL: https://github.com/kamailio/kamailio/commit/0dba33ddc9fa64df4dd1df2c9658636…
Author: Bastian Triller <bastian.triller(a)gmail.com>
Date: 2025-08-03T15:44:33+02:00
tls: Fix typo
(cherry picked from commit 982a1a676a84142a511e4f095f8d19161f3c34ee)
- URL: https://github.com/kamailio/kamailio/commit/10093edb2b69d1bc1773c0449d2e231…
Author: Bastian Triller <bastian.triller(a)gmail.com>
Date: 2025-08-03T15:44:39+02:00
tls_wolfssl: Fix typo
(cherry picked from commit 157f0ea6eb570226bcbf52c6ebb706f2e81b3c8e)
- URL: https://github.com/kamailio/kamailio/commit/816040c333c068d54438a56658dd655…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:46:59+02:00
dispatcher: added parameter event_callback_mode
- control when event route and KEMI callback functions are executed
(cherry picked from commit 77805bc1f028f4cca956d4f05dd9dc3c0d534d0f)
- URL: https://github.com/kamailio/kamailio/commit/9f53a495f0d6a09f56c872958e18f71…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:47:29+02:00
crypto: init call-id rand seeding with the first usage
- randomization per process
(cherry picked from commit a07b845cffe0a6a5fb6410d735aee6c510f8ff8e)
- URL: https://github.com/kamailio/kamailio/commit/29302f9838922ac1c130e36c3573d36…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:47:53+02:00
usrloc: use proto from socket for keepalive via header
(cherry picked from commit 3322bea764036deba6340e435c257244d511a11f)
- URL: https://github.com/kamailio/kamailio/commit/169387ffcfca99e251bbde250dca66d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:48:13+02:00
core: more details in the log for checking msg_recv_max_size
(cherry picked from commit 30331861c6d10ba04352448f10ce6b912ebe0515)
- URL: https://github.com/kamailio/kamailio/commit/41478779d55b158ddd8c3b177de5309…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:48:21+02:00
core: extended log messages for lumps_len()
(cherry picked from commit c53b5345e6101c6fe1771e3d64c25e6f7671c479)
- URL: https://github.com/kamailio/kamailio/commit/e212f1ff7747906fd6deeb7f74b7a07…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:50:08+02:00
dispatcher: use faked message also for tm faked-reply on event routes
(cherry picked from commit 97d5a13b9f2c6cd84e6ce62e0c779a5118b3dfb1)
- URL: https://github.com/kamailio/kamailio/commit/5c31ba6baec200177aeadcf40da1af8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:50:28+02:00
dispatcher: use always the internal faked message for event routes
- being executed on state change, the config message does not provide
useful data (e.g., on ds_mark_dst() inside failure route, the UAS
request is used, not having uri where it was sent)
- the r-uri of the internal faked message is set to the destination uri
from the dispatcher record
(cherry picked from commit e7bf487cfcde699fbcd6fd4a6233ef2113570545)
- URL: https://github.com/kamailio/kamailio/commit/eb518c35b2aa76c58967f5d5985e40b…
Author: Stefan Mititelu <stefan.mititelu(a)net2phone.com>
Date: 2025-08-03T15:50:45+02:00
topos: expose rcv data in event routes
Updated documentation.
(cherry picked from commit 90b350a2815bc2ca4c69fda75194322416ced328)
- URL: https://github.com/kamailio/kamailio/commit/7b02ee5a57c657e96cfea9e47689d75…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:51:08+02:00
sipdump: made the received info available via the faked message in event route
(cherry picked from commit c6c25e43c8a24b50b73bf0772d58686cf8944020)
- URL: https://github.com/kamailio/kamailio/commit/2e98f882b09f8c3adc82631fddbf36b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:51:24+02:00
topos: docs updated for event routes
(cherry picked from commit 913d60bed99eee7dd212831e9153e5a3c39ab4be)
- URL: https://github.com/kamailio/kamailio/commit/3fa9a83342b70c296cd10856d64711b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T15:58:48+02:00
core: mod fixup - helper function for s-i-s parameters
(cherry picked from commit 62b18cdfb62721304e5f82fd71063303cff06641)
- URL: https://github.com/kamailio/kamailio/commit/3e64cf44eb6e01147cd18a6a8b73f47…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-08-03T16:08:07+02:00
dispatcher: removed exports to config propagated by backporting
- removed param event_callback_mode and function ds_mark_addr()
sergey-safarov created an issue (kamailio/kamailio#4264)
On `alpine:edge` upgraded `libjwt-dev` from `1.17.2-r0` to `3.2.1-r0` and on now present this error in the build log.
```
make[2]: --libs: No such file or directory
make[2]: --libs: No such file or directory
CC (cc) [M jwt.so] jwt_mod.o
jwt_mod.c: In function 'ki_jwt_generate_hdrs':
jwt_mod.c:215:17: error: implicit declaration of function 'jwt_free_str'; did you mean 'jwt_alg_str'? [-Wimplicit-function-declaration]
215 | jwt_free_str(_jwt_result.s);
| ^~~~~~~~~~~~
| jwt_alg_str
jwt_mod.c:275:15: error: implicit declaration of function 'jwt_new' [-Wimplicit-function-declaration]
275 | ret = jwt_new(&jwt);
| ^~~~~~~
jwt_mod.c:283:15: error: implicit declaration of function 'jwt_add_grant_int' [-Wimplicit-function-declaration]
283 | ret = jwt_add_grant_int(jwt, "iat", iat);
| ^~~~~~~~~~~~~~~~~
jwt_mod.c:293:39: error: implicit declaration of function 'jwt_add_grant' [-Wimplicit-function-declaration]
293 | ret = jwt_add_grant(jwt, pit->name.s, pit->body.s);
| ^~~~~~~~~~~~~
jwt_mod.c:311:39: error: implicit declaration of function 'jwt_add_header' [-Wimplicit-function-declaration]
311 | ret = jwt_add_header(jwt, header->name.s, header->body.s);
| ^~~~~~~~~~~~~~
jwt_mod.c:313:39: error: implicit declaration of function 'jwt_add_header_int'; did you mean 'jwt_header_get'? [-Wimplicit-function-declaration]
313 | ret = jwt_add_header_int(jwt, header->name.s, lval);
| ^~~~~~~~~~~~~~~~~~
| jwt_header_get
jwt_mod.c:324:15: error: implicit declaration of function 'jwt_set_alg'; did you mean 'jwt_get_alg'? [-Wimplicit-function-declaration]
324 | ret = jwt_set_alg(jwt, valg, (unsigned char *)kdata.s, (size_t)kdata.len);
| ^~~~~~~~~~~
| jwt_get_alg
jwt_mod.c:330:25: error: implicit declaration of function 'jwt_encode_str' [-Wimplicit-function-declaration]
330 | _jwt_result.s = jwt_encode_str(jwt);
| ^~~~~~~~~~~~~~
jwt_mod.c:330:23: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
330 | _jwt_result.s = jwt_encode_str(jwt);
| ^
jwt_mod.c:337:9: error: implicit declaration of function 'jwt_free'; did you mean 'jwks_free'? [-Wimplicit-function-declaration]
337 | jwt_free(jwt);
| ^~~~~~~~
| jwks_free
jwt_mod.c: In function 'ki_jwt_verify_key':
jwt_mod.c:443:9: error: unknown type name 'jwt_valid_t'; did you mean 'jwt_value_t'?
443 | jwt_valid_t *jwt_valid = NULL;
| ^~~~~~~~~~~
| jwt_value_t
jwt_mod.c:477:15: error: implicit declaration of function 'jwt_valid_new' [-Wimplicit-function-declaration]
477 | ret = jwt_valid_new(&jwt_valid, valg);
| ^~~~~~~~~~~~~
jwt_mod.c:484:9: error: implicit declaration of function 'jwt_valid_set_headers' [-Wimplicit-function-declaration]
484 | jwt_valid_set_headers(jwt_valid, 1);
| ^~~~~~~~~~~~~~~~~~~~~
jwt_mod.c:485:9: error: implicit declaration of function 'jwt_valid_set_now' [-Wimplicit-function-declaration]
485 | jwt_valid_set_now(jwt_valid, iat);
| ^~~~~~~~~~~~~~~~~
jwt_mod.c:492:39: error: implicit declaration of function 'jwt_valid_add_grant' [-Wimplicit-function-declaration]
492 | ret = jwt_valid_add_grant(jwt_valid, pit->name.s, pit->body.s);
| ^~~~~~~~~~~~~~~~~~~
jwt_mod.c:494:39: error: implicit declaration of function 'jwt_valid_add_grant_int' [-Wimplicit-function-declaration]
494 | ret = jwt_valid_add_grant_int(jwt_valid, pit->name.s, lval);
| ^~~~~~~~~~~~~~~~~~~~~~~
jwt_mod.c:505:15: error: implicit declaration of function 'jwt_decode' [-Wimplicit-function-declaration]
505 | ret = jwt_decode(
| ^~~~~~~~~~
jwt_mod.c:511:22: error: implicit declaration of function 'jwt_validate' [-Wimplicit-function-declaration]
511 | if((jwtret = jwt_validate(jwt, jwt_valid)) != JWT_VALIDATION_SUCCESS) {
| ^~~~~~~~~~~~
jwt_mod.c:511:55: error: 'JWT_VALIDATION_SUCCESS' undeclared (first use in this function)
511 | if((jwtret = jwt_validate(jwt, jwt_valid)) != JWT_VALIDATION_SUCCESS) {
| ^~~~~~~~~~~~~~~~~~~~~~
jwt_mod.c:511:55: note: each undeclared identifier is reported only once for each function it appears in
jwt_mod.c:512:38: error: implicit declaration of function 'jwt_valid_get_status' [-Wimplicit-function-declaration]
512 | _jwt_verify_status = jwt_valid_get_status(jwt_valid);
| ^~~~~~~~~~~~~~~~~~~~
jwt_mod.c:521:9: error: implicit declaration of function 'jwt_valid_free'; did you mean 'jwt_builder_free'? [-Wimplicit-function-declaration]
521 | jwt_valid_free(jwt_valid);
| ^~~~~~~~~~~~~~
| jwt_builder_free
make[2]: *** [../../Makefile.rules:100: jwt_mod.o] Error 1
make[1]: *** [Makefile:509: modules] Error 1
make[1]: Leaving directory '/usr/src/kamailio/pkg/kamailio/alpine/src/kamailio-78541805e73f1ca2a220e84734090ebd606bc5e4/src'
make: *** [Makefile:34: all] Error 2
>>> ERROR: kamailio: build failed
>>> kamailio: Uninstalling dependencies...
(1/1) Purging .makedepends-kamailio (20250527.180[501](https://github.com/sergey-safarov/kamailio/actions/runs/1…)
OK: 1028 MiB in 240 packages
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4264
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4264(a)github.com>
sem32 created an issue (kamailio/kamailio#4325)
### Description
The issue: in 15 second after start of kamailio, it stops to read the UDP socket localhost:5060
### Troubleshooting
<img width="683" height="406" alt="Image" src="https://github.com/user-attachments/assets/b93ed7d3-8944-477b-867b-ca7fcae8…" />
#### Reproduction
Preconditions:
- More than one worker for UDP localhost:5060
- Kamailio receives SIP OPTION from the Asterisk by UDP localhost
- In the Kamailio's script we have a logic to send the SIP OPTION by TLS. We modify $ru and add to it ";transport=TLS"
- 25+ sip trunks which generates SIP OPTIONS with transport TLS
- all the trunks are resolvable but not reachable (don't listen the port)
- libssl3
#### Debugging Data
[gdb_239054.txt](https://github.com/user-attachments/files/21236064/gdb_2390…
[gdb_239053.txt](https://github.com/user-attachments/files/21236065/gdb_2390…
### Possible Solutions
We have no issue in case we have:
- only one worker for UPD localhost and any version of libssl (libssl3 or libss1.1)
- or use libssl1.1 and any amount of workers
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
# kamailio -v
version: kamailio 5.8.6 (aarch64/linux) a14e49
flags: , EXTRA_DEBUGUSE_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-NOSMP, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES
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: a14e49
compiled on 14:10:21 Jul 15 2025 with gcc 12.2.0
```
* **Operating System**:
```
# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
# uname -a
Linux semen02 6.1.0-37-cloud-arm64 #1 SMP Debian 6.1.140-1 (2025-05-22) aarch64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4325
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4325(a)github.com>