### Description
* kamailio 5.6.1 on AlmaLinux 9 and OpenSSL 3.0.5
* Used tlsa to separate the OS version of OpenSSL (which is 3.0.1). The same issue happens
with the OS version of OpenSSL
* Generating TLS client traffic
* The issue will occur at about 25 conn/sec
* Multiple unpredicatable types of shm corruption
### Troubleshooting
* No issue with tlsa + OpenSSL 1.1.1q; the module can sustain 50 conn/sec up to 500 persistent connections.
#### Reproduction
1. Used kamailio configuration from the outbound module documentation; i.e., configure kamailio as a TLS edge proxy.
To isolate the registrar is another kamailio system
1. Use a SIP load tester to generate REGISTER traffic(Expires: 600) ; at the end of the REGISTER, keep the connection alive and reREGISTER at 300 secs.
1. Generate traffic at > 25 conn/sec (with < 25 conn/sec the test usually succeeds)
#### Debugging Data
BT in comments below
#### Log Messages
#### SIP Traffic
### Possible Solutions
### Additional Information
5.6.1
* **Operating System**:
AlmaLinux 9, with (OS) OpenSSL 3.0.1. I used tlsa + OpenSSL 3.0.5
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3222
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3222(a)github.com>
### Description
--
Hello Team,
We are using Kamailio 5.4.7 and we found there is a random crash. We have observed the core logs and we noticed it is due to some of the RPC events. We have noticed it has been crashed from the "ctl handler" process.
--
#### Debugging Data
--
Core dump files are attached.
[core-7519.txt](https://github.com/kamailio/kamailio/files/9099633/core-7519…
[core-17582.txt](https://github.com/kamailio/kamailio/files/9099634/core-175…
[core-7519.txt](https://github.com/kamailio/kamailio/files/9099638/core-7519…
[core-17582.txt](https://github.com/kamailio/kamailio/files/9099639/core-175…
--
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.4.7 (x86_64/linux) a19fe1
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_BLACKLIST, 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: a19fe1
compiled on 02:56:57 Feb 16 2022 with gcc 8.3.0
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3186
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3186(a)github.com>
**1**
```
CC (gcc) [M crypto.so] crypto_uuid.o
crypto_uuid.c: In function 'crypto_generate_callid':
crypto_uuid.c:176:9: warning: 'SHA1_Init' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
176 | SHA1_Init(&crypto_ctx);
| ^~~~~~~~~
In file included from crypto_uuid.c:37:
/usr/include/openssl/sha.h:49:27: note: declared here
49 | OSSL_DEPRECATEDIN_3_0 int SHA1_Init(SHA_CTX *c);
| ^~~~~~~~~
crypto_uuid.c:177:9: warning: 'SHA1_Update' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
177 | SHA1_Update(&crypto_ctx, crypto_callid_seed, SEED_LEN);
| ^~~~~~~~~~~
In file included from crypto_uuid.c:37:
/usr/include/openssl/sha.h:50:27: note: declared here
50 | OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
| ^~~~~~~~~~~
crypto_uuid.c:178:9: warning: 'SHA1_Update' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
178 | SHA1_Update(&crypto_ctx, crypto_callid_counter, CTR_LEN);
| ^~~~~~~~~~~
In file included from crypto_uuid.c:37:
/usr/include/openssl/sha.h:50:27: note: declared here
50 | OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
| ^~~~~~~~~~~
crypto_uuid.c:179:9: warning: 'SHA1_Final' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
179 | SHA1_Final(crypto_buf, &crypto_ctx);
| ^~~~~~~~~~
In file included from crypto_uuid.c:37:
/usr/include/openssl/sha.h:51:27: note: declared here
51 | OSSL_DEPRECATEDIN_3_0 int SHA1_Final(unsigned char *md, SHA_CTX *c);
| ^~~~~~~~~~
LD (gcc) [M crypto.so] crypto.so
CC (gcc) [M tls.so] tls_bio.o
```
**2**
```
CC (gcc) [M tls.so] tls_map.o
CC (gcc) [M tls.so] tls_mod.o
tls_mod.c: In function 'ksr_rand_engine_param':
tls_mod.c:476:17: warning: 'RAND_set_rand_method' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
476 | RAND_set_rand_method(RAND_ksr_krand_method());
| ^~~~~~~~~~~~~~~~~~~~
In file included from tls_rand.h:26,
from tls_mod.c:54:
/usr/include/openssl/rand.h:49:27: note: declared here
49 | OSSL_DEPRECATEDIN_3_0 int RAND_set_rand_method(const RAND_METHOD *meth);
| ^~~~~~~~~~~~~~~~~~~~
tls_mod.c:479:17: warning: 'RAND_set_rand_method' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
479 | RAND_set_rand_method(RAND_ksr_fastrand_method());
| ^~~~~~~~~~~~~~~~~~~~
In file included from tls_rand.h:26,
from tls_mod.c:54:
/usr/include/openssl/rand.h:49:27: note: declared here
49 | OSSL_DEPRECATEDIN_3_0 int RAND_set_rand_method(const RAND_METHOD *meth);
| ^~~~~~~~~~~~~~~~~~~~
tls_mod.c:482:17: warning: 'RAND_set_rand_method' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
482 | RAND_set_rand_method(RAND_ksr_cryptorand_method());
| ^~~~~~~~~~~~~~~~~~~~
In file included from tls_rand.h:26,
from tls_mod.c:54:
/usr/include/openssl/rand.h:49:27: note: declared here
49 | OSSL_DEPRECATEDIN_3_0 int RAND_set_rand_method(const RAND_METHOD *meth);
| ^~~~~~~~~~~~~~~~~~~~
tls_mod.c:485:17: warning: 'RAND_set_rand_method' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
485 | RAND_set_rand_method(RAND_ksr_kxlibssl_method());
| ^~~~~~~~~~~~~~~~~~~~
In file included from tls_rand.h:26,
from tls_mod.c:54:
/usr/include/openssl/rand.h:49:27: note: declared here
49 | OSSL_DEPRECATEDIN_3_0 int RAND_set_rand_method(const RAND_METHOD *meth);
| ^~~~~~~~~~~~~~~~~~~~
tls_mod.c: In function 'mod_register':
tls_mod.c:636:9: warning: 'RAND_set_rand_method' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
636 | RAND_set_rand_method(RAND_ksr_cryptorand_method());
| ^~~~~~~~~~~~~~~~~~~~
In file included from tls_rand.h:26,
from tls_mod.c:54:
/usr/include/openssl/rand.h:49:27: note: declared here
49 | OSSL_DEPRECATEDIN_3_0 int RAND_set_rand_method(const RAND_METHOD *meth);
| ^~~~~~~~~~~~~~~~~~~~
tls_mod.c: In function 'tls_engine_init':
tls_mod.c:670:9: warning: 'ENGINE_by_id' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
670 | e = ENGINE_by_id("dynamic");
| ^
In file included from tls_mod.c:153:
/usr/include/openssl/engine.h:336:31: note: declared here
336 | OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
| ^~~~~~~~~~~~
tls_mod.c:689:9: warning: 'ENGINE_ctrl_cmd_string' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
689 | if (!ENGINE_ctrl_cmd_string(e, "SO_PATH", NCONF_get_string(config, engine_section, "dynamic_path"), 0)) {
| ^~
In file included from tls_mod.c:153:
/usr/include/openssl/engine.h:479:5: note: declared here
479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
| ^~~~~~~~~~~~~~~~~~~~~~
tls_mod.c:693:9: warning: 'ENGINE_ctrl_cmd_string' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
693 | if (!ENGINE_ctrl_cmd_string(e, "ID", engine_id, 0)) {
| ^~
In file included from tls_mod.c:153:
/usr/include/openssl/engine.h:479:5: note: declared here
479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
| ^~~~~~~~~~~~~~~~~~~~~~
tls_mod.c:697:9: warning: 'ENGINE_ctrl_cmd' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
697 | if (!ENGINE_ctrl_cmd(e, "LOAD", 1, NULL, NULL, 0)) {
| ^~
In file included from tls_mod.c:153:
/usr/include/openssl/engine.h:450:27: note: declared here
450 | OSSL_DEPRECATEDIN_3_0 int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name,
| ^~~~~~~~~~~~~~~
tls_mod.c:704:17: warning: 'ENGINE_ctrl_cmd_string' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
704 | if (!ENGINE_ctrl_cmd_string(e, confval->name, confval->value, 0)) {
| ^~
In file included from tls_mod.c:153:
/usr/include/openssl/engine.h:479:5: note: declared here
479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
| ^~~~~~~~~~~~~~~~~~~~~~
tls_mod.c:710:9: warning: 'ENGINE_init' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
710 | if (!ENGINE_init(e)) {
| ^~
In file included from tls_mod.c:153:
/usr/include/openssl/engine.h:620:27: note: declared here
620 | OSSL_DEPRECATEDIN_3_0 int ENGINE_init(ENGINE *e);
| ^~~~~~~~~~~
tls_mod.c:715:17: warning: 'ENGINE_set_default_string' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
715 | rc = ENGINE_set_default_string(e, tls_engine_settings.engine_algorithms.s);
| ^~
In file included from tls_mod.c:153:
/usr/include/openssl/engine.h:685:27: note: declared here
685 | OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_string(ENGINE *e,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
tls_mod.c:721:9: warning: 'ENGINE_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
721 | ENGINE_free(e);
| ^~~~~~~~~~~
In file included from tls_mod.c:153:
/usr/include/openssl/engine.h:493:27: note: declared here
493 | OSSL_DEPRECATEDIN_3_0 int ENGINE_free(ENGINE *e);
| ^~~~~~~~~~~
tls_mod.c: In function 'tls_engine_private_key':
tls_mod.c:730:9: warning: 'ENGINE_load_private_key' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
730 | return ENGINE_load_private_key(ksr_tls_engine, key_id, NULL, NULL);
| ^~~~~~
In file included from tls_mod.c:153:
/usr/include/openssl/engine.h:638:11: note: declared here
638 | EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
| ^~~~~~~~~~~~~~~~~~~~~~~
CC (gcc) [M tls.so] tls_rand.o
tls_rand.c: In function 'ksr_kxlibssl_init':
tls_rand.c:197:17: warning: 'RAND_get_rand_method' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
197 | _ksr_kxlibssl_local_method = RAND_get_rand_method();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tls_rand.h:26,
from tls_rand.c:30:
/usr/include/openssl/rand.h:50:42: note: declared here
50 | OSSL_DEPRECATEDIN_3_0 const RAND_METHOD *RAND_get_rand_method(void);
| ^~~~~~~~~~~~~~~~~~~~
CC (gcc) [M tls.so] tls_rpc.o
CC (gcc) [M tls.so] tls_select.o
CC (gcc) [M tls.so] tls_server.o
CC (gcc) [M tls.so] tls_util.o
CC (gcc) [M tls.so] tls_verify.o
LD (gcc) [M tls.so] tls.so
CC (gcc) [M auth_identity.so] auth_crypt.o
auth_crypt.c: In function 'rsa_sha1_enc':
auth_crypt.c:215:9: warning: 'RSA_sign' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
215 | if (RSA_sign(NID_sha1,
| ^~
In file included from /usr/include/openssl/x509.h:36,
from /usr/include/openssl/pem.h:23,
from auth_crypt.c:33:
/usr/include/openssl/rsa.h:348:27: note: declared here
348 | OSSL_DEPRECATEDIN_3_0 int RSA_sign(int type, const unsigned char *m,
| ^~~~~~~~
auth_crypt.c: In function 'rsa_sha1_dec':
auth_crypt.c:261:9: warning: 'EVP_PKEY_get1_RSA' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
261 | hpubkey = EVP_PKEY_get1_RSA(pkey);
| ^~~~~~~
In file included from /usr/include/openssl/pem.h:22,
from auth_crypt.c:33:
/usr/include/openssl/evp.h:1348:16: note: declared here
1348 | struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
| ^~~~~~~~~~~~~~~~~
auth_crypt.c:269:9: warning: 'RSA_verify' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
269 | if (RSA_verify(NID_sha1,
| ^~
In file included from /usr/include/openssl/x509.h:36,
from /usr/include/openssl/pem.h:23,
from auth_crypt.c:33:
/usr/include/openssl/rsa.h:351:27: note: declared here
351 | OSSL_DEPRECATEDIN_3_0 int RSA_verify(int type, const unsigned char *m,
| ^~~~~~~~~~
auth_crypt.c:275:17: warning: 'RSA_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
275 | RSA_free(hpubkey);
| ^~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
from /usr/include/openssl/pem.h:23,
from auth_crypt.c:33:
/usr/include/openssl/rsa.h:293:28: note: declared here
293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
| ^~~~~~~~
auth_crypt.c:298:9: warning: 'RSA_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
298 | RSA_free(hpubkey);
| ^~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
from /usr/include/openssl/pem.h:23,
from auth_crypt.c:33:
/usr/include/openssl/rsa.h:293:28: note: declared here
293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
| ^~~~~~~~
CC (gcc) [M auth_identity.so] auth_dynstr.o
CC (gcc) [M auth_identity.so] auth_hdrs.o
CC (gcc) [M auth_identity.so] auth_http.o
CC (gcc) [M auth_identity.so] auth_identity.o
auth_identity.c: In function 'mod_init':
auth_identity.c:396:9: warning: 'PEM_read_RSAPrivateKey' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
396 | glb_hmyprivkey=PEM_read_RSAPrivateKey(hpemfile, NULL, NULL, NULL);
| ^~~~~~~~~~~~~~
In file included from auth_identity.c:43:
/usr/include/openssl/pem.h:447:1: note: declared here
447 | DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, RSAPrivateKey, RSA)
| ^~~~~~~~~~~~~~~~~~~~~~
auth_identity.c:408:9: warning: 'RSA_size' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
408 | if (initdynstr(&glb_encedmsg, RSA_size(glb_hmyprivkey)))
| ^~
In file included from /usr/include/openssl/x509.h:36,
from /usr/include/openssl/pem.h:23,
from auth_identity.c:43:
/usr/include/openssl/rsa.h:204:27: note: declared here
204 | OSSL_DEPRECATEDIN_3_0 int RSA_size(const RSA *rsa);
| ^~~~~~~~
auth_identity.c:412:9: warning: 'RSA_size' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
412 | if (initdynstr(&glb_b64encedmsg, (RSA_size(glb_hmyprivkey)/3+1)*4))
| ^~
In file included from /usr/include/openssl/x509.h:36,
from /usr/include/openssl/pem.h:23,
from auth_identity.c:43:
/usr/include/openssl/rsa.h:204:27: note: declared here
204 | OSSL_DEPRECATEDIN_3_0 int RSA_size(const RSA *rsa);
| ^~~~~~~~
CC (gcc) [M auth_identity.so] auth_tables.o
LD (gcc) [M auth_identity.so] auth_identity.so
CC (gcc) [M db_unixodbc.so] connection.o
CC (gcc) [M db_unixodbc.so] db_unixodbc.o
CC (gcc) [M db_unixodbc.so] dbase.o
CC (gcc) [M db_unixodbc.so] list.o
CC (gcc) [M db_unixodbc.so] res.o
CC (gcc) [M db_unixodbc.so] row.o
CC (gcc) [M db_unixodbc.so] val.o
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3011
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3011(a)github.com>
- using LM_INFO cause a lot of log events on a busy server with normal log level
<!-- 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
- [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
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
Proposal to change log level of the query response time.
If this is of interest, it should probably be monitored in some other metric and not flood the syslog.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3296
-- Commit Summary --
* pdb: change log level for pdb query response time from LM_INFO to LM_DBG
-- File Changes --
M src/modules/pdb/pdb.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3296.patchhttps://github.com/kamailio/kamailio/pull/3296.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3296
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3296(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, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] 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)
- [ ] 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 #XXXX (replace XXXX with an open issue number)
#### Description
A couple of commit (1 per each module) adding SSL support to db_redis and ndb_redis.
This mainly includes checking if proper parameter is provided (for ndb_redis it is `ssl` option in the DB URL and, for db_redis, a new `opt_ssl` parameter) and create a temporary SSL context that is used to initialise the redis context.
db_redis is also updated with another parameter to provide a DB access password.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3345
-- Commit Summary --
* db_redis: Adding SSL support
* ndb_redis: Adding SSL support
-- File Changes --
M src/modules/db_redis/Makefile (8)
M src/modules/db_redis/db_redis_mod.c (5)
M src/modules/db_redis/redis_connection.c (43)
M src/modules/db_redis/redis_connection.h (2)
M src/modules/ndb_redis/Makefile (6)
M src/modules/ndb_redis/redis_client.c (47)
M src/modules/ndb_redis/redis_client.h (3)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3345.patchhttps://github.com/kamailio/kamailio/pull/3345.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3345
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3345(a)github.com>
### Description
On systems running libssl 1.1+, the compile flag `TLS_PTHREAD_MUTEX_SHARED` is set to avoid an issue with deadlocks. However, if the system does not have `pkg-config` installed, the build completes successfully without setting this compile flag. As such, users with this particular configuration are at risk of TLS-related deadlocks.
### Troubleshooting
This scenario arose for me when I experienced suspected TLS-related deadlocks in Kamailio 5.4.1. Particularly, in a simple configuration, multiple UDP workers were using t_relay to near-simultaneously connect to the same TLS host. After some time, the UDP workers stopped responding while executing this simple route block. I cannot definitively conclude this issue was the same deadlock bug. The compile flag `TLS_PTHREAD_MUTEX_SHARED` was not set and `pkg-config` was not installed.
I found [this mailing list thread](https://lists.kamailio.org/pipermail/sr-users/2019-December/107759.… discussing TLS deadlocks and the build process and the user was running Kamailio 5.3.1, libssl 1.1 but did not have `TLS_PTHREAD_MUTEX_SHARED` set. This issue may explain how this user ended up in that situation.
#### Reproduction
Tested against Kamailio 5.4.1 and latest master.
On a system with libssl 1.1+, build (including the `tls` module) with `pkg-config` installed and run `kamailio -I`. `TLS_PTHREAD_MUTEX_SHARED` flag is set.
```
Version: kamailio 5.7.0-dev3 (x86_64/linux) b75b6e
Default config: /usr/local/etc/kamailio/kamailio.cfg
Default paths to modules: /usr/local/lib64/kamailio/modules
Compile 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
```
Uninstall `pkg-config` and rebuild. `TLS_PTHREAD_MUTEX_SHARED` flag is not set.
```
Version: kamailio 5.7.0-dev3 (x86_64/linux) b75b6e
Default config: /usr/local/etc/kamailio/kamailio.cfg
Default paths to modules: /usr/local/lib64/kamailio/modules
Compile 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
```
When `pkg-config` is not installed, the build also outputs the following log lines, however the build does not fail.
```
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
```
### Possible Solutions
Some thoughts about options:
1. It looks like effort has been applied in other areas to support the absence of `pkg-config`, so potentially support libssl 1.1+ detection without `pkg-config`.
2. Require `pkg-config` on build and fail without it.
3. Enable `TLS_PTHREAD_MUTEX_SHARED` by default as I assume most people are running libssl 1.1+ these days, and disable it if libssl < 1.1 detected.
Personally I have installed `pkg-config` and rebuilt, however I think for the safety of others building from source that the compile flag should be correctly set or the build should fail.
### Operating System
```
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
Linux debian-kamailio 4.19.0-20-amd64 #1 SMP Debian 4.19.235-1 (2022-03-17) x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3384
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3384(a)github.com>
Added Call-ID mask Support for Topos with API call from Topoh to mask the callID
Call-ID mask happens before the request is sent downstream and unmasked when received from downstream.
<!-- 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)
- [ ] 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)
- [ ] 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 #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/3347
-- Commit Summary --
* Topos: Added Call ID mask when sending to Downstream
* Topos: Added CallID Mask Document for Topos
-- File Changes --
M src/modules/topos/doc/topos_admin.xml (20)
M src/modules/topos/topos_mod.c (119)
M src/modules/topos/tps_msg.c (37)
M src/modules/topos/tps_msg.h (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3347.patchhttps://github.com/kamailio/kamailio/pull/3347.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3347
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3347(a)github.com>
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3375
-- Commit Summary --
* acc: typo
* acc_json: typos
* acc_radius: typo
* alias_db: typo
* app_java: typos
* app_jsdt: typos
* app_lua: typos
* app_lua_sr: typos
* app_mono: typos
* app_perl: typos
* app_python: typo
* app_ruby: typos
* app_sqlang: typos
* async: typos
* auth: typos
* auth_db: typos
* auth_diameter: typos
* auth_ephemeral: typos
* auth_identiy: typos
* auth_radius: typos
* avpops: typos
-- File Changes --
M src/modules/acc/doc/acc_admin.xml (2)
M src/modules/acc_json/acc_json_mod.c (2)
M src/modules/acc_json/doc/acc_json_admin.xml (2)
M src/modules/acc_radius/doc/acc_radius_admin.xml (2)
M src/modules/alias_db/doc/alias_db_admin.xml (2)
M src/modules/app_java/README-draft (12)
M src/modules/app_java/doc/app_java_admin.xml (4)
M src/modules/app_java/kamailio_java_folder/java-untested/siprouter_src/SipMsg.java (2)
M src/modules/app_java/kamailio_java_folder/java/siprouter_src/SipMsg.java (2)
M src/modules/app_jsdt/app_jsdt_mod.c (8)
M src/modules/app_jsdt/doc/app_jsdt_admin.xml (4)
M src/modules/app_jsdt/duktape.c (10)
M src/modules/app_lua/app_lua_mod.c (10)
M src/modules/app_lua/doc/app_lua_admin.xml (2)
M src/modules/app_lua_sr/doc/app_lua_sr_admin.xml (4)
M src/modules/app_mono/app_mono_mod.c (4)
M src/modules/app_perl/app_perl_mod.c (2)
M src/modules/app_perl/doc/app_perl_admin.xml (4)
M src/modules/app_perl/doc/app_perl_pod.xml (2)
M src/modules/app_perl/doc/app_perl_samples.xml (2)
M src/modules/app_perl/lib/perl/Kamailio/LDAPUtils/LDAPConf.pm (4)
M src/modules/app_python/doc/app_python_admin.xml (2)
M src/modules/app_ruby/app_ruby_mod.c (2)
M src/modules/app_ruby/doc/app_ruby_admin.xml (2)
M src/modules/app_sqlang/app_sqlang_mod.c (8)
M src/modules/app_sqlang/doc/app_sqlang_admin.xml (2)
M src/modules/app_sqlang/squirrel/sqstdlib/sqstdrex.cpp (2)
M src/modules/app_sqlang/squirrel/squirrel/sqvm.cpp (6)
M src/modules/async/doc/async_admin.xml (4)
M src/modules/auth/auth.xml (18)
M src/modules/auth/doc/auth_functions.xml (2)
M src/modules/auth/doc/auth_params.xml (14)
M src/modules/auth/nc.c (6)
M src/modules/auth/nid.h (4)
M src/modules/auth/ot_nonce.c (6)
M src/modules/auth_db/authorize.c (2)
M src/modules/auth_db/doc/auth_db_admin.xml (4)
M src/modules/auth_diameter/authorize.c (2)
M src/modules/auth_diameter/authorize.h (2)
M src/modules/auth_diameter/avp.c (2)
M src/modules/auth_diameter/defs.h (2)
M src/modules/auth_diameter/message.c (2)
M src/modules/auth_diameter/tcp_comm.c (2)
M src/modules/auth_ephemeral/auth_ephemeral_mod.c (2)
M src/modules/auth_ephemeral/doc/auth_ephemeral_admin.xml (2)
M src/modules/auth_identity/auth_hdrs.c (2)
M src/modules/auth_identity/auth_identity.c (10)
M src/modules/auth_identity/auth_tables.c (10)
M src/modules/auth_identity/doc/auth_identity_functions.xml (2)
M src/modules/auth_radius/doc/auth_radius_admin.xml (2)
M src/modules/auth_radius/sterman.c (2)
M src/modules/avpops/avpops.c (4)
M src/modules/avpops/doc/avpops_admin.xml (8)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3375.patchhttps://github.com/kamailio/kamailio/pull/3375.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3375
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3375(a)github.com>