- allows custom tags to be added to prometheus metrics
- Addresses GH issue #4021
<!-- 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 -->
- [X] PR should be backported to stable branches
- [X] Tested changes locally
- [X] Related to issue #4021
#### Description
<!-- Describe your changes in detail -->
This change adds a new parameter `xhttp_prom_tags`. It allows the user to append tags to the prometheus metrics. This makes those metrics a lot more useful when having multiple kamailio instances running on a single host.
This is done by 2 shared memory helper variables which contain the parameter in different formats. This way it is easy to print them out with minimal changes.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4073
-- Commit Summary --
* xhttp_prom: new xhttp_prom_tags paramete
-- File Changes --
M src/modules/xhttp_prom/doc/xhttp_prom_admin.xml (25)
M src/modules/xhttp_prom/prom.c (30)
M src/modules/xhttp_prom/xhttp_prom.c (50)
M src/modules/xhttp_prom/xhttp_prom.h (15)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4073.patchhttps://github.com/kamailio/kamailio/pull/4073.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4073
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4073(a)github.com>
### Introduction
First, I apologize for the lack of detail here. I am unable to get a core dump and as a production box, I was unable to run in debug mode.
### Description
Using Kamailio 5.8.4 on Debian 12, every 60-80 minutes, the software would crash, blaming tls_wolfssl, such as:
```
2024-12-16T14:58:27.554497+00:00 ip-172-16-0-52 /usr/local/sbin/kamailio[9084]: CRITICAL: <core> [core/mem/q_malloc.c:535]: qm_free(): BUG: bad pointer 0x1 (out of memory block!) called from tls_wolfssl: tls_init.c: ser_free(240) - ignoring
2024-12-16T14:58:27.554555+00:00 ip-172-16-0-52 /usr/local/sbin/kamailio[9084]: CRITICAL: <core> [core/mem/q_malloc.c:126]: qm_debug_check_frag(): BUG: qm: fragm. 0x7f3440ba7560 (address 0x7f3440ba75a0) beginning overwritten (23)! Memory allocator was called from tls_wolfssl: tls_init.c:240. Fragment marked by :29. Exec from core/mem/q_malloc.c:546.
2024-12-16T14:58:27.616558+00:00 ip-172-16-0-52 /usr/local/sbin/kamailio[9089]: CRITICAL: <core> [core/pass_fd.c:281]: receive_fd(): EOF on 103
2024-12-16T14:58:27.617684+00:00 ip-172-16-0-52 /usr/local/sbin/kamailio[8992]: ALERT: <core> [main.c:805]: handle_sigs(): child process 9084 exited by a signal 6
2024-12-16T14:58:27.618339+00:00 ip-172-16-0-52 /usr/local/sbin/kamailio[8992]: ALERT: <core> [main.c:809]: handle_sigs(): core was not generated
2024-12-16T14:58:27.618477+00:00 ip-172-16-0-52 /usr/local/sbin/kamailio[8992]: INFO: <core> [main.c:832]: handle_sigs(): terminating due to SIGCHLD
2024-12-16T14:58:27.618589+00:00 ip-172-16-0-52 /usr/local/sbin/kamailio[9088]: INFO: <core> [main.c:888]: sig_usr(): signal 15 received
```
```
2024-12-16T14:57:52.029277+00:00 ip-172-16-0-73 /usr/local/sbin/kamailio[21605]: CRITICAL: <core> [core/mem/q_malloc.c:535]: qm_free(): BUG: bad pointer 0x1 (out of memory block!) called from tls_wolfssl: tls_init.c: ser_free(240) - ignoring
2024-12-16T14:57:52.029347+00:00 ip-172-16-0-73 /usr/local/sbin/kamailio[21605]: CRITICAL: <core> [core/mem/q_malloc.c:126]: qm_debug_check_frag(): BUG: qm: fragm. 0x7f085996b500 (address 0x7f085996b540) beginning overwritten (0)! Memory allocator was called from tls_wolfssl: tls_init.c:240. Fragment marked by (null):0. Exec from core/mem/q_malloc.c:546.
2024-12-16T14:57:52.048597+00:00 ip-172-16-0-73 /usr/local/sbin/kamailio[21611]: CRITICAL: <core> [core/pass_fd.c:281]: receive_fd(): EOF on 101
2024-12-16T14:57:52.048921+00:00 ip-172-16-0-73 /usr/local/sbin/kamailio[21512]: ALERT: <core> [main.c:805]: handle_sigs(): child process 21605 exited by a signal 6
2024-12-16T14:57:52.048953+00:00 ip-172-16-0-73 /usr/local/sbin/kamailio[21512]: ALERT: <core> [main.c:809]: handle_sigs(): core was not generated
2024-12-16T14:57:52.048975+00:00 ip-172-16-0-73 /usr/local/sbin/kamailio[21512]: INFO: <core> [main.c:832]: handle_sigs(): terminating due to SIGCHLD
2024-12-16T14:57:52.048997+00:00 ip-172-16-0-73 /usr/local/sbin/kamailio[21609]: INFO: <core> [main.c:888]: sig_usr(): signal 15 received
```
```
2024-12-16T16:21:35.967576+00:00 ip-172-16-0-52 /usr/local/sbin/kamailio[10591]: CRITICAL: <core> [core/mem/q_malloc.c:126]: qm_debug_check_frag(): BUG: qm: fragm. 0x7f442778d110 (address 0x7f442778d150) beginning overwritten (0)! Memory allocator was called from tls_wolfssl: tls_init.c:240. Fragment marked by (null):0. Exec from core/mem/q_malloc.c:546.
```
```
2024-12-16T13:31:55.995222+00:00 ip-172-16-0-52 /usr/local/sbin/kamailio[7602]: CRITICAL: <core> [core/mem/q_malloc.c:555]: qm_free(): BUG: freeing already freed pointer (0x7f8e55830a70), called from tls_wolfssl: tls_init.c: ser_free(240), first free tls_wolfssl: tls_init.c: ser_malloc(228) - ignoring
2024-12-16T13:32:40.093954+00:00 ip-172-16-0-52 /usr/local/sbin/kamailio[7603]: CRITICAL: <core> [core/mem/q_malloc.c:535]: qm_free(): BUG: bad pointer 0x7a100000000 (out of memory block!) called from tls_wolfssl: tls_init.c: ser_free(240) - ignoring
2024-12-16T13:32:40.094047+00:00 ip-172-16-0-52 /usr/local/sbin/kamailio[7603]: CRITICAL: <core> [core/mem/q_malloc.c:126]: qm_debug_check_frag(): BUG: qm: fragm. 0x7f8e55762720 (address 0x7f8e55762760) beginning overwritten (0)! Memory allocator was called from tls_wolfssl: tls_init.c:240. Fragment marked by (null):0. Exec from core/mem/q_malloc.c:546.
2024-12-16T13:32:40.260913+00:00 ip-172-16-0-52 /usr/local/sbin/kamailio[7504]: CRITICAL: <core> [core/mem/q_malloc.c:555]: qm_free(): BUG: freeing already freed pointer (0x7f8e55761a70), called from core: core/tcp_main.c: _tcpconn_free(1666), first free tls_wolfssl: tls_init.c: ser_free(240) - ignoring
2024-12-16T13:32:40.263520+00:00 ip-172-16-0-52 /usr/local/sbin/kamailio[7504]: CRITICAL: <core> [core/mem/q_malloc.c:126]: qm_debug_check_frag(): BUG: qm: fragm. 0x7f8e55762720 (address 0x7f8e55762760) beginning overwritten (0)! Memory allocator was called from tls_wolfssl: tls_init.c:240. Fragment marked by (null):0. Exec from core/mem/q_malloc.c:546.
```
The system was handling ~900 TLS registrations with ~2700 presence SUBSCRIBE events.
**Running the same config with `tls.so` does not result in crash.**
### Additional Information
* **Kamailio Version** - 5.8.4
```
version: kamailio 5.8.4 (x86_64/linux) 598105-dirty
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: 598105 -dirty
compiled on 04:31:34 Dec 16 2024 with gcc 12.2.0
```
* **Operating System**:
```
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
Linux ip-172-16-0-52 6.1.0-28-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1 (2024-11-22) x86_64 GNU/Linux
```
* TCP Settings
```
children=16
disable_tcp=no
tcp_connection_lifetime=3605
tcp_accept_no_cl=yes
tcp_max_connections=8192
tcp_defer_accept=yes
tcp_accept_unique=0
tcp_connection_lifetime=3605
tcp_connection_match=1
tcp_connect_timeout=10
tcp_crlf_ping=yes
tcp_linger2=1
tcp_keepalive=yes
tcp_reuse_port=yes
tcp_keepidle=20
tcp_keepintvl=15
tcp_rd_buf_size=65536
tcp_msg_data_timeout=40
tcp_msg_read_timeout=40
tcp_check_timer=20
tls_threads_mode=2
tls_max_connections=8192
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4074
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4074(a)github.com>
### Description
Ping @xkaraman
cmake error on installation; it seems to be looking for various xxxxx.txt files
```
cmake --install .
-- Install configuration: "Debug"
-- Installing: /home/centos/src/CHROOT/usr/local/kamailio/sbin/kamailio
-- kamailio.cfg already exists in /home/centos/src/CHROOT/usr/local/kamailio/etc/kamailio/kamailio.cfg Installing as kamailio.sample
-- Up-to-date: /home/centos/src/CHROOT/usr/local/kamailio/etc/kamailio/kamailio.cfg.sample
-- Installing: /home/centos/src/CHROOT/usr/local/kamailio/lib64/kamailio/modules/async.so
-- Set runtime path of "/home/centos/src/CHROOT/usr/local/kamailio/lib64/kamailio/modules/async.so" to "/usr/local/kamailio/lib64/kamailio"
-- Installing: /home/centos/src/CHROOT/usr/local/kamailio/share/doc/kamailio/modules/README.async
-- Installing: /home/centos/src/CHROOT/usr/local/kamailio/lib64/kamailio/modules/auth.so
-- Set runtime path of "/home/centos/src/CHROOT/usr/local/kamailio/lib64/kamailio/modules/auth.so" to "/usr/local/kamailio/lib64/kamailio"
CMake Error at src/modules/cmake_install.cmake:96 (file):
file INSTALL cannot find
"/home/centos/src/kamailio-5.8/src/modules/auth/auth.txt": No such file or
directory.
Call Stack (most recent call first):
src/cmake_install.cmake:85 (include)
cmake_install.cmake:47 (include)
```
### Troubleshooting
#### Reproduction
```
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/kamailio .
cmake --build .
DESTDIR=~/temp/INSTALLROOT cmake --install .
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4076
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4076(a)github.com>
Module: kamailio
Branch: master
Commit: 763d3622fdb2cdd7916963b6d3f4d532525a5fcc
URL: https://github.com/kamailio/kamailio/commit/763d3622fdb2cdd7916963b6d3f4d53…
Author: Xenofon Karamanos <xk(a)gilawa.com>
Committer: Xenofon Karamanos <xk(a)gilawa.com>
Date: 2024-12-17T13:31:59Z
cmake: Make docs install optional
---
Modified: cmake/modules-docs.cmake
---
Diff: https://github.com/kamailio/kamailio/commit/763d3622fdb2cdd7916963b6d3f4d53…
Patch: https://github.com/kamailio/kamailio/commit/763d3622fdb2cdd7916963b6d3f4d53…
---
diff --git a/cmake/modules-docs.cmake b/cmake/modules-docs.cmake
index f4ac35d3ba6..53beeae6fb9 100644
--- a/cmake/modules-docs.cmake
+++ b/cmake/modules-docs.cmake
@@ -140,6 +140,9 @@ else()
RENAME README.${MODULE_NAME}
DESTINATION ${CMAKE_INSTALL_DOCDIR}/modules
COMPONENT kamailio_docs
+ # Since the depepndencies might not have been build as they are not in the default target
+ # and required to build explicitly using `make kamailio_docs`, allow them to be optional.
+ OPTIONAL
)
endif()
Discussion to define cmake format options and coding/naming styles. It is better to define most of them now to have coherency in the future. Started from the discussion on #4066.
Comment with what you would like to have, describing when useful why your proposal is a good/better option.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4075
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4075(a)github.com>
Hello,
the formal notification that the development for the next major version
6.0.0 is now frozen. The focus has to be on testing the master branch.
Also, the master branch should not get commits with new features till
the branch 6.0 is created, expected to happen in 2-4 weeks, a matter of
how testing goes on. Meanwhile, the commits with new features in the C
code can be pushed to personal branches, new pull requests can still be
done, but they will be merged after branching 6.0.
Can still be done commits with documentation improvements, enhancements
to related tools (e.g., kamctl, kamcmd), merging exiting pull requests
at this moment, exporting missing KEMI functions and completing the
functionality of the new modules added for 6.0.
Once the branch 6.0 is created, new features can be pushed again to
master branch as usual. From that moment, the v6.0.0 should be out very
soon, time used for further testing but also preparing the release of
packages.
If someone is not sure if a commit brings a new feature, just make a
pull request and it can be discussed there on github portal or via
sr-dev mailing list.
A summary of what is new in upcoming 6.0 is going to be built at:
* https://www.kamailio.org/wikidocs/features/new-in-6.0.x/
Upgrade guidelines will be collected at:
* https://www.kamailio.org/wikidocs/install/upgrade/5.8.x-to-6.0.0/
Everyone is more than welcome to contribute to the above wiki pages,
especially to the upgrade guidelines, to help everyone else during the
migration process from v5.8.x to 6.0.x.
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com