Hampas-J created an issue (kamailio/kamailio#4211)
Hi,
I'm using "version: kamailio 6.0.0-dev2 (x86_64/linux) 0da3eb" to setup IMS and configured modparam("ims_ipsec_pcscf", "ipsec_preferred_ealg", "aes-cbc") to encrypt ESP payload, I can make a call, but I see the ealg is still null in SIP 401 Unauthorized message and ESP payload is not encrypted:
<img width="211" alt="Image" src="https://github.com/user-attachments/assets/f0d75ff0-1e40-429a-9511-da30cf63…" />
Is there any configuration missing?
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4211
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4211(a)github.com>
Module: kamailio
Branch: master
Commit: 92e99afa95df80c762ce60f3b9eca7b7936c74b9
URL: https://github.com/kamailio/kamailio/commit/92e99afa95df80c762ce60f3b9eca7b…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2025-04-11T10:01:17+02:00
modules: readme files regenerated - ims_registrar_scscf ... [skip ci]
---
Modified: src/modules/ims_registrar_scscf/README
---
Diff: https://github.com/kamailio/kamailio/commit/92e99afa95df80c762ce60f3b9eca7b…
Patch: https://github.com/kamailio/kamailio/commit/92e99afa95df80c762ce60f3b9eca7b…
---
diff --git a/src/modules/ims_registrar_scscf/README b/src/modules/ims_registrar_scscf/README
index 100ea1e657c..5ef62cbb0e1 100644
--- a/src/modules/ims_registrar_scscf/README
+++ b/src/modules/ims_registrar_scscf/README
@@ -682,7 +682,7 @@ switch ($retcode) {
4.8. reg_fetch_contacts(domain, uri, profile)
The function fetches the contacts for 'uri' from table 'domain' to
- pseudo-variable $imssulc(profile) [imssulc = ims scscf ulc].
+ pseudo-variable $ulc(profile) [ulc = ims scscf ulc].
Meaning of the parameters is as follows:
* domain - Name of table that should be used for the lookup of
@@ -690,8 +690,8 @@ switch ($retcode) {
* uri - The SIP URI address of the user which to fetch the contact
addresses for. It can contain pseudo-variables that are evaluated
at runtime.
- * profile - Name of $imssulc pseudo-variable profile that will store
- the fetched contacts. It is a static string.
+ * profile - Name of $ulc pseudo-variable profile that will store the
+ fetched contacts. It is a static string.
This function can be used in REQUEST_ROUTE, FAILURE_ROUTE
@@ -709,7 +709,7 @@ reg_fetch_contacts("location", "sip:user@kamailio.org", "caller");
data in that profile.
Meaning of the parameters is as follows:
- * profile - Name of $imssulc pseudo-variable profile that stores the
+ * profile - Name of $ulc pseudo-variable profile that stores the
contacts. It is a static string.
This function can be used in REQUEST_ROUTE, FAILURE_ROUTE
<!-- 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, ...)
- [ ] 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)
- [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 -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4166
-- Commit Summary --
* ims_registrar_scscf: fix reg_fetch_contacts call
* ims_registrar_scscf: fix documentation
-- File Changes --
M src/modules/ims_registrar_scscf/doc/ims_registrar_scscf_admin.xml (6)
M src/modules/ims_registrar_scscf/regpv.c (25)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4166.patchhttps://github.com/kamailio/kamailio/pull/4166.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4166
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4166(a)github.com>
Sorry, to be annoying, but I would prefer to keep here the "-1", as we are not having any memory allocated, and to stay in sync with the main registrar module.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/commit/3f942b0d9519fdc0686569ec7e02f65…
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/commit/3f942b0d9519fdc0686569ec7e02f65feaadab27/155173722(a)github.com>
henningw created an issue (kamailio/kamailio#4209)
Frequent hangs in Kamailio probably related due to lock contention in xhttp_prom module.
### Environment:
The systems are using 32 Kamailio worker processes for the relevant network interface, Its also using Prometheus counter increment operations more than 30 times in the cfg during INVITE processing. The Kamailio uses otherwise no database or other IO related services. Kamailio version 5.8.3, but no relevant changes in the xhttp_prom module could be found.
### Quick summary of the findings:
Multiple systems showed frequent hangs in their Kamailio servers on a customer setup. It happens usually after a few hours that all Kamailio processes gets blocked, and no more traffic can be processed on the respective system.
I have analysed three stack traces of the Kamailio on one of the system that showed the behaviour. Two without problems and one that was created from during a period where the server had problems.
### Details:
Here some details of the stack traces from a problematic case.
The relevant processes are from PID 494551 to 494582.
The majority of all of these processes are blocked in paths related to the Prometheus module (PID 494551 to 494576):
#### PID 494551:
```
#1 0x00007fc69ea5f053 in futex_get (lock=0x7fc4a147acd0) at ../../core/mem/../futexlock.h:108
v = 2
i = 1024
#2 0x00007fc69ea70f99 in prom_counter_inc (s_name=0x7fffe339ffa0, number=1, l1=0x7fffe339ff90, l2=0x0, l3=0x0) at prom_metric.c:1154
p = 0x6b
__func__ = "prom_counter_inc"
[…]
#14 0x00000000005ab179 in receive_msg (buf=0x9f47e0 <buf> "INVITE [sip:+1YYYYYYY737@10.XXX.XXX107](sip:+1YYYYYYYYYY737@10.XXX.XX.107) SIP/2.0\r\nRecord-Route: [sip:10.1XXX.XXX.104;lr=on;ftag=HK507HSy55p9F;dlgcor=62b91.985c3](sip:10.XXX.XXX.104;lr=on;ftag=HK507HSy55p9F;dlgcor=62b91.985c3)\r\nRecord-Route: [sip:10.XXX.XXX.117;r2=on;lr;ftag=HK507HSy55p9F](sip:10.XXX.XXX.117;r2=on;lr;ftag=HK507HSy55p9F)\r\nRecord-R"..., len=2819, rcv_info=0x7fffe33a28d0) at core/receive.c:518
```
Most of the worker processes are in the same state as shown above.
Some of the processes are also working in other Prometheus related operations:
#### PID 494554:
```
#0 prom_metric_timeout_delete (p_m=0x7fc49ea102f0) at prom_metric.c:646
current = 0x7fc4a2810fd0
ts = 1744143945433
__func__ = "prom_metric_timeout_delete"
l = 0x7fc4abffc808
#1 0x00007fc69ea676ce in prom_metric_list_timeout_delete () at prom_metric.c:668
p = 0x7fc49ea102f0
```
### Problem hypothesis:
My hypothesis is that the hang is caused from lock contention around the Prometheus module. The relevant code uses only one lock, and this together with the extensive usage of the increment counters probably causes this issues under high load.
The majority of the worker processed are occupied in the Prometheus path and are not working on SIP packets. This will cause of course an increase of the UDP queue and the described problems.
In order to test this hypothesis we removed temporarily the Prometheus logic in the kamailio cfg and see if the issue still persists. The issue did not showed up again after two days of testing, when before it was observed after a few hours.
### Possible solutions:
The Prometheus module probably needs some improvements to support better high-load and concurrency situations. On common approach is to split the locks, e.g. using a per process lock array and then combining the individual values in a second pass when read from outside.
Alternatively the xhttp_prom module should be used only carefully in situations with a high concurrency setup.
I have the full backtrace available, if helpful just let me know.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4209
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4209(a)github.com>