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
2024
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
June 2024
----- 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
14 participants
223 discussions
Start a n
N
ew thread
git:master:e066613c: geoip2: do not close global MMDB_s on destroy
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: e066613cac308d1129baebc47d7c245b36eba4b0 URL:
https://github.com/kamailio/kamailio/commit/e066613cac308d1129baebc47d7c245…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2024-06-01T07:39:54+02:00 geoip2: do not close global MMDB_s on destroy - GH #3861 --- Modified: src/modules/geoip2/geoip2_pv.c --- Diff:
https://github.com/kamailio/kamailio/commit/e066613cac308d1129baebc47d7c245…
Patch:
https://github.com/kamailio/kamailio/commit/e066613cac308d1129baebc47d7c245…
--- diff --git a/src/modules/geoip2/geoip2_pv.c b/src/modules/geoip2/geoip2_pv.c index d5b16351754..de017da1f65 100644 --- a/src/modules/geoip2/geoip2_pv.c +++ b/src/modules/geoip2/geoip2_pv.c @@ -564,7 +564,6 @@ void geoip2_destroy_list(void) void geoip2_destroy_pv(void) { if(_handle_GeoIP != NULL) { - MMDB_close(_handle_GeoIP); shm_free(_handle_GeoIP); _handle_GeoIP = NULL; }
5 months, 3 weeks
1
0
0
0
git:master:8ba4ee4e: geoip2: init MMDB_s global pointer and check on destroy
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 8ba4ee4e00798ca015adc48542d0e4de8ed9daad URL:
https://github.com/kamailio/kamailio/commit/8ba4ee4e00798ca015adc48542d0e4d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2024-06-01T07:23:43+02:00 geoip2: init MMDB_s global pointer and check on destroy --- Modified: src/modules/geoip2/geoip2_pv.c --- Diff:
https://github.com/kamailio/kamailio/commit/8ba4ee4e00798ca015adc48542d0e4d…
Patch:
https://github.com/kamailio/kamailio/commit/8ba4ee4e00798ca015adc48542d0e4d…
--- diff --git a/src/modules/geoip2/geoip2_pv.c b/src/modules/geoip2/geoip2_pv.c index 22789941d80..d5b16351754 100644 --- a/src/modules/geoip2/geoip2_pv.c +++ b/src/modules/geoip2/geoip2_pv.c @@ -65,7 +65,7 @@ typedef struct _geoip2_pv int type; } geoip2_pv_t; -static MMDB_s *_handle_GeoIP; +static MMDB_s *_handle_GeoIP = NULL; static gen_lock_t *lock = NULL; static sr_geoip2_item_t *_sr_geoip2_list = NULL; @@ -518,8 +518,7 @@ static void destroy_shmlock(void) int geoip2_init_pv(char *path) { int status; - _handle_GeoIP = shm_malloc(sizeof(struct MMDB_s)); - memset(_handle_GeoIP, 0, sizeof(struct MMDB_s)); + _handle_GeoIP = shm_mallocxz(sizeof(struct MMDB_s)); if(_handle_GeoIP == NULL) { SHM_MEM_ERROR; @@ -564,9 +563,11 @@ void geoip2_destroy_list(void) void geoip2_destroy_pv(void) { - MMDB_close(_handle_GeoIP); - shm_free(_handle_GeoIP); - _handle_GeoIP = NULL; + if(_handle_GeoIP != NULL) { + MMDB_close(_handle_GeoIP); + shm_free(_handle_GeoIP); + _handle_GeoIP = NULL; + } destroy_shmlock(); }
5 months, 3 weeks
1
0
0
0
[kamailio/kamailio] kamailio tls connection uses too much shared memory (Issue #3803)
by JiangHai2011
### Description a tls connection uses 52104 bytes. Among these memory, tcp_connection structure use 776 bytes and tcp_rd_buf use 6000 bytes, and the left part (45328 bytes) are all about SSL session with crypto. ### Expected behavior kamailio does some optimization for self defined BIO_TYPE_SOURCE_SINK bio type, to save more memory #### Actual observed behavior among this 45328 bytes, the biggest parts are BIO read buffer(16KB) and BIO write buffer(16KB). currently kamailio uses BIO_TYPE_SOURCE_SINK type bio, which needs kamailio manage the buffer by itself (there is no optimization). While nginx uses BIO_TYPE_MEM type bio, which is a openssl's internal bio type with memory optimization. As a result, nginx use less memory to accept more TLS connections than kamailio #### Debugging Data None #### Log Messages Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1219]: tlsf_sums(): pool (0x7f1a3eec1000) summarizing all alloc'ed. fragments: Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 2 size= 336 bytes from tls: tls_init.c: crypto/evp/evp_enc.c(43) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 1 size= 80 bytes from tls: tls_init.c: crypto/bn/bn_blind.c(36) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 3 size= 360 bytes from tls: tls_init.c: crypto/bn/bn_mont.c(232) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 2 size= 1456 bytes from tls: tls_init.c: crypto/evp/evp_enc.c(129) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 1 size= 120 bytes from tls: tls_init.c: ssl/t1_lib.c(1784) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 1 size= 56 bytes from tls: tls_init.c: ssl/statem/extensions.c(959) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 2 size= 112 bytes from tls: tls_init.c: ssl/t1_lib.c(1811) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 1 size= 56 bytes from tls: tls_init.c: ssl/statem/../packet_local.h(462) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 1 size= 56 bytes from tls: tls_init.c: ssl/statem/../packet_local.h(485) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 1 size= 640 bytes from tls: tls_init.c: ssl/ssl_sess.c(72) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 1 size= 144 bytes from tls: tls_init.c: ssl/packet_local.h(462) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 1 size= 224 bytes from tls: tls_init.c: crypto/evp/digest.c(139) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 3 size= 168 bytes from tls: tls_init.c: crypto/evp/digest.c(62) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 1 size= 16496 bytes from tls: tls_init.c: ssl/record/ssl3_buffer.c(124) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 1 size= 16712 bytes from tls: tls_init.c: ssl/record/ssl3_buffer.c(63) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 1 size= 6280 bytes from tls: tls_init.c: ssl/ssl_lib.c(691) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 1 size= 6776 bytes from core: tcp_main.c: tcpconn_new(1148) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 1 size= 56 bytes from tls: tls_init.c: tls_bio.c(184) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 1 size= 120 bytes from tls: tls_init.c: crypto/bio/bio_lib.c(73) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 1 size= 536 bytes from tls: tls_init.c: ssl/ssl_cert.c(76) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 1 size= 56 bytes from tls: tls_init.c: ssl/ssl_lib.c(793) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 1 size= 72 bytes from tls: tls_init.c: crypto/bio/bio_meth.c(41) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 1 size= 96 bytes from tls: tls_init.c: crypto/bio/bio_meth.c(38) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 1 size= 1040 bytes from tls: tls_init.c: ssl/s3_lib.c(3296) Mar 30 19:46:46 localhost.localdomain sipproxy[2273]: INFO: <core> [mem/tlsf_malloc.c:1235]: tlsf_sums(): count= 1 size= 56 bytes from tls: tls_server.c: tls_complete_init(229) #### SIP Traffic None ### Possible Solutions None ### Additional Information [root@ip-10-23-0-191 ec2-user]# /opt/kamailio/sbin/kamailio -v version: kamailio 4.4.7 (aarch64/linux) flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, 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-NOSMP, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: unknown compiled on 12:18:05 Mar 28 2024 with gcc 7.3.1 * **Operating System**: Linux localhost.localdomain 4.18.0-425.3.1.el8.x86_64 #1 SMP Tue Nov 8 14:08:25 EST 2022 x86_64 x86_64 x86_64 GNU/Linux -- Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3803
You are receiving this because you are subscribed to this thread. Message ID: <kamailio/kamailio/issues/3803(a)github.com>
5 months, 3 weeks
3
3
0
0
← Newer
1
...
20
21
22
23
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
Results per page:
10
25
50
100
200