### Description
I recently downloaded kamailio 5.2.3 and tried to install it for investigation purposes. I was trying to include app_java module in order to execute some brief java apps in kamailio. But then I get the same issue wen I compile and when I run kamailio
Thank you for all the help you can give me
### Troubleshooting
I get the same bunch of warnings everytime I try to make all
java_msgobj.c: In function ‘fill_sipmsg_object’:
java_msgobj.c:83:27: warning: passing argument 2 of ‘(*env)->SetIntField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetIntField(env, SipMsgInstance, fid, msg->id);
^~~~~~~~~~~~~~
java_msgobj.c:83:27: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:96:27: warning: passing argument 2 of ‘(*env)->SetIntField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetIntField(env, SipMsgInstance, fid, msg->pid);
^~~~~~~~~~~~~~
java_msgobj.c:96:27: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:110:30: warning: passing argument 2 of ‘(*env)->SetObjectField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetObjectField(env, SipMsgInstance, fid, jStrParam);
^~~~~~~~~~~~~~
java_msgobj.c:110:30: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:127:30: warning: passing argument 2 of ‘(*env)->SetObjectField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetObjectField(env, SipMsgInstance, fid, jStrParam);
^~~~~~~~~~~~~~
java_msgobj.c:127:30: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:142:30: warning: passing argument 2 of ‘(*env)->SetObjectField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetObjectField(env, SipMsgInstance, fid, jStrParam);
^~~~~~~~~~~~~~
java_msgobj.c:142:30: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:156:27: warning: passing argument 2 of ‘(*env)->SetIntField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetIntField(env, SipMsgInstance, fid, msg->len);
^~~~~~~~~~~~~~
java_msgobj.c:156:27: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:172:30: warning: passing argument 2 of ‘(*env)->SetObjectField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetObjectField(env, SipMsgInstance, fid, jStrParam);
^~~~~~~~~~~~~~
java_msgobj.c:172:30: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:189:30: warning: passing argument 2 of ‘(*env)->SetObjectField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetObjectField(env, SipMsgInstance, fid, jStrParam);
^~~~~~~~~~~~~~
java_msgobj.c:189:30: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:205:27: warning: passing argument 2 of ‘(*env)->SetIntField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetIntField(env, SipMsgInstance, fid, msg->parsed_orig_ruri_ok);
^~~~~~~~~~~~~~
java_msgobj.c:205:27: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:222:30: warning: passing argument 2 of ‘(*env)->SetObjectField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetObjectField(env, SipMsgInstance, fid, jStrParam);
^~~~~~~~~~~~~~
java_msgobj.c:222:30: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:237:27: warning: passing argument 2 of ‘(*env)->SetIntField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetIntField(env, SipMsgInstance, fid, msg->add_to_branch_len);
^~~~~~~~~~~~~~
java_msgobj.c:237:27: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:251:27: warning: passing argument 2 of ‘(*env)->SetIntField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetIntField(env, SipMsgInstance, fid, msg->hash_index);
^~~~~~~~~~~~~~
java_msgobj.c:251:27: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:265:27: warning: passing argument 2 of ‘(*env)->SetIntField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetIntField(env, SipMsgInstance, fid, msg->msg_flags);
^~~~~~~~~~~~~~
java_msgobj.c:265:27: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:286:30: warning: passing argument 2 of ‘(*env)->SetObjectField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetObjectField(env, SipMsgInstance, fid, jStrParam);
^~~~~~~~~~~~~~
java_msgobj.c:286:30: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
java_msgobj.c:306:30: warning: passing argument 2 of ‘(*env)->SetObjectField’ from incompatible pointer type [-Wincompatible-pointer-types]
(*env)->SetObjectField(env, SipMsgInstance, fid, jStrParam);
^~~~~~~~~~~~~~
java_msgobj.c:306:30: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘struct _jobject **’
CC (gcc) [M app_java.so] java_support.o
CC (gcc) [M app_java.so] java_iface.o
java_iface.c: In function ‘java_exec’:
java_iface.c:205:53: warning: passing argument 2 of ‘(*_aj_env)->NewLocalRef’ from incompatible pointer type [-Wincompatible-pointer-types]
invk_method_ref = (*_aj_env)->NewLocalRef(_aj_env, invk_method);
^~~~~~~~~~~
java_iface.c:205:53: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
java_iface.c:205:18: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
invk_method_ref = (*_aj_env)->NewLocalRef(_aj_env, invk_method);
^
java_iface.c:208:39: warning: passing argument 2 of ‘(*_aj_env)->DeleteLocalRef’ from incompatible pointer type [-Wincompatible-pointer-types]
(*_aj_env)->DeleteLocalRef(_aj_env, invk_method_ref);
^~~~~~~~~~~~~~~
java_iface.c:208:39: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
java_iface.c:216:40: warning: passing argument 2 of ‘(*_aj_env)->MonitorEnter’ from incompatible pointer type [-Wincompatible-pointer-types]
if((*_aj_env)->MonitorEnter(_aj_env, invk_method_ref) != JNI_OK) {
^~~~~~~~~~~~~~~
java_iface.c:216:40: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
java_iface.c:234:40: warning: passing argument 2 of ‘(*_aj_env)->DeleteLocalRef’ from incompatible pointer type [-Wincompatible-pointer-types]
(*_aj_env)->DeleteLocalRef(_aj_env, invk_method_ref);
^~~~~~~~~~~~~~~
java_iface.c:234:40: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
java_iface.c:235:40: warning: passing argument 2 of ‘(*_aj_env)->DeleteLocalRef’ from incompatible pointer type [-Wincompatible-pointer-types]
(*_aj_env)->DeleteLocalRef(_aj_env, invk_method);
^~~~~~~~~~~
java_iface.c:235:40: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
java_iface.c:258:39: warning: passing argument 2 of ‘(*_aj_env)->DeleteLocalRef’ from incompatible pointer type [-Wincompatible-pointer-types]
(*_aj_env)->DeleteLocalRef(_aj_env, invk_method_ref);
^~~~~~~~~~~~~~~
java_iface.c:258:39: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
java_iface.c:259:39: warning: passing argument 2 of ‘(*_aj_env)->DeleteLocalRef’ from incompatible pointer type [-Wincompatible-pointer-types]
(*_aj_env)->DeleteLocalRef(_aj_env, invk_method);
^~~~~~~~~~~
java_iface.c:259:39: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
java_iface.c:266:39: warning: passing argument 2 of ‘(*_aj_env)->MonitorExit’ from incompatible pointer type [-Wincompatible-pointer-types]
if((*_aj_env)->MonitorExit(_aj_env, invk_method_ref) != JNI_OK) {
^~~~~~~~~~~~~~~
java_iface.c:266:39: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
java_iface.c:272:38: warning: passing argument 2 of ‘(*_aj_env)->DeleteLocalRef’ from incompatible pointer type [-Wincompatible-pointer-types]
(*_aj_env)->DeleteLocalRef(_aj_env, invk_method_ref);
^~~~~~~~~~~~~~~
java_iface.c:272:38: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
java_iface.c:273:38: warning: passing argument 2 of ‘(*_aj_env)->DeleteLocalRef’ from incompatible pointer type [-Wincompatible-pointer-types]
(*_aj_env)->DeleteLocalRef(_aj_env, invk_method);
^~~~~~~~~~~
java_iface.c:273:38: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
CC (gcc) [M app_java.so] java_native_methods.o
java_native_methods.c: In function ‘Java_org_siprouter_SipMsg_ParseSipMsg’:
java_native_methods.c:484:9: warning: return from incompatible pointer type [-Wincompatible-pointer-types]
return fill_sipmsg_object(jenv, _aj_msg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC (gcc) [M app_java.so] app_java_mod.o
app_java_mod.c: In function ‘child_init’:
app_java_mod.c:236:38: warning: passing argument 2 of ‘(*_aj_env)->DeleteLocalRef’ from incompatible pointer type [-Wincompatible-pointer-types]
(*_aj_env)->DeleteLocalRef(_aj_env, child_init_id);
^~~~~~~~~~~~~
app_java_mod.c:236:38: note: expected ‘jobject {aka struct _jobject *}’ but argument is of type ‘jmethodID {aka struct _jmethodID *}’
#### Reproduction
1. Download 5.2.3
2. in /usr/local/src/kamailio-5.2.3/
2.1 make include_modules="app_java" cfg
2.2 make all
2.3 make install
3 kamailo -e -E -ddd
#### Debugging Data
0(18169) ERROR: <core> [core/sr_module.c:498]: load_module(): could not open module </usr/local/lib64/kamailio/modules/app_java.so>: libjvm.so: cannot open shared object file: No such file or directory
0(18169) CRITICAL: <core> [core/cfg.y:3507]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 300, column 12-24: failed to load module
0(18169) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No module matching <app_java> found
0(18169) CRITICAL: <core> [core/cfg.y:3510]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 306, column 46: Can't set module parameter
0(18169) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No module matching <app_java> found
0(18169) CRITICAL: <core> [core/cfg.y:3510]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 307, column 55: Can't set module parameter
0(18169) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No module matching <app_java> found
0(18169) CRITICAL: <core> [core/cfg.y:3510]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 308, column 60: Can't set module parameter
0(18169) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No module matching <app_java> found
0(18169) CRITICAL: <core> [core/cfg.y:3510]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 309, column 41: Can't set module parameter
0(18169) ERROR: <core> [core/cfg.y:3370]: yyparse(): cfg. parser: failed to find command java_method_exec (params 2)
0(18169) CRITICAL: <core> [core/cfg.y:3510]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 483, column 37: unknown command, missing loadmodule?
### Possible Solutions
<!--
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.2.3 (x86_64/linux) c36229
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: c36229
* **Operating System**:
Ubuntu 18.04
--
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/1984
>From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1000134:
```
Source: kamailio
Severity: important
User: matthew-pcredep(a)debian.org
Usertags: obsolete-pcre3
Dear maintainer,
Your package still depends on the old, obsolete PCRE3[0] libraries
(i.e. libpcre3-dev). This has been end of life for a while now, and
upstream do not intend to fix any further bugs in it. Accordingly, I
would like to remove the pcre3 libraries from Debian, preferably in
time for the release of Bookworm.
The newer PCRE2 library was first released in 2015, and has been in
Debian since stretch. Upstream's documentation for PCRE2 is available
here: https://pcre.org/current/doc/html/
Many large projects that use PCRE have made the switch now (e.g. git,
php); it does involve some work, but we are now at the stage where
PCRE3 should not be used, particularly if it might ever be exposed to
untrusted input.
This mass bug filing was discussed on debian-devel@ in
https://lists.debian.org/debian-devel/2021/11/msg00176.html
Regards,
Matthew [0] Historical reasons mean that old PCRE is packaged as
pcre3 in Debian
```
--
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/2946
The local-request event route is not documented. When using our friend google I find an old blog post by @miconda but not much else. I can come up with some good text, but need to know what can be done in the route, like
- modify request uri
- add/remove headers
- drop request
- add/modify destination uri ($du)
--
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/980
GH #
#### Pre-Submission Checklist
- [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
- [ ] Related to issue #3210
#### Description
Added 'always_log_missed_content_length' mode for sanity module.
If 'always_log_missed_content_length' is 1 then the SIP message
with no 'Content-Length' header will cause warning message in
the logs. Otherwise warning message is not generated for cases
when SIP message with no 'Content-Length' header is sent over UDP.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3359
-- Commit Summary --
* No warning generated when UDP and no Content-Length header
-- File Changes --
M src/modules/sanity/doc/sanity_admin.xml (21)
M src/modules/sanity/sanity.c (4)
M src/modules/sanity/sanity_mod.c (12)
M src/modules/sanity/sanity_mod.h (3)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3359.patchhttps://github.com/kamailio/kamailio/pull/3359.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3359
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3359(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:
* 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>
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
### Description
Trying to get NATS module working but Kamailio is refusing to start.
```
Sep 27 23:08:27 server kernel: kamailio[338880]: segfault at 70 ip 00007fe97b06f1cc sp 00007fff72d158f0 error 4 in libuv.so.1.0.0[7fe97b066000+1f000]
Sep 27 23:08:27 server kernel: Code: 5a 85 ff ff b8 ea ff ff ff c3 0f 1f 40 00 f3 0f 1e fa 8b 4e 30 83 f9 ff 0f 84 80 00 00 00 48 83 ec 08 85 c9 0f 88 90 00 00 00 <3b> 4f 70 73 45 f7 d2 21 56 28 48 8d 4e 18 48 89 f0 48 8b 76 18 75
Sep 27 23:08:27 server systemd[1]: Started Process Core Dump (PID 338886/UID 0).
```
#### Log Messages
In the log message I'm getting the following error:
```
INFO: nats [nats_mod.c:437]: nats_init_connection(): adding server [nats://192.168.1.1:4222] [1]
ERROR: nats [nats_mod.c:456]: nats_init_connection(): could not create nats options [System Error]
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
(version: kamailio 5.6.1 (x86_64/linux) 34e6dd)
```
NATS Server version:
```
nats-server: v2.9.0
```
libnats version:
```
libnats.so.3.4.0
```
* **Operating System**:
```
CentOS Stream 9
5.14.0-163.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 8 13:52:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
```
* **Module Configuration**:
```
loadmodule "nats.so"
modparam("nats", "nats_url", "nats://192.168.1.1:4222")
```
There is no issue at the network/firewall level as by using telnet I'm able to connect to the NATS server successfully.
What is weird is that with tcpdump I can't see even attempts to connect to the NATS server.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3253
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3253(a)github.com>