<!--
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
I loaded module "db_postgres.so". I expected kamilio to start. It didn't
### Troubleshooting
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### config file
```
#!KAMAILIO
#!define WITH_POSTGRESSQL
#!define WITH_AUTH
#!define WITH_USRLOCDB
#!define WITH_PRESENCE
#!define WITH_MSGREBUILD
#!define WITH_NAT
#!define WITH_NATSIPPING
..
.
..
#!ifdef WITH_POSTGRESSQL
loadmodule "db_postgres.so"
#!endif
```
#### 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).
-->
```
Jul 22 10:31:16 opensips /usr/sbin/kamailio[8975]: ERROR: <core> [db.c:204]: db_bind_mod(): Module db_postgresql not found. Missing loadmodule?
Jul 22 10:31:16 opensips /usr/sbin/kamailio[8975]: ERROR: usrloc [usrloc_mod.c:361]: mod_init(): failed to bind database module
Jul 22 10:31:16 opensips /usr/sbin/kamailio[8975]: ERROR: <core> [core/sr_module.c:942]: init_mod(): Error while initializing module usrloc (/usr/lib/x86_64-linux-gnu/kamailio/modules/usrloc.so)
```
output from ls of modules directory:
```
acc.so call_obj.so dialog.so ipops.so msrp.so presence_conference.so qos.so sipcapture.so statsd.so uid_avp_db.so
acc_diameter.so carrierroute.so dialplan.so jsonrpcs.so mtree.so presence_dialoginfo.so ratelimit.so sipdump.so stun.so uid_domain.so
alias_db.so cfg_db.so dispatcher.so keepalive.so nat_traversal.so presence_mwi.so regex.so sipjson.so tcpops.so uid_gflags.so
app_jsdt.so cfg_rpc.so diversion.so kemix.so nathelper.so presence_profile.so registrar.so sipt.so textops.so uid_uri_db.so
app_sqlang.so cfgt.so dmq.so kex.so nosip.so presence_reginfo.so rls.so siptrace.so textopsx.so uri_db.so
async.so cfgutils.so dmq_usrloc.so lcr.so outbound.so presence_xml.so rr.so siputils.so timer.so userblocklist.so
auth.so corex.so domain.so log_custom.so p_usrloc.so pua.so rtimer.so sl.so tm.so usrloc.so
auth_db.so counters.so domainpolicy.so lrkproxy.so path.so pua_bla.so rtjson.so sms.so tmrec.so xcap_client.so
auth_diameter.so ctl.so drouting.so mangler.so pdb.so pua_dialoginfo.so rtpengine.so smsops.so tmx.so xcap_server.so
auth_xkeys.so db2_ops.so enum.so matrix.so pdt.so pua_reginfo.so rtpproxy.so speeddial.so topoh.so xhttp.so
avp.so db_cluster.so evrexec.so maxfwd.so permissions.so pua_rpc.so sanity.so sqlops.so topos.so xhttp_prom.so
avpops.so db_flatstore.so exec.so mediaproxy.so pike.so pua_usrloc.so sca.so ss7ops.so tsilo.so xhttp_rpc.so
benchmark.so db_postgres.so group.so mohqueue.so pipelimit.so pua_xmpp.so sdpops.so sst.so uac.so xlog.so
blst.so db_text.so htable.so mqueue.so prefix_route.so pv.so seas.so statistics.so uac_redirect.so xprint.so
call_control.so debugger.so imc.so msilo.so presence.so pv_headers.so secfilter.so statsc.so uid_auth_db.so
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
tried renaming db_postgres.so to db_postgresql.so, but that didn't work, so I reversed it
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.5.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, 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 10.2.1
```
* **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`)
-->
```
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
Linux opensips 5.10.0-16-amd64 #1 SMP Debian 5.10.127-1 (2022-06-30) x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3196
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3196(a)github.com>
<!-- 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
- [X] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Primary goal is to update doc, for Rx_AAR() function, to mention is used only for replies.
I've also changed some LM_DBG to LM_WARN but I can revert that on request (don't want to overflow noone with warnings)
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3521
-- Commit Summary --
* ims_qos: doc update and warn logs
-- File Changes --
M src/modules/ims_qos/doc/ims_qos_admin.xml (6)
M src/modules/ims_qos/ims_qos_mod.c (16)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3521.patchhttps://github.com/kamailio/kamailio/pull/3521.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3521
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3521(a)github.com>
<!--
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.
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
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
Migrating from Kamailio 5.6.4 IMS to Kamailio 5.7.1 IMS; using Open5GS CN, Amarisoft CallBox eNB, and Huawei UE to implement VoLTE infrastructure for lab testing. VoLTE works in Kamailio 5.6.4 IMS with IPSEC and non-IPSEC UE's; but Kamailio 5.7.1 IMS not working yet with IPSEC UE.
Client and server port settings in P-CSCF kamailio.cfg:
...
modparam("ims_ipsec_pcscf", "ipsec_client_port", 5100)
modparam("ims_ipsec_pcscf", "ipsec_server_port", 6100)
...
Debug log shows ports are exchanged (server port used as client port and vice-versa):
...
Jul 18 12:15:30 corsa03 p-cscf[58287]: DEBUG: ims_ipsec_pcscf [cmd.c:460]: create_ipsec_tunnel(): Creating security associations: Local IP: 10.169.138.17 **port_pc: 6100 port_ps: 5100**; UE IP: 10.46.0.6; port_uc 31409 port_us 31894; spi_pc 4096, spi_ps 4097, spi_uc 48734730, spi_us 96335982, alg hmac-md5-96, ealg null
...
### Troubleshooting
spi_add function definition and declaration differ:
From src/modules/ims_ipsec_pcscf/spi_list.h:
int spi_add(spi_list_t *list, uint32_t spi_cid, uint32_t spi_sid,
**uint16_t cport, uint16_t sport**);
But in spi_list.c:
int spi_add(spi_list_t *list, uint32_t spi_cid, uint32_t spi_sid,
**uint16_t sport, uint16_t cport**)
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### 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).
-->
```
(paste your log messages here)
```
#### 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.
-->
Applied following patch:
--- a/src/modules/ims_ipsec_pcscf/spi_list.c 2023-06-28 09:40:45.000000000 +0200
+++ b/src/modules/ims_ipsec_pcscf/spi_list.c 2023-07-18 16:12:11.166476076 +0200
@@ -51,7 +51,7 @@
}
int spi_add(spi_list_t *list, uint32_t spi_cid, uint32_t spi_sid,
- uint16_t sport, uint16_t cport)
+ uint16_t cport, uint16_t sport)
{
if(!list) {
return 1;
Log now shows expected client and server port:
...
Jul 18 17:45:22 corsa03 p-cscf[82076]: DEBUG: ims_ipsec_pcscf [cmd.c:460]: create_ipsec_tunnel(): Creating security associations: Local IP: 10.169.138.17 **port_pc: 5100 port_ps: 6100**; UE IP: 10.46.0.6; port_uc 31411 port_us 31896; spi_pc 4096, spi_ps 4097, spi_uc 48734732, spi_us 96335984, alg hmac-md5-96, ealg null
...
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.7.1 (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 on 16:22:26 Jul 18 2023 with x86_64-pc-linux-gnu-gcc 13.1.1
```
* **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`)
-->
```
Linux corsa03 6.4.2-gentoo-x86_64 #2 SMP PREEMPT_DYNAMIC Tue Jul 11 14:35:45 CEST 2023 x86_64 AMD EPYC 7513 32-Core Processor AuthenticAMD GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3513
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3513(a)github.com>
#### 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
- [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:
<!-- 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
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3497
-- Commit Summary --
* sipcapture: use memcpy instead of strncpy for coherence
* rtpproxy: use memcpy instead of strcpy for coherence
-- File Changes --
M src/modules/rtpproxy/rtpproxy.c (40)
M src/modules/sipcapture/sipcapture.c (16)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3497.patchhttps://github.com/kamailio/kamailio/pull/3497.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3497
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3497(a)github.com>
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3520
-- Commit Summary --
* docs/ : typos
* etc/ typos
-- File Changes --
M INSTALL (2)
M doc/docbook/catalog.xml (2)
M doc/docbook/dep.xsl (4)
M doc/docbook/entities.xml (10)
M doc/docbook/html.chunked.xsl (2)
M doc/doxygen/main.dox (2)
M doc/man/kamailio.cfg.5 (2)
M doc/misc/HISTORY (10)
M doc/misc/NEWS (58)
M doc/misc/TODO (10)
M doc/misc/cvs-commit-rules.txt (6)
M doc/stylesheets/dbschema_k/catalog.xml (2)
M doc/stylesheets/dbschema_k/xsl/db_berkeley.xsl (4)
M doc/stylesheets/dbschema_k/xsl/db_redis.xsl (4)
M doc/stylesheets/dbschema_k/xsl/dbtext.xsl (4)
M doc/stylesheets/dbschema_k/xsl/mysql.xsl (2)
M doc/stylesheets/dbschema_k/xsl/pi_framework_mod.xsl (2)
M doc/tutorials/presence/cfg/ps.cfg (2)
M doc/tutorials/presence/install.xml (2)
M doc/tutorials/presence/intro.xml (4)
M doc/tutorials/serdev/routing_engine.xml (2)
M doc/tutorials/seruser/otherapps.xml (2)
M etc/kamailio.cfg (4)
M etc/sip-router.cfg (16)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3520.patchhttps://github.com/kamailio/kamailio/pull/3520.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3520
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3520(a)github.com>
Hello,
(Adding sr-dev to CC)
This looks indeed a bit strange. Do you get any error messages in the log? In which process you are freeing the memory, one of the worker processes or the RPC process?
You could also try to use another memory manager to see if you get better performance. There is a command line parameter to choose one during startup.
Cheers,
Henning
--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com<https://gilawa.com/>
From: Chaigneau, Nicolas <nicolas.chaigneau(a)capgemini.com>
Sent: Wednesday, January 18, 2023 6:49 PM
To: Kamailio (SER) - Users Mailing List <sr-users(a)lists.kamailio.org>
Subject: [SR-Users] Performances issue when freeing shared memory in custom module (Kamailio 5.5.2)
Hello,
I'm encountering performance issues with Kamailio (5.5.2).
I'm using a custom Kamailio module that loads routing data in memory, using Kamailio shared memory.
This routing data is very large. It can be fully reloaded through a Kamailio RPC command (which is done once each day).
When reloading, two sets of data are maintained, one "loading" and another "current" (the latter being used to handle SIP requests).
When loading of the new data is finished, it is swapped to "current". Then, memory of the old (now unused) data is freed.
I've noticed that when Kamailio is freeing the old data, there is a very significant performance impact on SIP requests.
This is surprising to me, because the SIP requests do not use this old data.
This is not a CPU issue, idle CPU% is at about 99% at that moment.
I'm using the following functions :
- shm_mallocxz
- shm_free
From what I understand, shm_free is actually "qm_shm_free" defined in "src\core\mem\q_malloc.c" (the default shared memory manager being "qm").
I've noticed that there is also a variant shm_free_unsafe ("qm_free"), which does not perform locking.
I'm wondering if the lock could be the cause of my performances issues ?
(But I'm not sure how this could be possible, because although the SIP requests need to access the shared memory allocated, they do not use directly the functions from the share memory manager.)
If the performances issues are causes by the lock, could I use the unsafe version "safely" ? (considering that it is guaranteed that the old data cannot be used by anyone else)
Thanks for your help.
Regards,
Nicolas.
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
**Description**
We are using ims_charging module and Freediameter as diameter server for billing process....recently we faced one issue...For Initial **INVITEs** kamailio sending **CCR request (INITIAL_REQUEST)** to **diameter server** but if we receive Immediate **CANCLE** for the **INVITE**, kamailio sending **CCR request ( TERMINATE_REQUEST )** without waiting for the **CCR request (INITIAL_REQUEST) response** from the **Diameter server.**..
**Expected behavior**
Kamailio has to send **CCR request ( TERMINATE_REQUEST )** after getting the **response** from the **INITIAL_REQUEST.**
**Additional Info**
kamailio server : 4.2
platform : 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/2143
#### 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
- [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:
<!-- 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
- [x] Related to issue #3502
#### Description
From https://www.openssl.org/docs/man3.0/man7/migration_guide.html
> Use of low-level digest functions such as SHA1_Init(3) have been informally
> discouraged from use for a long time. Applications should instead use the
> high level EVP APIs EVP_DigestInit_ex(3), EVP_DigestUpdate(3) and
> EVP_DigestFinal_ex(3), or the quick one-shot EVP_Q_digest(3).
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3518
-- Commit Summary --
* crypto: SHA1_Init deprecated at openssl 3.0
-- File Changes --
M src/modules/crypto/crypto_uuid.c (19)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3518.patchhttps://github.com/kamailio/kamailio/pull/3518.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3518
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3518(a)github.com>