kamailio.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
July
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
List overview
Download
sr-dev
September 2020
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
sr-dev@lists.kamailio.org
12 participants
271 discussions
Start a n
N
ew thread
Info: recordings of Kamailio World 2020 sessions
by Daniel-Constantin Mierla
22 Sep '20
22 Sep '20
Hello, for those that couldn't attend the Kamailio World 2020 online event that happened a few weeks ago, or someone wants to view again a session, the recordings of the two days were split per session -- they are available on KamailioWorld youtube channel: *
https://www.youtube.com/c/KamailioWorld/
For convenience, they were also grouped in a playlist for KW2020, see: *
https://www.youtube.com/c/KamailioWorld/playlists
No other editing than just cutting at start/stop of each session. Slides should be available at: *
http://kamailio.org/events/2020-KamailioWorldOnline/
Enjoy! Cheers, Daniel -- Daniel-Constantin Mierla --
www.asipto.com
www.twitter.com/miconda
--
www.linkedin.com/in/miconda
1
0
0
0
git:master:b754b9f6: usrloc: use unsigned int for rpc output for the fields having this type
by Daniel-Constantin Mierla
21 Sep '20
21 Sep '20
Module: kamailio Branch: master Commit: b754b9f68bee0b58b4ae00b7f0764c2bf711d14c URL:
https://github.com/kamailio/kamailio/commit/b754b9f68bee0b58b4ae00b7f0764c2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2020-09-21T10:59:34+02:00 usrloc: use unsigned int for rpc output for the fields having this type --- Modified: src/modules/usrloc/ul_rpc.c --- Diff:
https://github.com/kamailio/kamailio/commit/b754b9f68bee0b58b4ae00b7f0764c2…
Patch:
https://github.com/kamailio/kamailio/commit/b754b9f68bee0b58b4ae00b7f0764c2…
--- diff --git a/src/modules/usrloc/ul_rpc.c b/src/modules/usrloc/ul_rpc.c index 9124eb746f..63c45381b5 100644 --- a/src/modules/usrloc/ul_rpc.c +++ b/src/modules/usrloc/ul_rpc.c @@ -144,12 +144,12 @@ int rpc_dump_contact(rpc_t* rpc, void* ctx, void *ih, ucontact_t* c) rpc->fault(ctx, 500, "Internal error adding state"); return -1; } - if(rpc->struct_add(vh, "d", "Flags", c->flags)<0) + if(rpc->struct_add(vh, "u", "Flags", c->flags)<0) { rpc->fault(ctx, 500, "Internal error adding flags"); return -1; } - if(rpc->struct_add(vh, "d", "CFlags", c->cflags)<0) + if(rpc->struct_add(vh, "u", "CFlags", c->cflags)<0) { rpc->fault(ctx, 500, "Internal error adding cflags"); return -1; @@ -159,7 +159,7 @@ int rpc_dump_contact(rpc_t* rpc, void* ctx, void *ih, ucontact_t* c) rpc->fault(ctx, 500, "Internal error adding socket"); return -1; } - if(rpc->struct_add(vh, "d", "Methods", c->methods)<0) + if(rpc->struct_add(vh, "u", "Methods", c->methods)<0) { rpc->fault(ctx, 500, "Internal error adding methods"); return -1; @@ -175,7 +175,7 @@ int rpc_dump_contact(rpc_t* rpc, void* ctx, void *ih, ucontact_t* c) rpc->fault(ctx, 500, "Internal error adding instance"); return -1; } - if(rpc->struct_add(vh, "d", "Reg-Id", c->reg_id)<0) + if(rpc->struct_add(vh, "u", "Reg-Id", c->reg_id)<0) { rpc->fault(ctx, 500, "Internal error adding reg_id"); return -1; @@ -286,7 +286,7 @@ static void ul_rpc_dump(rpc_t* rpc, void* ctx) rpc->fault(ctx, 500, "Internal error creating aor struct"); return; } - if(rpc->struct_add(bh, "Sd[", + if(rpc->struct_add(bh, "Su[", "AoR", &r->aor, "HashID", r->aorhash, "Contacts", &ih)<0)
1
0
0
0
git:master:5557b9b7: ndb_redis: fix cluster support
by Victor Seva
21 Sep '20
21 Sep '20
Module: kamailio Branch: master Commit: 5557b9b715a9ca754c454b5edaebf2a43b832015 URL:
https://github.com/kamailio/kamailio/commit/5557b9b715a9ca754c454b5edaebf2a…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2020-09-21T09:49:25+02:00 ndb_redis: fix cluster support fixes #2461 related #2300 --- Modified: src/modules/ndb_redis/redis_client.c --- Diff:
https://github.com/kamailio/kamailio/commit/5557b9b715a9ca754c454b5edaebf2a…
Patch:
https://github.com/kamailio/kamailio/commit/5557b9b715a9ca754c454b5edaebf2a…
--- diff --git a/src/modules/ndb_redis/redis_client.c b/src/modules/ndb_redis/redis_client.c index 5ad063f89a..5bc1bf0e47 100644 --- a/src/modules/ndb_redis/redis_client.c +++ b/src/modules/ndb_redis/redis_client.c @@ -1032,13 +1032,6 @@ int redisc_exec(str *srv, str *res, str *cmd, ...) } } - LM_DBG("rpl->rplRedis->type:%d\n", rpl->rplRedis->type); - if(rpl->rplRedis->type == REDIS_REPLY_ERROR) { - LM_ERR("Redis error:%.*s\n", - (int)rpl->rplRedis->len, rpl->rplRedis->str); - goto error_exec; - } - if (check_cluster_reply(rpl->rplRedis, &rsrv)) { LM_DBG("rsrv->ctxRedis = %p\n", rsrv->ctxRedis); if(rsrv->ctxRedis==NULL) @@ -1073,14 +1066,15 @@ int redisc_exec(str *srv, str *res, str *cmd, ...) goto error_exec; } } + } - LM_DBG("rpl->rplRedis->type:%d\n", rpl->rplRedis->type); - if(rpl->rplRedis->type == REDIS_REPLY_ERROR) { - LM_ERR("Redis error:%.*s\n", - (int)rpl->rplRedis->len, rpl->rplRedis->str); - goto error_exec; - } + LM_DBG("rpl->rplRedis->type:%d\n", rpl->rplRedis->type); + if(rpl->rplRedis->type == REDIS_REPLY_ERROR) { + LM_ERR("Redis error:%.*s\n", + (int)rpl->rplRedis->len, rpl->rplRedis->str); + goto error_exec; } + STR_ZTOV(cmd->s[cmd->len], c); rsrv->disable.consecutive_errors = 0; va_end(ap);
1
0
0
0
git:master:8b74c67d: Revert "Revert "tls: proper ifdef on libssl version for tls_init_locks()""
by Daniel-Constantin Mierla
18 Sep '20
18 Sep '20
Module: kamailio Branch: master Commit: 8b74c67de4aef45835a34efc55e0db66f8a9d2ed URL:
https://github.com/kamailio/kamailio/commit/8b74c67de4aef45835a34efc55e0db6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2020-09-18T14:12:38+02:00 Revert "Revert "tls: proper ifdef on libssl version for tls_init_locks()"" This reverts commit da5d71da620deb8b8740256e556011e93cdac1a3. --- Modified: src/modules/tls/tls_locking.c --- Diff:
https://github.com/kamailio/kamailio/commit/8b74c67de4aef45835a34efc55e0db6…
Patch:
https://github.com/kamailio/kamailio/commit/8b74c67de4aef45835a34efc55e0db6…
--- diff --git a/src/modules/tls/tls_locking.c b/src/modules/tls/tls_locking.c index 3eb6f033a5..21078e82d9 100644 --- a/src/modules/tls/tls_locking.c +++ b/src/modules/tls/tls_locking.c @@ -140,7 +140,7 @@ unsigned long sr_ssl_id_f() /* returns -1 on error, 0 on success */ int tls_init_locks() { -/* OpenSSL is thread-safe since 1.1.0 */ +/* OpenSSL is no longer supporting to set locking callbacks since 1.1.0 */ #if OPENSSL_VERSION_NUMBER < 0x10100000L /* init "static" tls locks */ n_static_locks=CRYPTO_num_locks(); @@ -185,10 +185,13 @@ int tls_init_locks() * (only atomic_inc), fallback to the default use-locks mode * CRYPTO_set_add_lock_callback(atomic_add_f); */ -#endif return 0; error: tls_destroy_locks(); return -1; + +#else + return 0; +#endif }
1
0
0
0
git:master:6ee8085a: Revert "Revert "tls: added define condition on version functions""
by Daniel-Constantin Mierla
18 Sep '20
18 Sep '20
Module: kamailio Branch: master Commit: 6ee8085a987b8f0e9a4fa23379f0040ab49db693 URL:
https://github.com/kamailio/kamailio/commit/6ee8085a987b8f0e9a4fa23379f0040…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2020-09-18T14:12:17+02:00 Revert "Revert "tls: added define condition on version functions"" This reverts commit bffd78f14921f67735a64caea2fb130393daa2bc. --- Modified: src/modules/tls/tls_domain.c Modified: src/modules/tls/tls_init.c --- Diff:
https://github.com/kamailio/kamailio/commit/6ee8085a987b8f0e9a4fa23379f0040…
Patch:
https://github.com/kamailio/kamailio/commit/6ee8085a987b8f0e9a4fa23379f0040…
--- diff --git a/src/modules/tls/tls_domain.c b/src/modules/tls/tls_domain.c index fc84033e68..2930bde2be 100644 --- a/src/modules/tls/tls_domain.c +++ b/src/modules/tls/tls_domain.c @@ -63,9 +63,11 @@ static void setup_ecdh(SSL_CTX *ctx) { EC_KEY *ecdh; - if (OpenSSL_version_num() < 0x1000005fL) { +#if OPENSSL_VERSION_NUMBER < 0x010100000L + if (SSLeay() < 0x1000005fL) { return; } +#endif ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1); SSL_CTX_set_options(ctx, SSL_OP_SINGLE_ECDH_USE); diff --git a/src/modules/tls/tls_init.c b/src/modules/tls/tls_init.c index 351ed4187e..f10d0c0344 100644 --- a/src/modules/tls/tls_init.c +++ b/src/modules/tls/tls_init.c @@ -645,6 +645,7 @@ int tls_h_mod_init_f(void) { /*struct socket_info* si;*/ long ssl_version; + const char *ssl_version_txt; #if OPENSSL_VERSION_NUMBER < 0x010100000L && !defined(LIBRESSL_VERSION_NUMBER) int lib_kerberos; int lib_zlib; @@ -667,7 +668,15 @@ int tls_h_mod_init_f(void) #if OPENSSL_VERSION_NUMBER < 0x00907000L LM_WARN("You are using an old version of OpenSSL (< 0.9.7). Upgrade!\n"); #endif + +#if OPENSSL_VERSION_NUMBER < 0x010100000L + ssl_version=SSLeay(); + ssl_version_txt=SSLeay_version(SSLEAY_VERSION); +#else ssl_version=OpenSSL_version_num(); + ssl_version_txt=OpenSSL_version(OPENSSL_VERSION); +#endif + /* check if version have the same major minor and fix level * (e.g. 0.9.8a & 0.9.8c are ok, but 0.9.8 and 0.9.9x are not) * - values is represented as 0xMMNNFFPPS: major minor fix patch status @@ -679,7 +688,7 @@ int tls_h_mod_init_f(void) " compiled \"%s\" (0x%08lx).\n" " Please make sure a compatible version is used" " (tls_force_run in kamailio.cfg will override this check)\n", - OpenSSL_version(OPENSSL_VERSION), ssl_version, + ssl_version_txt, ssl_version, OPENSSL_VERSION_TEXT, (long)OPENSSL_VERSION_NUMBER); if (cfg_get(tls, tls_cfg, force_run)) LM_WARN("tls_force_run turned on, ignoring "
1
0
0
0
git:master:4d14057a: Revert "Revert "tls: support compilation without deprecated OpenSSL APIs""
by Daniel-Constantin Mierla
18 Sep '20
18 Sep '20
Module: kamailio Branch: master Commit: 4d14057a25aa55dbf572e3cd5aa188f8aa0799ae URL:
https://github.com/kamailio/kamailio/commit/4d14057a25aa55dbf572e3cd5aa188f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2020-09-18T14:11:52+02:00 Revert "Revert "tls: support compilation without deprecated OpenSSL APIs"" This reverts commit 0a2fc0371430f19f868dc17f3a361e412ceb376f. --- Modified: src/modules/tls/tls_domain.c Modified: src/modules/tls/tls_init.c Modified: src/modules/tls/tls_locking.c --- Diff:
https://github.com/kamailio/kamailio/commit/4d14057a25aa55dbf572e3cd5aa188f…
Patch:
https://github.com/kamailio/kamailio/commit/4d14057a25aa55dbf572e3cd5aa188f…
--- diff --git a/src/modules/tls/tls_domain.c b/src/modules/tls/tls_domain.c index a8859c4a31..fc84033e68 100644 --- a/src/modules/tls/tls_domain.c +++ b/src/modules/tls/tls_domain.c @@ -27,6 +27,8 @@ #include <stdlib.h> #include <openssl/ssl.h> #include <openssl/opensslv.h> +#include <openssl/bn.h> +#include <openssl/dh.h> #ifndef OPENSSL_NO_ENGINE #include <openssl/engine.h> @@ -61,7 +63,7 @@ static void setup_ecdh(SSL_CTX *ctx) { EC_KEY *ecdh; - if (SSLeay() < 0x1000005fL) { + if (OpenSSL_version_num() < 0x1000005fL) { return; } diff --git a/src/modules/tls/tls_init.c b/src/modules/tls/tls_init.c index b9288cbd9a..351ed4187e 100644 --- a/src/modules/tls/tls_init.c +++ b/src/modules/tls/tls_init.c @@ -627,14 +627,13 @@ int tls_h_mod_pre_init_f(void) return 0; } LM_DBG("preparing tls env for modules initialization\n"); -#if OPENSSL_VERSION_NUMBER >= 0x010100000L && !defined(LIBRESSL_VERSION_NUMBER) - LM_DBG("preparing tls env for modules initialization (libssl >=1.1)\n"); - OPENSSL_init_ssl(0, NULL); -#else +#if OPENSSL_VERSION_NUMBER < 0x010100000L || defined(LIBRESSL_VERSION_NUMBER) LM_DBG("preparing tls env for modules initialization (libssl <=1.0)\n"); SSL_library_init(); -#endif SSL_load_error_strings(); +#else + LM_DBG("preparing tls env for modules initialization (libssl >=1.1)\n"); +#endif tls_mod_preinitialized=1; return 0; } @@ -668,7 +667,7 @@ int tls_h_mod_init_f(void) #if OPENSSL_VERSION_NUMBER < 0x00907000L LM_WARN("You are using an old version of OpenSSL (< 0.9.7). Upgrade!\n"); #endif - ssl_version=SSLeay(); + ssl_version=OpenSSL_version_num(); /* check if version have the same major minor and fix level * (e.g. 0.9.8a & 0.9.8c are ok, but 0.9.8 and 0.9.9x are not) * - values is represented as 0xMMNNFFPPS: major minor fix patch status @@ -680,7 +679,7 @@ int tls_h_mod_init_f(void) " compiled \"%s\" (0x%08lx).\n" " Please make sure a compatible version is used" " (tls_force_run in kamailio.cfg will override this check)\n", - SSLeay_version(SSLEAY_VERSION), ssl_version, + OpenSSL_version(OPENSSL_VERSION), ssl_version, OPENSSL_VERSION_TEXT, (long)OPENSSL_VERSION_NUMBER); if (cfg_get(tls, tls_cfg, force_run)) LM_WARN("tls_force_run turned on, ignoring " @@ -857,6 +856,7 @@ int tls_check_sockets(tls_domains_cfg_t* cfg) void tls_h_mod_destroy_f(void) { LM_DBG("tls module final tls destroy\n"); +#if OPENSSL_VERSION_NUMBER < 0x010100000L || defined(LIBRESSL_VERSION_NUMBER) if(tls_mod_preinitialized > 0) ERR_free_strings(); /* TODO: free all the ctx'es */ @@ -869,4 +869,5 @@ void tls_h_mod_destroy_f(void) LM_DBG("executing openssl v1.1+ cleanup\n"); OPENSSL_cleanup(); #endif +#endif } diff --git a/src/modules/tls/tls_locking.c b/src/modules/tls/tls_locking.c index 4e5bbcc5e3..3eb6f033a5 100644 --- a/src/modules/tls/tls_locking.c +++ b/src/modules/tls/tls_locking.c @@ -140,6 +140,8 @@ unsigned long sr_ssl_id_f() /* returns -1 on error, 0 on success */ int tls_init_locks() { +/* OpenSSL is thread-safe since 1.1.0 */ +#if OPENSSL_VERSION_NUMBER < 0x10100000L /* init "static" tls locks */ n_static_locks=CRYPTO_num_locks(); if (n_static_locks<0){ @@ -167,13 +169,10 @@ int tls_init_locks() CRYPTO_set_locking_callback(locking_f); } -/* OpenSSL is thread-safe since 1.1.0 */ -#if OPENSSL_VERSION_NUMBER < 0x10100000L /* set "dynamic" locks callbacks */ CRYPTO_set_dynlock_create_callback(dyn_create_f); CRYPTO_set_dynlock_lock_callback(dyn_lock_f); CRYPTO_set_dynlock_destroy_callback(dyn_destroy_f); -#endif /* starting with v1.0.0 openssl does not use anymore getpid(), but address * of errno which can point to same virtual address in a multi-process @@ -186,6 +185,7 @@ int tls_init_locks() * (only atomic_inc), fallback to the default use-locks mode * CRYPTO_set_add_lock_callback(atomic_add_f); */ +#endif return 0; error:
1
0
0
0
git:master:6bdb836a: modules: readme files regenerated - corex ... [skip ci]
by Kamailio Dev
18 Sep '20
18 Sep '20
Module: kamailio Branch: master Commit: 6bdb836a05dbec735bc281ec5eebbdc2908c9878 URL:
https://github.com/kamailio/kamailio/commit/6bdb836a05dbec735bc281ec5eebbdc…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org> Committer: Kamailio Dev <kamailio.dev(a)kamailio.org> Date: 2020-09-18T13:31:16+02:00 modules: readme files regenerated - corex ... [skip ci] --- Modified: src/modules/corex/README --- Diff:
https://github.com/kamailio/kamailio/commit/6bdb836a05dbec735bc281ec5eebbdc…
Patch:
https://github.com/kamailio/kamailio/commit/6bdb836a05dbec735bc281ec5eebbdc…
--- diff --git a/src/modules/corex/README b/src/modules/corex/README index 175cce91ce..70b7a07847 100644 --- a/src/modules/corex/README +++ b/src/modules/corex/README @@ -71,6 +71,7 @@ Muhammad Shahzad Shafi 5.5. corex.shm_summary 5.6. corex.pkg_summary 5.7. corex.shm.info + 5.8. corex.shm.stats 6. Event Routes @@ -167,6 +168,7 @@ Chapter 1. Admin Guide 5.5. corex.shm_summary 5.6. corex.pkg_summary 5.7. corex.shm.info + 5.8. corex.shm.stats 6. Event Routes @@ -727,6 +729,7 @@ event_route[dispatcher:dst-down] { 5.5. corex.shm_summary 5.6. corex.pkg_summary 5.7. corex.shm.info + 5.8. corex.shm.stats 5.1. corex.debug @@ -786,6 +789,13 @@ event_route[dispatcher:dst-down] { Example: kamcli rpc shm.info +5.8. corex.shm.stats + + Return shared memory statistics (values are in bytes). + + Example: + kamcli rpc shm.stats + 6. Event Routes 6.1. event_route[network:msg]
1
0
0
0
git:master:b7c3ca0c: corex: docs for rpc command shm.stats
by Daniel-Constantin Mierla
18 Sep '20
18 Sep '20
Module: kamailio Branch: master Commit: b7c3ca0c01a828bc9c25c3db2dca87b3c0522bfe URL:
https://github.com/kamailio/kamailio/commit/b7c3ca0c01a828bc9c25c3db2dca87b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2020-09-18T13:23:22+02:00 corex: docs for rpc command shm.stats --- Modified: src/modules/corex/doc/corex_admin.xml --- Diff:
https://github.com/kamailio/kamailio/commit/b7c3ca0c01a828bc9c25c3db2dca87b…
Patch:
https://github.com/kamailio/kamailio/commit/b7c3ca0c01a828bc9c25c3db2dca87b…
--- diff --git a/src/modules/corex/doc/corex_admin.xml b/src/modules/corex/doc/corex_admin.xml index aecc5e895c..e9d73b1c78 100644 --- a/src/modules/corex/doc/corex_admin.xml +++ b/src/modules/corex/doc/corex_admin.xml @@ -982,6 +982,20 @@ event_route[dispatcher:dst-down] { <programlisting format="linespecific"> &kamcli; rpc shm.info </programlisting> + </section> + <section id="corex.rpc.shm.stats"> + <title> + <function moreinfo="none">corex.shm.stats</function> + </title> + <para> + Return shared memory statistics (values are in bytes). + </para> + <para> + Example: + </para> + <programlisting format="linespecific"> + &kamcli; rpc shm.stats + </programlisting> </section> </section>
1
0
0
0
git:master:90e152b6: corex: rpc command shm.stats
by Daniel-Constantin Mierla
18 Sep '20
18 Sep '20
Module: kamailio Branch: master Commit: 90e152b691e9f18ff53a908af0634eaa024a4f7d URL:
https://github.com/kamailio/kamailio/commit/90e152b691e9f18ff53a908af0634ea…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2020-09-18T13:16:39+02:00 corex: rpc command shm.stats - convenience function to be coherent with pkg variants --- Modified: src/modules/corex/corex_rpc_shm.c --- Diff:
https://github.com/kamailio/kamailio/commit/90e152b691e9f18ff53a908af0634ea…
Patch:
https://github.com/kamailio/kamailio/commit/90e152b691e9f18ff53a908af0634ea…
--- diff --git a/src/modules/corex/corex_rpc_shm.c b/src/modules/corex/corex_rpc_shm.c index 5316cdc7bc..7bf10553dd 100644 --- a/src/modules/corex/corex_rpc_shm.c +++ b/src/modules/corex/corex_rpc_shm.c @@ -54,8 +54,34 @@ static void corex_rpc_shm_info(rpc_t* rpc, void* ctx) } } +static const char* corex_rpc_shm_stats_doc[2] = { + "Return shared memory stats", + 0 +}; + +/* + * RPC command to return shm stats + */ +static void corex_rpc_shm_stats(rpc_t* rpc, void* c) +{ + struct mem_info mi; + void *th; + + shm_info(&mi); + rpc->add(c, "{", &th); + rpc->struct_add(th, "uuuuuu", + "total", (unsigned int)(mi.total_size), + "free", (unsigned int)(mi.free), + "used", (unsigned int)(mi.used), + "real_used",(unsigned int)(mi.real_used), + "max_used", (unsigned int)(mi.max_used), + "fragments", (unsigned int)mi.total_frags + ); +} + rpc_export_t corex_rpc_shm_cmds[] = { - {"shm.info", corex_rpc_shm_info, corex_rpc_shm_info_doc, 0}, + {"shm.info", corex_rpc_shm_info, corex_rpc_shm_info_doc, 0}, + {"shm.stats", corex_rpc_shm_stats, corex_rpc_shm_stats_doc, 0}, {0, 0, 0, 0} };
1
0
0
0
[kamailio/kamailio] Memory use after free - qm_realloc(): BUG: trying to realloc an already freed pointer (#2475)
by gormania
18 Sep '20
18 Sep '20
<!-- 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 <!-- Explain what you did, what you expected to happen, and what actually happened. --> Intermittent CRITICAL memory use after free at startup. ### Troubleshooting #### Reproduction <!-- If the issue can be reproduced, describe how it can be done. --> This happens intermittently on startup. Because our container restarts automatically and the issue is not seen other than at startup it is ultimately innocuous. But the restarts are a false alarm for sys admin. #### 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). --> ``` Sep 10 15:29:22 product-name process-name[1764]: new user 'admin(a)172.51.1.1' added Sep 10 15:29:22 product-name process-name[1764]: Starting xxxx 1.5.8-0+gxxxxxxxx Sep 10 15:29:22 product-name process-name[1764]: Setting core dump pattern Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_init.c:503]: init_tls_compression(): disabling compression... Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: <core> [core/sctp_core.c:74]: sctp_core_check_support(): SCTP API not enabled - if you want to use it, load sctp module Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: <core> [core/tcp_main.c:5042]: init_tcp(): using epoll_lt as the io watch method (auto detected) Sep 10 15:29:22 product-name process-name[1764]: Listening on Sep 10 15:29:22 product-name process-name[1764]: udp: 172.51.1.1:5060 advertise 172.51.1.1:5060 Sep 10 15:29:22 product-name process-name[1764]: tcp: 172.51.1.1:5060 advertise 172.51.1.1:5060 Sep 10 15:29:22 product-name process-name[1764]: tls: 172.51.1.1:5061 advertise 172.51.1.1:5060 Sep 10 15:29:22 product-name process-name[1764]: Aliases: Sep 10 15:29:22 product-name process-name[1764]: tls: bb48d50a0892:5061 Sep 10 15:29:22 product-name process-name[1764]: tcp: bb48d50a0892:5060 Sep 10 15:29:22 product-name process-name[1764]: udp: bb48d50a0892:5060 Sep 10 15:29:22 product-name process-name[1764]: *: 172.51.1.1:* Sep 10 15:29:22 product-name process-name[1764]: Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: db_sqlite [db_sqlite.c:218]: mod_init(): SQlite library version 3.16.2 (compiled using 3.16.2) Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: rr [../outbound/api.h:52]: ob_load_api(): unable to import bind_ob - maybe module is not loaded Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: rr [rr_mod.c:177]: mod_init(): outbound module not available Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: http_async_client [http_async_client_mod.c:222]: mod_init(): Initializing Http Async module Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: [App] xxxx init Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: [---] Location reporting format: custom-1 Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: [---] Logging of location reporting: DISABLED Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_mod.c:377]: mod_init(): With ECDH-Support! Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_mod.c:380]: mod_init(): With Diffie Hellman Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: auth [auth_mod.c:345]: mod_init(): qop set, but nonce-count (nonce_count) support disabled Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_init.c:719]: init_tls_h(): compiled with openssl version "OpenSSL 1.0.2u 20 Dec 2019" (0x1000215f), kerberos support: off, compression: on Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_init.c:723]: init_tls_h(): installed openssl library version "OpenSSL 1.0.2u 20 Dec 2019" (0x1000215f), kerberos support: off, zlib compression: off Sep 10 15:29:22 product-name process-name[1764]: compiler: gcc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -g -O2 -fdebug-prefix-map=/build/openssl1.0-NNAFzi/openssl1.0-1.0.2u=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wa,--noexecstack -Wall -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM Sep 10 15:29:22 product-name process-name[1764]: 0(1) WARNING: tls [tls_init.c:784]: init_tls_h(): openssl bug #1491 (crash/mem leaks on low memory) workaround enabled (on low memory tls operations will fail preemptively) with free memory thresholds 7864320 and 3932160 bytes Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: <core> [core/cfg/cfg_ctx.c:595]: cfg_set_now(): tls.low_mem_threshold1 has been changed to 7864320 Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: <core> [core/cfg/cfg_ctx.c:595]: cfg_set_now(): tls.low_mem_threshold2 has been changed to 3932160 Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: <core> [main.c:2779]: main(): processes (at least): 15 - shm size: 67108864 - pkg size: 8388608 Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: <core> [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is initially 212992 Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: <core> [core/udp_server.c:206]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984 Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: http_async_client [async_http.c:101]: async_http_init_sockets(): inter-process event notification sockets initialized Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: http_async_client [async_http.c:101]: async_http_init_sockets(): inter-process event notification sockets initialized Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_domain.c:303]: ksr_tls_fill_missing(): TLSs<default>: tls_method=18 Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_domain.c:315]: ksr_tls_fill_missing(): TLSs<default>: certificate='/etc/kamailio/publickey.pem' Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_domain.c:322]: ksr_tls_fill_missing(): TLSs<default>: ca_list='(null)' Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_domain.c:329]: ksr_tls_fill_missing(): TLSs<default>: crl='(null)' Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_domain.c:333]: ksr_tls_fill_missing(): TLSs<default>: require_certificate=0 Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_domain.c:340]: ksr_tls_fill_missing(): TLSs<default>: cipher_list='(null)' Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_domain.c:347]: ksr_tls_fill_missing(): TLSs<default>: private_key='/etc/kamailio/privatekey.pem' Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_domain.c:351]: ksr_tls_fill_missing(): TLSs<default>: verify_certificate=0 Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_domain.c:354]: ksr_tls_fill_missing(): TLSs<default>: verify_depth=9 Sep 10 15:29:22 product-name process-name[1764]: 0(1) NOTICE: tls [tls_domain.c:1087]: ksr_tls_fix_domain(): registered server_name callback handler for socket [:0], server_name='<default>' ... Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_domain.c:707]: set_verification(): TLSs<default>: No client certificate required and no checks performed Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_domain.c:303]: ksr_tls_fill_missing(): TLSc<default>: tls_method=18 Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_domain.c:315]: ksr_tls_fill_missing(): TLSc<default>: certificate='(null)' Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_domain.c:322]: ksr_tls_fill_missing(): TLSc<default>: ca_list='/etc/kamailio/sipcacert.pem' Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_domain.c:329]: ksr_tls_fill_missing(): TLSc<default>: crl='(null)' Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_domain.c:333]: ksr_tls_fill_missing(): TLSc<default>: require_certificate=1 Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_domain.c:340]: ksr_tls_fill_missing(): TLSc<default>: cipher_list='(null)' Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_domain.c:347]: ksr_tls_fill_missing(): TLSc<default>: private_key='(null)' Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_domain.c:351]: ksr_tls_fill_missing(): TLSc<default>: verify_certificate=1 Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_domain.c:354]: ksr_tls_fill_missing(): TLSc<default>: verify_depth=9 Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: tls [tls_domain.c:692]: set_verification(): TLSc<default>: Server MUST present valid certificate Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: http_async_client [async_http.c:84]: async_http_init_worker(): started worker process: 1 Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: http_async_client [async_http.c:84]: async_http_init_worker(): started worker process: 2 Sep 10 15:29:22 product-name process-name[1764]: 8(160) INFO: ctl [io_listener.c:214]: io_listen_loop(): io_listen_loop: using epoll_lt io watch method (config) Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: <core> [main.c:783]: handle_sigs(): SIGCHLD received, but no child has stopped, ignoring it Sep 10 15:29:22 product-name process-name[1764]: 6(158) CRITICAL: <core> [core/mem/q_malloc.c:646]: qm_realloc(): BUG: trying to realloc an already freed pointer 0x7f7d3413f928 , fragment 0x7f7d3413f8f0 -- aborting Sep 10 15:29:22 product-name process-name[1764]: 14(166) CRITICAL: <core> [core/pass_fd.c:277]: receive_fd(): EOF on 23 Sep 10 15:29:22 product-name process-name[1764]: 0(1) ALERT: <core> [main.c:766]: handle_sigs(): child process 158 exited by a signal 6 Sep 10 15:29:22 product-name process-name[1764]: 0(1) ALERT: <core> [main.c:769]: handle_sigs(): core was not generated Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: <core> [main.c:792]: handle_sigs(): terminating due to SIGCHLD Sep 10 15:29:22 product-name process-name[1764]: 1(153) INFO: <core> [main.c:847]: sig_usr(): signal 15 received Sep 10 15:29:22 product-name process-name[1764]: 2(154) INFO: <core> [main.c:847]: sig_usr(): signal 15 received Sep 10 15:29:22 product-name process-name[1764]: 4(156) INFO: <core> [main.c:847]: sig_usr(): signal 15 received Sep 10 15:29:22 product-name process-name[1764]: 14(166) CRITICAL: <core> [core/pass_fd.c:277]: receive_fd(): EOF on 15 Sep 10 15:29:22 product-name process-name[1764]: 3(155) INFO: <core> [main.c:847]: sig_usr(): signal 15 received Sep 10 15:29:22 product-name process-name[1764]: 14(166) CRITICAL: <core> [core/pass_fd.c:277]: receive_fd(): EOF on 18 Sep 10 15:29:22 product-name process-name[1764]: 7(159) INFO: <core> [main.c:847]: sig_usr(): signal 15 received Sep 10 15:29:22 product-name process-name[1764]: 5(157) INFO: <core> [main.c:847]: sig_usr(): signal 15 received Sep 10 15:29:22 product-name process-name[1764]: 9(161) INFO: <core> [main.c:847]: sig_usr(): signal 15 received Sep 10 15:29:22 product-name process-name[1764]: 10(162) INFO: <core> [main.c:847]: sig_usr(): signal 15 received Sep 10 15:29:22 product-name process-name[1764]: 8(160) INFO: <core> [main.c:847]: sig_usr(): signal 15 received Sep 10 15:29:22 product-name process-name[1764]: 11(163) INFO: <core> [main.c:847]: sig_usr(): signal 15 received Sep 10 15:29:22 product-name process-name[1764]: 14(166) INFO: <core> [main.c:847]: sig_usr(): signal 15 received Sep 10 15:29:22 product-name process-name[1764]: 13(165) INFO: <core> [main.c:847]: sig_usr(): signal 15 received Sep 10 15:29:22 product-name process-name[1764]: 12(164) INFO: <core> [main.c:847]: sig_usr(): signal 15 received Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: db_sqlite [db_sqlite.c:227]: mod_destroy(): SQlite terminate Sep 10 15:29:22 product-name process-name[1764]: 0(1) INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized ``` #### 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). --> ``` Occurs at startup before SIP traffic relevant. ``` ### 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.3.4 (x86_64/linux) f7690e-dirty 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 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: f7690e -dirty compiled with gcc 6.3.0 ``` * **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 `uname -a`) --> ``` Running under docker on Centos 7 Linux bb48d50a0892 3.10.0-1062.el7.x86_64 #1 SMP Wed Aug 7 18:08:02 UTC 2019 x86_64 GNU/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/2475
3
5
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
28
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Results per page:
10
25
50
100
200