Module: kamailio
Branch: master
Commit: 48d97c1941f660aa396b5ef100584611cf92ad21
URL: https://github.com/kamailio/kamailio/commit/48d97c1941f660aa396b5ef10058461…
Author: Dragos Vingarzan <vingarzan(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-06-21T12:57:56+02:00
textopx/doc: fixed hard-to-read documentation for textopsx
- was missing line-wraps in examples list, hence very hard to read
---
Modified: src/modules/textopsx/doc/selects.xml
---
Diff: https://github.com/kamailio/kamailio/commit/48d97c1941f660aa396b5ef10058461…
Patch: https://github.com/kamailio/kamailio/commit/48d97c1941f660aa396b5ef10058461…
---
diff --git a/src/modules/textopsx/doc/selects.xml b/src/modules/textopsx/doc/selects.xml
index 6d4dd4e3a25..3c72c21cd36 100644
--- a/src/modules/textopsx/doc/selects.xml
+++ b/src/modules/textopsx/doc/selects.xml
@@ -9,30 +9,35 @@
<title>@hf_value</title>
<para>
Get value of required header-value or param. Note that functions called 'value2'
- works with Authorization-like headers where comma is not treated as value delimiter. Formats:
- @hf_value.HFNAME[IDX] # idx value, negative value counts from bottom
- @hf_value.HFNAME.PARAM_NAME
- @hf_value.HFNAME[IDX].PARAM_NAME
- @hf_value.HFNAME.p.PARAM_NAME # or .param., useful if required called "uri", "p", "param"
- @hf_value.HFNAME[IDX].p.PARAM_NAME # dtto
- @hf_value.HFNAME[IDX].uri # (< & > excluded)
- @hf_value.HFNAME[*] # return comma delimited list of all values (combines headers)
- @hf_value.HFNAME # the same as above [*] but may be parsed by cfg.y
- @hf_value.HFNAME[*].uri # return comma delimited list of uris (< & > excluded)
- @hf_value.HFNAME.uri # the same as above [*] but may be parsed by cfg.y
- @hf_value.HFNAME[IDX].name # returns name part, quotes excluded
- @hf_value.HFNAME.name # returns name part of the first value
+ works with Authorization-like headers where comma is not treated as value delimiter.
+ </para>
+ <para>
+ Formats:
+ <itemizedlist>
+ <listitem>@hf_value.HFNAME[IDX] # idx value, negative value counts from bottom</listitem>
+ <listitem>@hf_value.HFNAME.PARAM_NAME</listitem>
+ <listitem>@hf_value.HFNAME[IDX].PARAM_NAME</listitem>
+ <listitem>@hf_value.HFNAME.p.PARAM_NAME # or .param., useful if required called "uri", "p", "param"</listitem>
+ <listitem>@hf_value.HFNAME[IDX].p.PARAM_NAME # dtto</listitem>
+ <listitem>@hf_value.HFNAME[IDX].uri # (< & > excluded)</listitem>
+ <listitem>@hf_value.HFNAME[*] # return comma delimited list of all values (combines headers)</listitem>
+ <listitem>@hf_value.HFNAME # the same as above [*] but may be parsed by cfg.y</listitem>
+ <listitem>@hf_value.HFNAME[*].uri # return comma delimited list of uris (< & > excluded)</listitem>
+ <listitem>@hf_value.HFNAME.uri # the same as above [*] but may be parsed by cfg.y</listitem>
+ <listitem>@hf_value.HFNAME[IDX].name # returns name part, quotes excluded</listitem>
+ <listitem>@hf_value.HFNAME.name # returns name part of the first value</listitem>
- @hf_value2.HFNAME # returns value of first header
- @hf_value2.HFNAME[IDX] # returns value of idx's header
- @hf_value2.HFNAME.PARAM_NAME
- @hf_value2.HFNAME[IDX].PARAM_NAME
+ <listitem>@hf_value2.HFNAME # returns value of first header</listitem>
+ <listitem>@hf_value2.HFNAME[IDX] # returns value of idx's header</listitem>
+ <listitem>@hf_value2.HFNAME.PARAM_NAME</listitem>
+ <listitem>@hf_value2.HFNAME[IDX].PARAM_NAME</listitem>
- @hf_value.HFNAME[IDX].uri # return URI, quotes excluded
- @hf_value.HFNAME.p.uri # returns param named uri, not URI itself
- @hf_value.HFNAME.p.name # returns param named name, not name itself
- @hf_value.HFNAME[IDX].uri.name # any sel_any_uri nested features may be used
- @hf_value.HFNAME[IDX].nameaddr.name # select_any_nameaddr
+ <listitem>@hf_value.HFNAME[IDX].uri # return URI, quotes excluded</listitem>
+ <listitem>@hf_value.HFNAME.p.uri # returns param named uri, not URI itself</listitem>
+ <listitem>@hf_value.HFNAME.p.name # returns param named name, not name itself</listitem>
+ <listitem>@hf_value.HFNAME[IDX].uri.name # any sel_any_uri nested features may be used</listitem>
+ <listitem>@hf_value.HFNAME[IDX].nameaddr.name # select_any_nameaddr</listitem>
+ </itemizedlist>
</para>
<para>Meaning of the parameters is as follows:</para>
<itemizedlist>
### Description
We are using Kamailio 5.7.4 on Debian 12 (from http://deb.kamailio.org/kamailio57) with rtpengine as an Edgeproxy for our clients. The instance terminates SIP/TLS (with Cliencertificates) and forwards the SIP Traffic to internal systems.
After some days we are getting errors like this
`tls_complete_init(): tls: ssl bug #1491 workaround: not enough memory for safe operation: shm=7318616 threshold1=8912896`
First we thought Kamailio just doesnt have enough memory, so we doubled it..
But after some days the Logmessage (and Userissues) occured again.
So we monitored the shmmem statistics and found that used and max_used are constantly growing til it reaches the limit.
As i mentioned we are using client-certificates and so we are also using the CRL feature.
We do have a systemd-timer which fetches the CRL every hour and runs 'kamcmd tls.reload' when finished.
Our tls.cfg looks like this:
```
[server:default]
method = TLSv1.2+
private_key = /etc/letsencrypt/live/hostname.de/privkey.pem
certificate = /etc/letsencrypt/live/hostname.de/fullchain.pem
ca_list = /etc/kamailio/ca_list.pem
ca_path = /etc/kamailio/ca_list.pem
crl = /etc/kamailio/combined.crl.pem
verify_certificate = yes
require_certificate = yes
[client:default]
verify_certificate = yes
require_certificate = yes
```
After testing a bit we found that every time tls.reload is executed Kamailio consumes a bit more memory which eventually leads to all the memory being consumed which leads to issues for our users.
See following example:
```
[0][root@edgar-dev:~]# while true ; do /usr/sbin/kamcmd tls.reload ; /usr/sbin/kamcmd core.shmmem ; sleep 1 ; done
Ok. TLS configuration reloaded.
{
total: 268435456
free: 223001520
used: 41352552
real_used: 45433936
max_used: 45445968
fragments: 73
}
Ok. TLS configuration reloaded.
{
total: 268435456
free: 222377960
used: 41975592
real_used: 46057496
max_used: 46069232
fragments: 78
}
Ok. TLS configuration reloaded.
{
total: 268435456
free: 221748664
used: 42604992
real_used: 46686792
max_used: 46698080
fragments: 77
}
Ok. TLS configuration reloaded.
{
total: 268435456
free: 221110832
used: 43242408
real_used: 47324624
max_used: 47335608
fragments: 81
}
^C
[130][root@edgar-dev:~]#
```
### Troubleshooting
#### Reproduction
Everytime tls.reload is called the memory consumptions grows..
#### 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.
-->
```
If you let me know what would be interesting for tracking this down, i am happy to provide logs/debugging data!
```
#### 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).
-->
```
If you let me know what would be interesting for tracking this down, i am happy to provide logs/debugging data!
```
#### SIP Traffic
SIP doesnt seem to be relevant here
### Possible Solutions
Calling tls.reload less often or restart kamailio before memory is consumed ;)
### Additional Information
```
version: kamailio 5.7.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_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**:
```
* Debian GNU/Linux 12 (bookworm)
* Linux edgar-dev 6.1.0-20-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.85-1 (2024-04-11) x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3823
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3823(a)github.com>
#### Pre-Submission Checklist
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] 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:
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #3592
#### Description
The `kamailio-geoip` RPM sub package currently builds both the `geoip` module - based on [the old and out of support MaxMind GeoIP library](https://github.com/maxmind/geoip-api-c) - and the newer `geoip2` module - based on [the currently supported `libmaxminddb`](https://github.com/maxmind/libmaxminddb).
The old GeoIP C library had its end of support date at May 2022 but for a while was still shipped for many distributions. At this point though, the EPEL repository that shipped the GeoIP library for RHEL-based operating systems, has removed it from their repositories for "Enterprise Linux 9":
![Screenshot_20240620_144233](https://github.com/kamailio/kamailio/assets/381782/bb1f2481-57f7-48af-b0f1-0ba1c14a3042)
Therefor builds using the bundled spec file fail on EL9 installations.
The suggested change is to add an RPM build option `--with geoip2` that when specified will build just the `geoip2` module for the `kamailio-geoip` RPM subpackage. This build option is not enabled by default, unless the build is running on a RHEL 9 based OS - in which case it is set as the default, because otherwise trivial builds break. To revert to the older behavior in RHEL 9 based OSs (and assuming you have the required unsupported library installed correctly) one will need to set both `--without geoip2 --with geoip`.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3886
-- Commit Summary --
* packaging: RPM build option to build just the geoip2 module
* packaging: make 'with geoip2' the default behavior for EL9
-- File Changes --
M pkg/kamailio/obs/kamailio.spec (36)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3886.patchhttps://github.com/kamailio/kamailio/pull/3886.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3886
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3886(a)github.com>
When I start Kamailio master version that has been built on Debian 12 with default-libmysqlclient-dev depending on libmariadb-dev-compat, several warnings like this are produced:
```
2024-06-17T14:48:27.702827+03:00 siika /usr/bin/sip-proxy[297246]: WARNING: db_mysql
[km_my_con.c:187]: db_mysql_new_connection(): opt_ssl_ca option not supported by mysql
version (value (null)) - ignoring
```
The only db_mysql configuration option used in the config is ping_interval.
I would expect that the warnings are not produced like it is the case when I build Kamailio branch 5.8.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3884
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3884(a)github.com>
### Description
amqp_ssl_socket_set_*() functions are just for amqp_ssl_socket sockets
#### Reproduction
```
loadmodule "rabbitmq.so"
modparam("rabbitmq", "url", "amqp://guest:guest@rabbitmq:5672/%2Fkamailio")
```
#### Debugging Data
```
(gdb) bt
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
#1 0x00007fd60b427e8f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2 0x00007fd60b3d8fb2 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x00007fd60b3c3472 in __GI_abort () at ./stdlib/abort.c:79
#4 0x00007fd5f5a78831 in amqp_abort (fmt=fmt@entry=0x7fd5f5a82358 "<%p> is not of type amqp_ssl_socket_t") at ./librabbitmq/amqp_api.c:183
#5 0x00007fd5f5a7f032 in amqp_ssl_socket_set_verify_peer (base=<optimized out>, verify=verify@entry=0) at ./librabbitmq/amqp_openssl.c:519
#6 0x00007fd5f5a8adf1 in rabbitmq_connect (conn=0x7fd5f5a98328 <amqp_conn>) at ./src/modules/rabbitmq/rabbitmq.c:610
#7 0x00007fd5f5a918e7 in mod_child_init (rank=-127) at ./src/modules/rabbitmq/rabbitmq.c:180
#8 0x000055ec03183a8f in init_mod_child (m=0x7fd607c8bd00, rank=-127) at core/sr_module.c:920
#9 0x000055ec031887ab in init_child (rank=rank@entry=-127) at core/sr_module.c:999
#10 0x000055ec02ff5e07 in main_loop () at ./src/main.c:1725
#11 0x000055ec02feba87 in main (argc=<optimized out>, argv=<optimized out>) at ./src/main.c:3256
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3883
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3883(a)github.com>