### Description
We have segfault in Kamailio v5.3.1 installed on Debain 9.x 64 bit occured while kamailio was shutting down while our script tryed to get metrics using kamcmd utility at the same time.
### Troubleshooting
No troubleshooting was done, since it happened on a production server. We simply restarted the server.
#### Reproduction
The problem periodically happens on production servers in runtime. Kamailio crashes when one of our scripts tried getting statistics about websocket and tls modules using kamcmd. As I see in core dump, shared memory was already freed when rpc_mod_print called in the child process.
#### Debugging Data
```
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 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:
<http://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 /var/lib/ums/sbin/kamailio...done.
[New LWP 17075]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/var/lib/ums/sbin/kamailio -m 2048 -M 12 -P /var/run/kamailio/kamailio.pid -f /'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 __strcmp_sse2_unaligned ()
at ../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S:32
#0 __strcmp_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S:32
#1 0x00007fcae1ef62f5 in rpc_mod_print (rpc=0x7fcae180b540 <binrpc_callbacks>, ctx=0x7ffe7a6f7808, mname=0x1edd0c9 "websocket", stats=0x1ef8310, flag=2) at mod_stats.c:117
#2 0x00007fcae1ef60eb in rpc_mod_print_one (rpc=0x7fcae180b540 <binrpc_callbacks>, ctx=0x7ffe7a6f7808, mname=0x1edd0c9 "websocket", pkg_stats=0x1ef69d0, shm_stats=0x1ef8310, flag=2) at mod_stats.c:159
#3 0x00007fcae1ef5ee1 in rpc_mod_mem_stats_mode (rpc=0x7fcae180b540 <binrpc_callbacks>, ctx=0x7ffe7a6f7808, fmode=0) at mod_stats.c:239
#4 0x00007fcae1ef584f in rpc_mod_mem_stats (rpc=0x7fcae180b540 <binrpc_callbacks>, ctx=0x7ffe7a6f7808) at mod_stats.c:251
#5 0x00007fcae15dac80 in process_rpc_req (buf=0x1edd0b4 "\241\003\035\020\333Qg\221\nmod.stats", size=36, bytes_needed=0x7ffe7a6f7c50, sh=0x7ffe7a6f7bc0, saved_state=0x1eed0b8) at binrpc_run.c:678
#6 0x00007fcae15c872f in handle_stream_read (s_c=0x1edd080, idx=-1) at io_listener.c:511
#7 0x00007fcae15c4121 in handle_io (fm=0x7fcb65600cb0, events=1, idx=-1) at io_listener.c:706
#8 0x00007fcae15c293a in io_wait_loop_epoll (h=0x7fcae180b348 <io_h>, t=10, repeat=0) at ./../../core/io_wait.h:1062
#9 0x00007fcae15b662c in io_listen_loop (fd_no=2, cs_lst=0x1df1940) at io_listener.c:281
#10 0x00007fcae15ec72c in mod_child (rank=0) at ctl.c:338
#11 0x0000000000638c14 in init_mod_child (m=0x7fcb6547f4b0, rank=0) at core/sr_module.c:780
#12 0x000000000063862d in init_mod_child (m=0x7fcb6547fb78, rank=0) at core/sr_module.c:776
#13 0x000000000063862d in init_mod_child (m=0x7fcb65480018, rank=0) at core/sr_module.c:776
#14 0x000000000063862d in init_mod_child (m=0x7fcb65480528, rank=0) at core/sr_module.c:776
#15 0x000000000063862d in init_mod_child (m=0x7fcb654809c8, rank=0) at core/sr_module.c:776
#16 0x000000000063862d in init_mod_child (m=0x7fcb65481140, rank=0) at core/sr_module.c:776
#17 0x000000000063862d in init_mod_child (m=0x7fcb654817b0, rank=0) at core/sr_module.c:776
#18 0x000000000063862d in init_mod_child (m=0x7fcb65481c38, rank=0) at core/sr_module.c:776
#19 0x00000000006385b2 in init_child (rank=0) at core/sr_module.c:825
#20 0x000000000043140c in main_loop () at main.c:1753
#21 0x000000000043df6f in main (argc=9, argv=0x7ffe7a6fbf88) at main.c:2802
```
#### Log Messages
No any useful logs available.
#### SIP Traffic
No SIP traffic available.
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
* **This is a sequence of commands that python script runs every 10 seconds:**
```
/var/lib/ums/sbin/kamcmd -s tcp:localhost:2048 stats.get_statistics websocket:
/var/lib/ums/sbin/kamcmd -s tcp:localhost:2048 stats.get_statistics tcp:
/var/lib/ums/sbin/kamcmd -s tcp:localhost:2048 stats.get_statistics shmem:
/var/lib/ums/sbin/kamcmd -s tcp:localhost:2048 mod.stats tls pkg
/var/lib/ums/sbin/kamcmd -s tcp:localhost:2048 mod.stats tls shm
/var/lib/ums/sbin/kamcmd -s tcp:localhost:2048 mod.stats websocket pkg
/var/lib/ums/sbin/kamcmd -s tcp:localhost:2048 mod.stats websocket shm
/var/lib/ums/sbin/kamcmd -s tcp:localhost:2048 mod.stats core shm
```
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.3.1 (x86_64/linux) 283e46
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_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_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: 283e46
compiled on 14:23:37 Jul 28 2020 with clang 9.0
```
* **Operating System**:
```
Linux devhpbx005-1.vx 4.9.0-12-amd64 #1 SMP Debian 4.9.210-1 (2020-01-20) x86_64 GNU/Linux
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2460
<!--
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:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot 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
Extract media stats per leg from RTPengine but in spite of labels being present in RTPengine logs the values are not extracted in their respective PV's
Note : the overall average, max and min values appear fine
### Troubleshooting
Opened Kamailio in debug mode and saw that labels are being set , yet appearing as null
Snipets
```
tagsd8:91e08b04d3:tag8:91e08b045:label6:caller7:createdi1590686836e16:in dialogue with13:tKtpK3BHjFavK6:mediasld5:indexi1e4:type5:audio8:protocol8:RTP/AVPF7
..
looking for label '<null>'
```
Full logs below in the "Log Messages" section
#### Reproduction
Using Lua on Kamailio v5.2.1
1. Add labels in RTPengine offer , ensuring the traffic is AVPF
```
local rtpengine_codecs_flag = " codec-strip-all codec-offer-PCMA codec-offer-pcma "
local rtpengine_offer_flag = "ICE=remove RTP/AVPF full-rtcp-attribute direction=external direction=external replace-origin replace-session-connection record-call=yes " .. rtpengine_codecs_flag .. " label=caller "
local rtpengine_answer_flag = "ICE=remove RTP/AVPF full-rtcp-attribute direction=external direction=external replace-origin replace-session-connection record-call=yes label=callee "
```
2. set the mos label
```
KSR.pv.sets("$avp(mos_A_label)", "caller");
```
3. Make call and do RTPengine offer and answer like usual
```
KSR.rtpengine.rtpengine_offer(rtpengine_offer_flag)
...
KSR.rtpengine.rtpengine_answer(rtpengine_answer_flag)
```
3. On BYE , do rtpengihne delete
```
KSR.rtpengine.rtpengine_delete0()
```
4. gather PV values for legs
```
KSR.log("info", "mos_A_label " .. KSR.pv.getvn("$avp(mos_A_label)", 1) .. "\n ")
KSR.log("info", "mos_average_packetloss_A " .. KSR.pv.getvn("$avp(mos_average_packetloss_A)", 0) .. "\n ")
KSR.log("info", "mos_average_jitter_A " .. KSR.pv.getvn("$avp(mos_average_jitter_A)", 0) .. "\n ")
KSR.log("info", "mos_average_roundtrip_A " .. KSR.pv.getvn("$avp(mos_average_roundtrip_A)", 0) .. "\n ")
KSR.log("info", "mos_average_A " .. KSR.pv.getvn("$avp(mos_average_A)", 0) .. "\n ")
```
#### Debugging Data
<!--
If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
local variables and the list of the code at the issue location.
gdb /path/to/kamailio /path/to/corefile
bt full
info locals
list
If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->
```
(paste your debugging data here)
```
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
Log from kamailio from BYE untill printing overall average mos score
```
4(11084) INFO: <core> [core/kemi.c:143]: sr_kemi_core_log(): >>> delete RTPengine
4(11084) DEBUG: rtpengine [rtpengine.c:2912]: select_rtpp_node_old(): rtpengine hash table lookup find node=udp:192.168.1.109:2222 for calllen=49 callid=103103ZjIzOGM1MWRlYjQxZDhjYWQ4YTlhN2I3ODg0YWNmN2I viabranch=
4(11084) DEBUG: rtpengine [rtpengine.c:2452]: rtpp_function_call(): proxy reply: d7:createdi1590686836e10:created_usi219955e11:last signali1590686836e4:SSRCd10:2899397750d11:average MOSd3:MOSi43e15:round-trip timei14365e6:jitteri0e11:packet lossi0e7:samplesi3ee10:lowest MOSd3:MOSi43e15:round-trip timei12630e6:jitteri1e11:packet lossi0e11:reported ati1590686846ee11:highest MOSd3:MOSi44e15:round-trip timei7559e6:jitteri0e11:packet lossi0e11:reported ati1590686849ee15:MOS progressiond8:intervali0e7:entriesld3:MOSi43e15:round-trip timei12630e6:jitteri1e11:packet lossi0e11:reported ati1590686846eed3:MOSi44e15:round-trip timei7559e6:jitteri0e11:packet lossi0e11:reported ati1590686849eed3:MOSi43e15:round-trip timei22908e6:jitteri0e11:packet lossi0e11:reported ati1590686855eeeee10:3469957276d11:average MOSd3:MOSi43e15:round-trip timei17045e6:jitteri0e11:packet lossi0e7:samplesi5ee10:lowest MOSd3:MOSi43e15:round-trip timei10048e6:jitteri0e11:packet lossi0e11:reported ati1590686844ee11:highest MOSd3:MOSi44e15:round-trip timei7134e6:jitteri0e11:packet lossi0e11:reported ati1590686848ee15:MOS progressiond8:intervali1e7:entriesld3:MOSi43e15:round-trip timei10048e6:jitteri0e11:packet lossi0e11:reported ati1590686844eed3:MOSi44e15:round-trip timei7134e6:jitteri0e11:packet lossi0e11:reported ati1590686848eed3:MOSi43e15:round-trip timei22738e6:jitteri0e11:packet lossi0e11:reported ati1590686852eed3:MOSi43e15:round-trip timei22566e6:jitteri0e11:packet lossi0e11:reported ati1590686853eed3:MOSi43e15:round-trip timei22739e6:jitteri0e11:packet lossi0e11:reported ati1590686854eeeeee4:tagsd8:91e08b04d3:tag8:91e08b045:label6:caller7:createdi1590686836e16:in dialogue with13:tKtpK3BHjFavK6:mediasld5:indexi1e4:type5:audio8:protocol8:RTP/AVPF7:streamsld10:local porti31052e8:endpointd6:family4:IPv47:address13:192.168.1.1084:porti58004ee19:advertised endpointd6:family4:IPv47:address13:192.168.1.1084:porti58004ee11:last packeti1590686855e5:flagsl3:RTP6:filled9:confirmed10:kernelized17:no kernel supporte4:SSRCi2899397750e5:statsd7:packetsi928e5:bytesi157696e6:errorsi12eeed10:local porti31053e8:endpointd6:family4:IPv47:address13:192.168.1.1084:porti58005ee19:advertised endpointd6:family4:IPv47:address13:192.168.1.1084:porti58005ee11:last packeti1590686855e5:flagsl4:RTCP6:filled9:confirmed10:kernelized17:no kernel supporte4:SSRCi2899397750e5:statsd7:packetsi5e5:bytesi400e6:errorsi0eeee5:flagsl11:initialized4:send4:recveeee13:tKtpK3BHjFavKd3:tag13:tKtpK3BHjFavK5:label6:callee7:createdi1590686836e16:in dialogue with8:91e08b046:mediasld5:indexi1e4:type5:audio8:protocol8:RTP/AVPF7:streamsld10:local porti31044e8:endpointd6:family4:IPv47:address13:192.168.1.1094:porti27984ee19:advertised endpointd6:family4:IPv47:address13:192.168.1.1094:porti27984ee11:last packeti1590686855e5:flagsl3:RTP6:filled9:confirmed10:kernelized17:no kernel support3:ICEe4:SSRCi3469957276e5:statsd7:packetsi653e5:bytesi112316e6:errorsi0eeed10:local porti31045e8:endpointd6:family4:IPv47:address13:192.168.1.1094:porti27985ee19:advertised endpointd6:family4:IPv47:address13:192.168.1.1094:porti27985ee11:last packeti1590686854e5:flagsl4:RTCP6:filled9:confirmed10:kernelized17:no kernel support3:ICEe4:SSRCi3469957276e5:statsd7:packetsi6e5:bytesi652e6:errorsi0eeee5:flagsl11:initialized4:send4:recv3:ICE15:ICE controllingeeeee6:totalsd3:RTPd7:packetsi1581e5:bytesi270012e6:errorsi12ee4:RTCPd7:packetsi11e5:bytesi1052e6:errorsi0eee6:result2:oke
4(11084) DEBUG: rtpengine [rtpengine.c:2536]: rtpp_function_call(): rtpengine hash table remove entry for callen=49 callid=103103ZjIzOGM1MWRlYjQxZDhjYWQ4YTlhN2I3ODg0YWNmN2I viabranch=
4(11084) DEBUG: rtpengine [rtpengine.c:3129]: parse_call_stats_1(): rtpengine: looking for label '<null>'
4(11084) DEBUG: rtpengine [rtpengine.c:3135]: parse_call_stats_1(): rtpengine: XXX got tags
4(11084) DEBUG: rtpengine [rtpengine.c:3138]: parse_call_stats_1(): rtpengine: XXX got tag
4(11084) DEBUG: rtpengine [rtpengine.c:3143]: parse_call_stats_1(): rtpengine: XXX got label caller
4(11084) DEBUG: rtpengine [rtpengine.c:3138]: parse_call_stats_1(): rtpengine: XXX got tag
4(11084) DEBUG: rtpengine [rtpengine.c:3143]: parse_call_stats_1(): rtpengine: XXX got label callee
4(11084) DEBUG: rtpengine [rtpengine.c:3129]: parse_call_stats_1(): rtpengine: looking for label '<null>'
4(11084) DEBUG: rtpengine [rtpengine.c:3135]: parse_call_stats_1(): rtpengine: XXX got tags
4(11084) DEBUG: rtpengine [rtpengine.c:3138]: parse_call_stats_1(): rtpengine: XXX got tag
4(11084) DEBUG: rtpengine [rtpengine.c:3143]: parse_call_stats_1(): rtpengine: XXX got label caller
4(11084) DEBUG: rtpengine [rtpengine.c:3138]: parse_call_stats_1(): rtpengine: XXX got tag
4(11084) DEBUG: rtpengine [rtpengine.c:3143]: parse_call_stats_1(): rtpengine: XXX got label callee
4(11084) DEBUG: app_lua [app_lua_sr.c:1024]: lua_sr_pv_get_valx(): pv set: $avp(mos_average)
4(11084) DEBUG: <core> [core/pvapi.c:395]: pv_cache_lookup(): pvar [$avp(mos_average)] found in cache
4(11084) DEBUG: app_lua [app_lua_sr.c:1651]: sr_kemi_lua_exec_func_ex(): param[0] for: log is str: info
4(11084) DEBUG: app_lua [app_lua_sr.c:1651]: sr_kemi_lua_exec_func_ex(): param[1] for: log is str: mos average 4.3
4(11084) INFO: <core> [core/kemi.c:143]: sr_kemi_core_log(): mos average 4.3
```
Logs from the same trace printing A leg values as nill , I'm using get getvn
such as
```
KSR.log("info", "mos_average_B " .. KSR.pv.getvn("$avp(mos_average_B)", 0) .. "\n ")
```
the traces thus show all values as 0
```
4(11084) INFO: <core> [core/kemi.c:143]: sr_kemi_core_log(): mos_A_label 1
4(11084) DEBUG: app_lua [app_lua_sr.c:1024]: lua_sr_pv_get_valx(): pv set: $avp(mos_average_packetloss_A)
4(11084) DEBUG: <core> [core/pvapi.c:395]: pv_cache_lookup(): pvar [$avp(mos_average_packetloss_A)] found in cache
4(11084) DEBUG: app_lua [app_lua_sr.c:1651]: sr_kemi_lua_exec_func_ex(): param[0] for: log is str: info
4(11084) DEBUG: app_lua [app_lua_sr.c:1651]: sr_kemi_lua_exec_func_ex(): param[1] for: log is str: mos_average_packetloss_A 0
4(11084) INFO: <core> [core/kemi.c:143]: sr_kemi_core_log(): mos_average_packetloss_A 0
4(11084) DEBUG: app_lua [app_lua_sr.c:1024]: lua_sr_pv_get_valx(): pv set: $avp(mos_average_jitter_A)
4(11084) DEBUG: <core> [core/pvapi.c:395]: pv_cache_lookup(): pvar [$avp(mos_average_jitter_A)] found in cache
4(11084) DEBUG: app_lua [app_lua_sr.c:1651]: sr_kemi_lua_exec_func_ex(): param[0] for: log is str: info
4(11084) DEBUG: app_lua [app_lua_sr.c:1651]: sr_kemi_lua_exec_func_ex(): param[1] for: log is str: mos_average_jitter_A 0
4(11084) INFO: <core> [core/kemi.c:143]: sr_kemi_core_log(): mos_average_jitter_A 0
4(11084) DEBUG: app_lua [app_lua_sr.c:1024]: lua_sr_pv_get_valx(): pv set: $avp(mos_average_roundtrip_A)
4(11084) DEBUG: <core> [core/pvapi.c:395]: pv_cache_lookup(): pvar [$avp(mos_average_roundtrip_A)] found in cache
4(11084) DEBUG: app_lua [app_lua_sr.c:1651]: sr_kemi_lua_exec_func_ex(): param[0] for: log is str: info
4(11084) DEBUG: app_lua [app_lua_sr.c:1651]: sr_kemi_lua_exec_func_ex(): param[1] for: log is str: mos_average_roundtrip_A 0
4(11084) INFO: <core> [core/kemi.c:143]: sr_kemi_core_log(): mos_average_roundtrip_A 0
4(11084) DEBUG: app_lua [app_lua_sr.c:1024]: lua_sr_pv_get_valx(): pv set: $avp(mos_average_A)
4(11084) DEBUG: <core> [core/pvapi.c:395]: pv_cache_lookup(): pvar [$avp(mos_average_A)] found in cache
4(11084) DEBUG: app_lua [app_lua_sr.c:1651]: sr_kemi_lua_exec_func_ex(): param[0] for: log is str: info
4(11084) DEBUG: app_lua [app_lua_sr.c:1651]: sr_kemi_lua_exec_func_ex(): param[1] for: log is str: mos_average_A 0
4(11084) INFO: <core> [core/kemi.c:143]: sr_kemi_core_log(): mos_average_A 0
4(11084) DEBUG: app_lua [app_lua_sr.c:1024]: lua_sr_pv_get_valx(): pv set: $avp(mos_B_label)
4(11084) DEBUG: <core> [core/pvapi.c:395]: pv_cache_lookup(): pvar [$avp(mos_B_label)] found in cache
4(11084) DEBUG: app_lua [app_lua_sr.c:1651]: sr_kemi_lua_exec_func_ex(): param[0] for: log is str: info
4(11084) DEBUG: app_lua [app_lua_sr.c:1651]: sr_kemi_lua_exec_func_ex(): param[1] for: log is str: mos_B_label 1
```
All IPs are local network so I didn't bother masking them
#### 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.
-->
I did manage to extract the leg A values by first commenting out pase_call stats for overall and leg B
```
//parse_call_stats_1(&global_mos_stats, dict, msg);
parse_call_stats_1(&side_A_mos_stats, dict, msg);
//parse_call_stats_1(&side_B_mos_stats, dict, msg);
```
and then commenting out the check between the label and well another label , which is where I figured it was breaking the loop
```
//if (str_cmp(&check, &label))
// continue;
```
I understand this isn't an acceptable approach and I looking forward to learning whether this really is a bug or a bad setting on my end
Initially though it an RTPengine issue and raised a bug there too
https://github.com/sipwise/rtpengine/issues/947
pretty sure it isn't an RTPenginhe issue now .
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
kamailio -v
version: kamailio 5.2.1 (x86_64/linux) b71938-dirty
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, 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_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_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: b71938 -dirty
compiled on 13:06:02 May 28 2020 with gcc 7.5.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 `uname -a`)
-->
```
Linux altanai-Inspiron-15-5578 4.15.0-62-generic #69-Ubuntu SMP Wed Sep 4 20:55:53 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2340
<!-- 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 -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2430
-- Commit Summary --
* xhttp_prom: optional disabling of metrics deletion
-- File Changes --
M src/modules/xhttp_prom/doc/xhttp_prom_admin.xml (3)
M src/modules/xhttp_prom/prom_metric.c (12)
M src/modules/xhttp_prom/xhttp_prom.c (7)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2430.patchhttps://github.com/kamailio/kamailio/pull/2430.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2430
Hello,
I am planning to release next week (likely on Friday 2nd October) the next minor version out of branch 5.2, version 5.2.8.
Backports of fixed issues from git master will be integrated as usual. If you are aware of new issues which were not yet reported, let us know (by creating an issue on the tracker).
Unless major regressions are discovered after the release, this will be the last release of the 5.2 stable branch. The current stable branches 5.3 and 5.4 will continue to be maintained.
Cheers,
Henning
--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com<https://gilawa.com/>
### Description
TOPOS Module is not handling change of to-tags in provisional responses.
When the B party sends two provisional responses (to an INVITE) with different to tags, a subsequent PRACK does not get handled/routed correctly.
In this deployment, dbtext is used.
### Troubleshooting
The TOPOS module is enabled in kamailio 5.3.6.
```
A1 Kamailio B1
INVITE -->
<-- 100
INVITE -->
<-- 100
<-- 180 (to-tag = randomtag20354)
<-- 180 (to-tag = randomtag20354)
<-- 183 (to-tag = randomtag20354DAE)
<-- 183 (to-tag = randomtag20354DAE)
PRACK (to-tag = randomtag20354DAE) -->
<-- 403 PRACK
```
The 180-Ringing response does not have a Require header field with 100rel, but the 183-Session-Progress response does have `Require:100rel` in it.
When the A1 sends the PRACK request, the to-tag matches that in the 183-Session-Progress response, but the TOPOS module does not decode the message.
Then, when kamailio processes this PRACK request, it does not have the expected Route header fields or expected RURI and cannot be routed to B1 (so a 403 response happens).
#### Reproduction
- enable TOPOS module with text database and apply it to all transactions
- make an INVITE through the proxy, with `Supported:100rel`
- send a 180-Ringing response from the B party
- send a 183-Session-Progress response from the B party, with `Require:100rel` and a different to-tag
- watch the PRACK request fail
#### Debugging Data
```
I can provide debugging data later.
```
#### Log Messages
```
I can provide logging data later.
```
#### 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).
-->
```
https://pastebin.com/XEf2Ndh2
```
### Possible Solutions
Unknown
<!--
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.3.6 (x86_64/linux) bf6c08
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_BLACKLIST, 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 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: bf6c08
compiled on 09:57:03 Sep 10 2020 with gcc 8.3.0
```
* **Operating System**:
```
Debian 10.4 in docker
4.15.0-51-generic
Client: Docker Engine - Community
Version: 19.03.5
API version: 1.40
Go version: go1.12.12
Git commit: 633a0ea838
Built: Wed Nov 13 07:29:52 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.5
API version: 1.40 (minimum version 1.12)
Go version: go1.12.12
Git commit: 633a0ea838
Built: Wed Nov 13 07:28:22 2019
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.10
GitCommit: b34a5c8af56e510852c35414db4c1f4fa6172339
runc:
Version: 1.0.0-rc8+dev
GitCommit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
docker-init:
Version: 0.18.0
GitCommit: fec3683
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2489
@linuxmaniac - closing this one, 2e7710e should fix it. Once you test and it is ok, then you can backport as needed. If still an issues, then reopen.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2479#issuecomment-701344668