Re: [SR-Users] memory: Free fragment not found

2017-02-17 Thread Dmitri Savolainen
create github issue for this https://github.com/kamailio/kamailio/issues/1001 2017-02-16 10:34 GMT+03:00 Daniel-Constantin Mierla : > If it is already running for some time, run: > > kamcmd corex.pkg_summary idx 1 > > and then get the related qm/fm status/summary log messages from syslog and > se

Re: [SR-Users] memory: Free fragment not found

2017-02-15 Thread Daniel-Constantin Mierla
If it is already running for some time, run: kamcmd corex.pkg_summary idx 1 and then get the related qm/fm status/summary log messages from syslog and send them here to check if there is any potential pkg leak in the sip worker one. Cheers, Daniel On 16/02/2017 08:27, Dmitri Savolainen wrote:

Re: [SR-Users] memory: Free fragment not found

2017-02-15 Thread Dmitri Savolainen
No any tests. It was running two weeks and crushed in out of peak period. i have never seen this before in the months of uptime. Will start monitoring pkg memory from this moment too. 2017-02-16 9:58 GMT+03:00 Daniel-Constantin Mierla : > Hello, > > for how long it was running? Was it any stress

Re: [SR-Users] memory: Free fragment not found

2017-02-15 Thread Daniel-Constantin Mierla
Hello, for how long it was running? Was it any stress test or just normal traffic? The issue is related to pkg memory, to get the stats of it per each process, run: kamcmd pkg.stats Cheers, Daniel On 15/02/2017 21:04, Dmitri Savolainen wrote: > Hi. > My kamailio v4.4.5 installation ( -m 512 -

[SR-Users] memory: Free fragment not found

2017-02-15 Thread Dmitri Savolainen
Hi. My kamailio v4.4.5 installation ( -m 512 -M 64 ) stop sip processing with repeatable error: Feb 15 21:45:05 kamailio[14173] ERROR: [mem/f_malloc.c:415]: > fm_search_defrag(): fm_search_defrag(0x7f39917fa010, 952); Free fragment > not found! > Feb 15 21:45:05 kamailio[14173] ERROR: [mem/f_ma

Re: [SR-Users] Memory leak in Kamailio 4.4.4 TLS Module

2016-12-22 Thread Daniel-Constantin Mierla
Hello, how much shared memory did you configure for kamailio (the value of -m parameter)? There are safety checks to ensure that there are available 256 to 512KB of shm/kamailio process in order to have safe ssl operations. If you don't allocate enough and you have a high value for children global

[SR-Users] Memory leak in Kamailio 4.4.4 TLS Module

2016-12-22 Thread raja raja
Hi, shared memory not freed once TLS connection close means shm available memory decreasing for new connection that leads to the following error *tls: ssl bug #1491 workaround: not enough memory for safe operation* *TestCase:* 1. start kamailio 2. use sample program to establish tls connection a

Re: [SR-Users] memory is not freed in system, while kamailio's statistic shows OK

2016-10-20 Thread Daniel-Constantin Mierla
Hello, from kamailio point of view, the only major component relying on system memory is the MI/RPC framework/commands. Otherwise, likely to be an external library. Cheers, Daniel On 19/10/16 11:46, Vasiliy Ganchev wrote: > Hi Daniel! > > Thanks for the pointing out! > > Currently re-checking

Re: [SR-Users] memory is not freed in system, while kamailio's statistic shows OK

2016-10-19 Thread Vasiliy Ganchev
Hi Daniel! Thanks for the pointing out! Currently re-checking system memory usage and monit behavior. Will report results later (seems that there is nothing to be done on the kamailio's point of view) Cheers! -- View this message in context: http://sip-router.1086192.n5.nabble.com/memory-i

Re: [SR-Users] memory is not freed in system, while kamailio's statistic shows OK

2016-10-19 Thread Daniel-Constantin Mierla
Hello, double checking to see if you looked at: - https://www.kamailio.org/wiki/tutorials/troubleshooting/memory#os_memory_reports Are you using http queries (curl library)? Cheers, Daniel On 18/10/16 16:39, Vasiliy Ganchev wrote: > Hi folk! > Have a production server > - used as webrtc to

[SR-Users] memory is not freed in system, while kamailio's statistic shows OK

2016-10-18 Thread Vasiliy Ganchev
Hi folk! Have a production server - used as webrtc to sip proxy - it is built on kamailio v 4.4.2 - Server handles connections from ~4000 incoming SIP trunks (transport=TLS). Kamailio provides auth for this trunks. - Kamailio receives also connections from Webrtc app. Calls from Webrtc routed to on

Re: [SR-Users] memory problem

2016-09-28 Thread ycaner
Hello; take a look at the memlog. after shutdown , it prints a data about memory size helps to fix it. Maybe it can fix it. In addition , there is upper version of 4.2.0. maybe you can update it! http://www.kamailio.org/wiki/cookbooks/4.2.x/core#memdbg -- View this message in context: http:

Re: [SR-Users] memory problem

2016-09-28 Thread beer Ll
. You’ll need to replace PID > with the process ID of one of your affected Kamailio processes, as taken > from the pkg.stats output. > > > > > > *From:* sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On > Behalf Of *beer Ll > *Sent:* 26 September 2016 11:56 &

Re: [SR-Users] memory problem

2016-09-26 Thread Phil Lavin
. You’ll need to replace PID with the process ID of one of your affected Kamailio processes, as taken from the pkg.stats output. From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of beer Ll Sent: 26 September 2016 11:56 To: sr-users@lists.sip-router.org Subject: [SR-Users

[SR-Users] memory problem

2016-09-26 Thread beer Ll
hi all I have kamailio 4.2.0 on Debian Jessie the parameters on startup of kamailio are : SHM_MEMORY=512 PKG_MEMORY=32 the server is dedicated to the kamailio SIP service with authentication and accounting on a separated db server the server process about 30/50 call setups per second every

Re: [SR-Users] Memory issue?

2016-01-29 Thread Igor Potjevlesch
Mailing List Objet : Re: [SR-Users] Memory issue? Hi Igor, Yes, it's caused by lack of shm. I don't know if there is a proper shm value. Depending on how many modules are loaded on kamailio and how much shm a module might use over time, more or less shm should be used. In your parti

Re: [SR-Users] Memory issue?

2016-01-22 Thread Mititelu Stefan
t; > *De :* sr-users [mailto:sr-users-boun...@lists.sip-router.org] *De la > part de* smititelu > *Envoyé :* jeudi 21 janvier 2016 12:22 > *À :* Kamailio (SER) - Users Mailing List > *Objet :* Re: [SR-Users] Memory issue? > > > > On 21.01.2016 12:37, Igor Potjevlesch wrote:

Re: [SR-Users] Memory issue?

2016-01-22 Thread Igor Potjevlesch
De la part de smititelu Envoyé : jeudi 21 janvier 2016 12:22 À : Kamailio (SER) - Users Mailing List Objet : Re: [SR-Users] Memory issue? On 21.01.2016 12:37, Igor Potjevlesch wrote: And 2 coredumps readable: Core was generated by `/usr/local/sbin/kamailio -P /var/run/kamailio.pid -m 256

Re: [SR-Users] Memory issue?

2016-01-21 Thread smititelu
On 21.01.2016 12:37, Igor Potjevlesch wrote: And 2 coredumps readable: Core was generated by `/usr/local/sbin/kamailio -P /var/run/kamailio.pid -m 256 -M 64'. Program terminated with signal 11, Segmentation fault. #0 0x7f13a1550af2 in dtrie_insert (root=0x7f138d7ffb38, number=0x22ba6c

[SR-Users] Memory issue?

2016-01-21 Thread Igor Potjevlesch
Hello, I got several errors this morning on a Kamailio instance. The first occurred without a complete crash of Kamailio but 4 coredumps have been created: BFD: Warning: /core.3818 is truncated: expected core file size >= 342618112, found: 61579264. [New Thread 3818] Cannot access mem

Re: [SR-Users] Memory Issue while accessing $rb (prakash)

2015-07-30 Thread Surendra.P
Hi Prakash, Specify the more private memory with -M option, while running kamailio Like -M 64 :-) Regards @surendra ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org

Re: [SR-Users] Memory Issue while accessing $rb

2015-07-29 Thread Daniel-Constantin Mierla
Hello, you have to increase the private memory -- see -M command line parameter -- as well as pv_buffer_size core parameter -- see core cookbook in the wiki. Cheers, Daniel On 29/07/15 13:37, prakash wrote: > > Hello, > > > > I am getting this Error: > > > > *ERROR: [rvalue.c:1706]: rval_st

[SR-Users] Memory Issue while accessing $rb

2015-07-29 Thread prakash
Hello, I am getting this Error: ERROR: [rvalue.c:1706]: rval_str_add2(): rv eval out of memory ERROR: [lvalue.c:389]: lval_assign(): rval expression evaluation failed (881,17-881,29) When I tried access $rb when sending large amount of data(nearly 4MB) as a XML body. How can I sort

Re: [SR-Users] Memory leak or bad setting.

2015-05-13 Thread Daniel-Constantin Mierla
Hello, thanks for reporting back and knowing it was fixed. Cheers, Daniel On 13/05/15 09:31, Kjeld Flarup wrote: > Hi Daniel > > Just to confirm that 4.2.4 indeed solved the problem. > Thanks for your time. > > Med venlig hilsen / Best regards > Kjeld Flarup (Christensen) M.Sc E.E, Teknisk chef

Re: [SR-Users] Memory leak or bad setting.

2015-05-13 Thread Kjeld Flarup
Hi Daniel Just to confirm that 4.2.4 indeed solved the problem. Thanks for your time. Med venlig hilsen / Best regards Kjeld Flarup (Christensen) M.Sc E.E, Teknisk chef Viptel ApS, Benslehøjvej 3, DK-7470 Karup J Telefon: +45 46949949, Telefax: +45 46949950, http://viptel.dk On 2015-05-08 16:31

Re: [SR-Users] Memory leak or bad setting.

2015-05-08 Thread Daniel-Constantin Mierla
Hello, it is recommended to upgrade to latest 4.2.x -- there were some fixes since version 4.2.1. The same configuration file and database structure works for all 4.2.x, therefore just deploy the newer 4.2.x like you did with 4.2.1 and just restart. After upgrade, if you still see decrease of pkg

[SR-Users] Memory leak or bad setting.

2015-05-08 Thread Kjeld Flarup
Hello We experienced a failure on our kamailio (4.2.1+trusty), which required a restart. May 6 07:40:41 rtpproxy01 /usr/sbin/kamailio[5467]: ERROR: [msg_translator.c:2270]: generate_res_buf_from_sip_res(): out of mem Afterwards we inspected all the settings to be using default, but at a much hi

Re: [SR-Users] Memory issue

2014-05-13 Thread Igor Potjevlesch
13 mai 2014 15:20 À : Igor Potjevlesch; 'Kamailio (SER) - Users Mailing List' Objet : Re: [SR-Users] Memory issue Hello, oh, 4.0 is not compiled with memory debugging by default, so it is not printing the details about allocation place. Can you recompile with MEMDBG=1? You can chan

Re: [SR-Users] Memory issue

2014-05-13 Thread Daniel-Constantin Mierla
Potjevlesch; 'Kamailio (SER) - Users Mailing List' *Objet :* Re: [SR-Users] Memory issue Hello, On 12/05/14 17:29, Igor Potjevlesch wrote: Hello Daniel, Thank you for this feedback. We are running 4.0.4 without custom module. I do a sqlops request in a very small table (40 ro

Re: [SR-Users] Memory issue

2014-05-13 Thread Igor Potjevlesch
; 'Kamailio (SER) - Users Mailing List' Objet : Re: [SR-Users] Memory issue Hello, On 12/05/14 17:29, Igor Potjevlesch wrote: Hello Daniel, Thank you for this feedback. We are running 4.0.4 without custom module. I do a sqlops request in a very small table (40 rows) but on each RE

Re: [SR-Users] Memory issue

2014-05-12 Thread Daniel-Constantin Mierla
mailto:sr-users-boun...@lists.sip-router.org] *De la part de* Daniel-Constantin Mierla *Envoyé :* lundi 12 mai 2014 16:43 *À :* Kamailio (SER) - Users Mailing List *Objet :* Re: [SR-Users] Memory issue Hello, what version are you using? Are you doing sql queries that return large number of records (e.

Re: [SR-Users] Memory issue

2014-05-12 Thread Igor Potjevlesch
Envoyé : lundi 12 mai 2014 16:43 À : Kamailio (SER) - Users Mailing List Objet : Re: [SR-Users] Memory issue Hello, what version are you using? Are you doing sql queries that return large number of records (e.g., via sqlops)? Are you using any custom module you developed? The crash was fixed

Re: [SR-Users] Memory issue

2014-05-12 Thread Daniel-Constantin Mierla
Hello, what version are you using? Are you doing sql queries that return large number of records (e.g., via sqlops)? Are you using any custom module you developed? The crash was fixed in master branch, but somehow forgotten to be backported -- it is now in branch 4.1. Cheers, Daniel On 12

[SR-Users] Memory issue

2014-05-12 Thread Igor Potjevlesch
Hello, I had a memory issue this morning. First, I could see the following logs in /var/log/message : May 12 11:08:21 localhost /usr/local/sbin/kamailio[30268]: ERROR: [rvalue.c:2370]: rval_expr_eval(): rv eval int expression: out of memory May 12 11:08:25 localhost /usr/local/sbin/kamailio

Re: [SR-Users] Memory leak when using db_unixodbc, help tracking it down (try 2)

2014-03-26 Thread Alex Villací­s Lasso
El 24/03/14 09:46, Alex Villací­s Lasso escribió: El 24/03/14 04:17, Daniel-Constantin Mierla escribió: Hello, I found some cases when variables were not freed, but I cannot test as I am not using unixodbc. Can you cherry pick the patch: - http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-ro

Re: [SR-Users] Memory leak when using db_unixodbc, help tracking it down (try 2)

2014-03-24 Thread Alex Villací­s Lasso
El 24/03/14 04:17, Daniel-Constantin Mierla escribió: Hello, I found some cases when variables were not freed, but I cannot test as I am not using unixodbc. Can you cherry pick the patch: - http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=edc78dfb148c22f0d256485193bbdb0185

Re: [SR-Users] Memory issue

2014-03-24 Thread Igor Potjevlesch
ailio (SER) - Users Mailing List' Objet : RE: [SR-Users] Memory issue Hello Daniel, Thanks for your quick answer. Here is the output (but I don’t think that it’s still relevant because I had to restart Kamailio couple of minutes ago to avoid these errors and the c

Re: [SR-Users] Memory issue

2014-03-24 Thread Igor Potjevlesch
, Igor. De : sr-users-boun...@lists.sip-router.org [mailto:sr-users-boun...@lists.sip-router.org] De la part de Daniel-Constantin Mierla Envoyé : lundi 24 mars 2014 10:26 À : Kamailio (SER) - Users Mailing List Objet : Re: [SR-Users] Memory issue Hello, can you get the output of

Re: [SR-Users] Memory issue

2014-03-24 Thread Daniel-Constantin Mierla
Hello, can you get the output of: kamcmd pkg.stats ? Also, if you have big config, work with database queries in config file, consider setting more private memory with -M paramter. -m is only of share memory: OPTIONS="-P /var/run/$prog.pid -m 256 -M 12" Cheers, Daniel On 24/03/14 10:23,

[SR-Users] Memory issue

2014-03-24 Thread Igor Potjevlesch
Hello, After couple of weeks without issue, my Kamailio 4.0 has begun to reject calls this week-end. The first error : ERROR: [msg_translator.c:2012]: build_res_buf_from_sip_res(): ERROR: build_res_buf_from_sip_res: out of mem. OR ERROR: [msg_translator.c:2012]: build_res_buf_from_sip_res(

Re: [SR-Users] Memory leak when using db_unixodbc, help tracking it down (try 2)

2014-03-24 Thread Daniel-Constantin Mierla
Hello, I found some cases when variables were not freed, but I cannot test as I am not using unixodbc. Can you cherry pick the patch: - http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=edc78dfb148c22f0d256485193bbdb0185b76d2f and see if not all goes ok? If not other issu

[SR-Users] Memory leak when using db_unixodbc, help tracking it down (try 2)

2014-03-21 Thread Alex Villací­s Lasso
I have a CentOS 6 installation with the following packages installed from the RPM build service from Kamailio: kamailio-unixodbc-4.1.2-1.1.x86_64 kamailio-4.1.2-1.1.x86_64 kamailio-presence-4.1.2-1.1.x86_64 kamailio-utils-4.1.2-1.1.x86_64 I am also using db_unixodbc for all database accesses (w

Re: [SR-Users] Memory leak in http_query() function (utils module)

2014-02-18 Thread Juha Heinanen
Guillaume Bour writes: > Hi Juha, here it is thanks, i just committed the patch. -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-

Re: [SR-Users] Memory leak in http_query() function (utils module)

2014-02-18 Thread Guillaume Bour
On 17/02/2014 20:34, Juha Heinanen wrote: Guillaume Bour writes: Can't you directly apply my patch on 4.0 branch ? i can if you send me all changes in one patch. -- juha Hi Juha, here it is Regards, Guillaume diff --git a/kamailio-4.0.5.1/modules/utils/functions.c b/kamailio-4.0.5.1/modul

Re: [SR-Users] Memory leak in http_query() function (utils module)

2014-02-17 Thread Juha Heinanen
Guillaume Bour writes: > Can't you directly apply my patch on 4.0 branch ? i can if you send me all changes in one patch. -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.si

Re: [SR-Users] Memory leak in http_query() function (utils module)

2014-02-17 Thread Guillaume Bour
On 15/02/2014 03:21, Juha Heinanen wrote: Guillaume Bour writes: I attached patches to fix those issues (applies to 4.0 branch) thanks for the patch. since it was for 4.0 i had to manually apply the changes to master and then i did cherry pick to 4.1. cherry pick to 4.0 failed. -- juha Hi

[SR-Users] Memory leak in http_query() function (utils module)

2014-02-14 Thread Juha Heinanen
Guillaume Bour writes: > I attached patches to fix those issues (applies to 4.0 branch) thanks for the patch. since it was for 4.0 i had to manually apply the changes to master and then i did cherry pick to 4.1. cherry pick to 4.0 failed. -- juha __

[SR-Users] Memory leak in http_query() function (utils module)

2014-02-14 Thread Guillaume Bour
Hi folks, We identified a memory leak in *utils* module, when calling the http_query() function. a memory piece is allocated with malloc() to store http request result string (functions.c:54), but this memory is never freed. There is also a possible crash issue, because curl_easy_getinfo() is

Re: [SR-Users] Memory Leaks with Kamailio using SEAS module

2014-01-17 Thread Daniel-Constantin Mierla
Hello, thanks for troubleshooting further and giving a solution you found. I will check and commit. Cheers, Daniel On 16/01/14 15:42, ziad habchi wrote: The Problem is in tm/dlg.c in function free_dlg its missing: if(_d->loc_dname.s) shm_free(_d->loc_dname.s); if(_d->rem_dname.s) shm_fre

Re: [SR-Users] memory debug

2013-12-19 Thread Victor V. Kustov
Hi, Daniel-Constantin Mierla! >Hello, > >if you don't want the memory operations logs, then memdbg has to be >higher than debug. ok, thanks! sorry for buzz, doc contain this info, i'm just inattentive. -- WBR, Victor JID: coy...@bks.tv JID: coy...@bryansktel.ru I use FREE operation sys

Re: [SR-Users] memory debug

2013-12-19 Thread Daniel-Constantin Mierla
Hello, if you don't want the memory operations logs, then memdbg has to be higher than debug. Not to get the dumps at the end, memlog has to be higher as well. Cheers, Daniel On 19/12/13 13:15, Victor V. Kustov wrote: Hi, all debug=2 memdbg=0 memlog=0 mem_summary=0 i saw it in kamcmd cfg.

[SR-Users] memory debug

2013-12-19 Thread Victor V. Kustov
Hi, all debug=2 memdbg=0 memlog=0 mem_summary=0 i saw it in kamcmd cfg.get... but anyway q_malloc messages in log. where i make mistake? -- WBR, Victor JID: coy...@bks.tv JID: coy...@bryansktel.ru I use FREE operation system: 3.10.24-calculate GNU/Linux ___

Re: [SR-Users] memory

2013-12-17 Thread Keith
Hi, Yeah sorry, I had to restart it as it's a production box. I have the log file which I can show you? Cheers Keith ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cg

Re: [SR-Users] Memory

2013-12-17 Thread Daniel-Constantin Mierla
Hello, have you restarted Kamailio meanwhile? I mean, is not the same instance that printed the error message? The stats are needed when that message is printed. Cheers, Daniel On 17/12/13 09:52, Keith wrote: Hi, Here are the details: Version: 4.02 *kamcmd pkg.stats:* { entry:

Re: [SR-Users] Memory

2013-12-17 Thread Keith
Hi, Here are the details: Version: 4.02 *kamcmd pkg.stats:* { entry: 0 pid: 15738 rank: 0 used: 1521632 free: 2504528 real_used: 1689776 } { entry: 1 pid: 15745 rank: 1 used: 1530112 free: 2495248 r

Re: [SR-Users] Memory

2013-12-16 Thread Daniel-Constantin Mierla
Hello, what version are you using? Can you give the output of: kamctl stats kamcmd pkg.stats Cheers, Daniel On 16/12/13 15:45, Keith wrote: Hi, Not sure if this is a bug or config but getting this error message: insert_subst_lump_after(): ERROR: insert_new_lump_after: out of memory Any id

[SR-Users] Memory

2013-12-16 Thread Keith
Hi, Not sure if this is a bug or config but getting this error message: insert_subst_lump_after(): ERROR: insert_new_lump_after: out of memory Any ideas? Keith ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.s

Re: [SR-Users] Memory Leaks with Kamailio using SEAS module

2013-12-03 Thread Daniel-Constantin Mierla
inal Message- From: sr-users-boun...@lists.sip-router.org [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Daniel-Constantin Mierla Sent: Monday, December 2, 2013 7:40 PM To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] Memory Leaks with Kamailio using SEAS module Hel

Re: [SR-Users] Memory Leaks with Kamailio using SEAS module

2013-12-02 Thread ziad habchi
debug_flag = 0 dont_fork_cnt = 0 n_lst = 0x823b9dc p = 0x804aea8 "E\005" __FUNCTION__ = "main" -Original Message- From: sr-users-boun...@lists.sip-router.org [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Daniel-Constant

Re: [SR-Users] Memory Leaks with Kamailio using SEAS module

2013-12-02 Thread Daniel-Constantin Mierla
Hello, did you get a core file? If yes, send here the output for 'bt full' taken in gdb. Cheers, Daniel On 12/2/13 5:14 PM, zhabchi wrote: the following is the error i got when the client connection to SEAS exited : tm [t_reply.c:604]: _reply_light(): ERROR: _reply_light: cannot allocate s

Re: [SR-Users] Memory Leaks with Kamailio using SEAS module

2013-12-02 Thread zhabchi
the following is the error i got when the client connection to SEAS exited : tm [t_reply.c:604]: _reply_light(): ERROR: _reply_light: cannot allocate shmem buffer i recompiled Kamailio with MEMDBG=1 and here what i got [mem/q_malloc.c:159]: qm_debug_frag(): BUG: qm_*: prev. fragm. tail overwri

[SR-Users] Memory Leaks with Kamailio using SEAS module

2013-12-02 Thread ziad habchi
Dear Support, I am having an "out of memory" problem while using kamailio with SEAS module. After using Kamailio with the SEAS module for few hours with a high load , I am getting "out of memory" error that I believe is caused from a memory leak. I would like your help interpreting this error

Re: [SR-Users] Memory leak in 3.3.4

2013-10-16 Thread David Cunningham
Hi Daniel, Configuration sent to you privately. Thanks. On 16 October 2013 20:28, Daniel-Constantin Mierla wrote: > Hello, > > indeed, it looks like a system memory leak, for what so ever reason the > discussion was misled to pkg. > > Can you send me the list of modules you load (loadmodule l

Re: [SR-Users] Memory leak in 3.3.4

2013-10-16 Thread Daniel-Constantin Mierla
Hello, indeed, it looks like a system memory leak, for what so ever reason the discussion was misled to pkg. Can you send me the list of modules you load (loadmodule lines) as well as the functions from your perl script that are related to kamailio internal functions or variables? You can se

Re: [SR-Users] Memory leak in 3.3.4

2013-10-14 Thread David Cunningham
Hi Daniel, Thanks for the reply again. Looking at the email history, I'm not sure how we decided it was definitely a pkg memory problem. What we see is the output of "ps aux" as follows: root@sip0-test:~# ps aux | egrep -i "kamailio|mem" USER PID %CPU %MEMVSZ RSS TTY STAT START

Re: [SR-Users] Memory leak in 3.3.4

2013-10-11 Thread Daniel-Constantin Mierla
Hi David, On 10/10/13 11:36 PM, David Cunningham wrote: Hi Daniel, Thanks for the reply. Perhaps what we're seeing is normal, and the memory use is meant to increase as time progresses. Would you expect to see an ongoing memory use increase, or when should it stop increasing? private memor

Re: [SR-Users] Memory leak in 3.3.4

2013-10-10 Thread David Cunningham
Hi Daniel, I was looking to give you the information you requested in your previous reply for PID 6824. Hopefully this is it: # sercmd pkg.stats pid 6824 { entry: 1 pid: 6824 rank: 1 used: 209836 free: 3704080 real_used: 490224 } On 10 October 2013 21:41, Daniel-Consta

Re: [SR-Users] Memory leak in 3.3.4

2013-10-10 Thread Daniel-Constantin Mierla
Hello, getting pkg stats for a process: sercmd pkg.stats pid 1234 replace 1234 with the real PID value. There are options to use rank or index, see: - http://kamailio.org/docs/modules/stable/modules/kex.html#idp213872 Is it what you were looking for or did I misunderstood? Cheers, Daniel

Re: [SR-Users] Memory leak in 3.3.4

2013-10-09 Thread David Cunningham
Hi Daniel, How do I get that information please? The information above includes what I got from the pkgstats module. Is it by restarting Kamailio? On 4 October 2013 16:42, Daniel-Constantin Mierla wrote: > Hello, > > none of the chunks there are indication of a leak. Can you give the output

Re: [SR-Users] Memory leak in 3.3.4

2013-10-03 Thread Daniel-Constantin Mierla
Hello, none of the chunks there are indication of a leak. Can you give the output of pkg.stats for pid 6824? Which of the processes has the highest value of used pkg memory? Cheers, Daniel On 10/4/13 4:25 AM, David Cunningham wrote: Hi Daniel, Here are the 'kamctl ps' and pkg status logs.

Re: [SR-Users] Memory leak in 3.3.4

2013-10-03 Thread David Cunningham
Hi Daniel, Here are the 'kamctl ps' and pkg status logs. During the 24 hours it ran for lots of REGISTER packets came through and memory use definitely increased. Thank you. Process:: ID=0 PID=6822 Type=attendant Process:: ID=1 PID=6824 Type=udp receiver child=0 sock=67.58.182.98:5060 Process:

Re: [SR-Users] Memory leak in 3.3.4

2013-10-02 Thread David Cunningham
Thanks Daniel. We will provide feedback when we have let it run for a while. On 2 October 2013 22:51, Daniel-Constantin Mierla wrote: > Hello, > > yes, you should run it for a while, with traffic, otherwise the leak > cannot be discovered. > > You can watch the processes with rank 1,2,3 and se

Re: [SR-Users] Memory leak in 3.3.4

2013-10-02 Thread Daniel-Constantin Mierla
Hello, yes, you should run it for a while, with traffic, otherwise the leak cannot be discovered. You can watch the processes with rank 1,2,3 and see when the free memory is decreasing. Then get the pkg status logs. Get also the list of running processes with 'kamctl ps' so I know at what pi

Re: [SR-Users] Memory leak in 3.3.4

2013-10-02 Thread Daniel-Constantin Mierla
Hello, ahh, right, forgot that it was disabled because it was not safe to use at runtime for worker processes. You have to use: kamcmd cfg.set_now_int core mem_dump_pkg then wait for a bit so that process is receiving a SIP message. Or, if you restart, the stats are printed in syslog for al

Re: [SR-Users] Memory leak in 3.3.4

2013-10-01 Thread David Cunningham
Hi Daniel, When I send SIGUSR1 to a worker process nothing is logged. Any ideas there? The following is the output of "sercmd pkg.stats". { entry: 0 pid: 14570 rank: 0 used: 191100 free: 3731504 real_used: 462800 } { entry: 1 pid: 14571 rank: 1 used: 202656

Re: [SR-Users] Memory leak in 3.3.4

2013-10-01 Thread Daniel-Constantin Mierla
Hello, send SIGUSR1 to one of the worker processes (e.g., UDP listener). The main process of kamailio doesn't process SIP messages, so it is not exposed to leaks. You can used 'kamcmd pkg.stats" to see statistics about usage of pkg per each process (older versions have sercmd). 'kamctl ps

Re: [SR-Users] Memory leak in 3.3.4

2013-10-01 Thread David Cunningham
Hi Daniel, What I copied and pasted is all that's listed when I do a kill -SIGUSR1 on the Kamailio master process. How do I get fuller logs? Thanks for your help. On 1 October 2013 21:57, Daniel-Constantin Mierla wrote: > Hello, > > you gave only the first part of memory log output. The chun

Re: [SR-Users] Memory leak in 3.3.4

2013-10-01 Thread Daniel-Constantin Mierla
Hello, you gave only the first part of memory log output. The chunks listed there are from startup, thus not part of a leak, because they are not allocated again at runtime. Can you give the full logs with messages from qm_status? The leaks are typically listed towards the end of those messa

Re: [SR-Users] Memory leak in 3.3.4

2013-07-31 Thread David Cunningham
Hi Daniel, Thank you, we will try that. On 31 July 2013 20:54, Daniel-Constantin Mierla wrote: > Hello, > > revising the patch I noticed I was moving the initialization of the > variable after pushing it to perl environment (from the perl docs, the > variable should have been initialized afte

Re: [SR-Users] Memory leak in 3.3.4

2013-07-30 Thread David Cunningham
Hi Daniel, We tried that patch, but Kamailio logged lots of errors like the following. The undefined value in question is $m, which should be the SIP message. Would you have any advice? Thanks. Jul 31 02:13:57 hostname /sbin/kamailio[21087]: ERROR: perl [openserxs.xs:1022]: perl error: Can't call

Re: [SR-Users] Memory leak in 3.3.4

2013-07-25 Thread David Cunningham
Hi Daniel, I'll suggest that to the customer. Thank you! On 25 July 2013 15:45, Daniel-Constantin Mierla wrote: > Hello, > > can you try the attached patch? It's the same patch, just for two > versions, one is for 3.3.x and the other for devel version > > It initializes the SIP message variab

Re: [SR-Users] Memory leak in 3.3.4

2013-07-24 Thread Daniel-Constantin Mierla
Hello, can you try the attached patch? It's the same patch, just for two versions, one is for 3.3.x and the other for devel version It initializes the SIP message variable that is passed to perl after creating the temporary environment, so it is actually destroyed by the perl embedded interp

Re: [SR-Users] Memory leak in 3.3.4

2013-07-24 Thread David Cunningham
Hi Daniel, The system is running Perl 5.8.8 on Red Hat Enterprise Linux Server release 5.4. If I remember right programs running under Valgrind can have issues, so I'm not sure if the customer will want to do that. Ideally we'd do it on a test system, but I'm not sure if we have any RHEL available

Re: [SR-Users] Memory leak in 3.3.4

2013-07-24 Thread Daniel-Constantin Mierla
Hello, I would say that perl_exec() is the one with the highest chances to be the reason for the leak. Next is line would be db_mysql module, if liked with some custom mysql client library, although even in this case will be unlikely. Back to perl, the module itself does not call any malloc,

Re: [SR-Users] Memory leak in 3.3.4

2013-07-24 Thread David Cunningham
Hello, We don't do any kamctl commands at all. We do have various modules loaded, as follows. The primary functions we use Kamailio for are phone registrations through usrloc, and routing calls to Asterisk through logic contained in Perl via perl_exec(). Thanks for all your advice so far! loadmod

Re: [SR-Users] Memory leak in 3.3.4

2013-07-23 Thread Daniel-Constantin Mierla
Hello, On 7/24/13 4:24 AM, David Cunningham wrote: Hello, Thank you very much for the email. In reply: 1. The system ran out of memory. Linux's oom-killer killed Kamailio. then all the instructions I gave are useless, they are for debugging kamailio's internal memory manager, which handles pk

Re: [SR-Users] Memory leak in 3.3.4

2013-07-23 Thread David Cunningham
Hello, Thank you very much for the email. In reply: 1. The system ran out of memory. Linux's oom-killer killed Kamailio. 2. You're right, DEBUG_MEMORY is a local configuration setting. If defined it sets memdbg to -2, and memlog to -2. The debug setting is -1. 3. We'll try setting mem_summary=1

Re: [SR-Users] Memory leak in 3.3.4

2013-07-22 Thread Daniel-Constantin Mierla
Hello, first, to clarify, is the system memory or kamailio's pkg/shm memory running out? If the operating system runs out of memory, then should be a leak in a library, because kamailio modules uses only from a pre-allocated chunk, not going over it. On 7/23/13 7:33 AM, David Cunningham wrot

[SR-Users] Memory leak in 3.3.4

2013-07-22 Thread David Cunningham
Hello, We're running a Kamailio 3.3.4 system, and Kamailio is slowly using more and more memory. Over a couple of weeks it will run out of system memory. We tried to enable memory debugging doing the following, but it resulted in Kamailio not responding to any SIP packets. Would anyone have advic

Re: [SR-Users] Memory allocation

2012-09-10 Thread Daniel-Constantin Mierla
Hello, On 9/10/12 6:18 PM, David wrote: Hello, Thanks for the clarification. I do not see get_statistics on the "micommands" page on the wiki. Where in the documentation is this command discussed? Are the stats for all processes or only for the process the responds to the mi command ? pkg.

Re: [SR-Users] Memory allocation

2012-09-10 Thread David
Hello, Thanks for the clarification. I do not see get_statistics on the "micommands" page on the wiki. Where in the documentation is this command discussed? Are the stats for all processes or only for the process the responds to the mi command ? Thanks, David On 2012-09-10 12:10, Daniel-

Re: [SR-Users] Memory allocation

2012-09-10 Thread Daniel-Constantin Mierla
Hello, -m is shared memory, so it is allocated per instance, it does not matter how many children you configure. kamctl fifo get_statistics all - returns internal statistics, including about shared memory kamctl stats - it's an alias to the previous command in the 3.3.x sercmd pkg.stats - to

[SR-Users] Memory allocation

2012-09-10 Thread David
Hello, I originally asked this on IRC, but realized that this is probably better suited for the mailing list : If I set memory usage to 100mb ( -m 100 ) and set 100 children ( children=100 in kamailio.cfg ). Will Kamailio use 100 mb or 10, 000 mb ( 10 gb ) of memory ? Is the memory limit per

Re: [SR-Users] memory usage

2012-09-05 Thread Uri Shacked
> The 20% initialy loaded is because I load many data with MTREE, > HTABLE,DIALPLAN etc(5 million rows with MTREE..) > Regarding the PKG, how do i set it? I read a few months ago that the > shared and private memory on version 3.2.2 are the same. > Thanks for the help :-) > > On 09/05/2012 11:4

Re: [SR-Users] memory usage

2012-09-05 Thread Marius Zbihlei
On 09/05/2012 11:44 AM, Uri Shacked wrote: Hi, Thanks, How do i find memory leaks? when my application starts the it shows the following values: shmem:fragments = 143898 shmem:freesize = 3446570952 shmem:max_used_size = 861854768 shmem:real_used_size = 848396344 shmem:total_size = 4294967296 shme

[SR-Users] memory usage

2012-09-05 Thread Uri Shacked
Hi, Thanks, How do i find memory leaks? when my application starts the it shows the following values: shmem:fragments = 143898 shmem:freesize = 3446570952 shmem:max_used_size = 861854768 shmem:real_used_size = 848396344 shmem:total_size = 4294967296 shmem:used_size = 319676976 I divided the "real

Re: [SR-Users] memory usage

2012-09-05 Thread Marius Zbihlei
On 09/05/2012 10:19 AM, Uri Shacked wrote: Hi, When I start kamailio it loads some data into memory. Now calls are starting to gather up. How can I check how mach memory does my avp's take? BR, Uri Hello Uri, avp's are associated with the transactions, so they free'd when the transaction sto

[SR-Users] memory usage

2012-09-05 Thread Uri Shacked
Hi, When I start kamailio it loads some data into memory. Now calls are starting to gather up. How can I check how mach memory does my avp's take? BR, Uri ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-rou

Re: [SR-Users] memory allocation failure while reading ca_list

2012-03-23 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Maybe we can improve a bit in the way that if there are same ca_list and > crl path, to load once and do references from the other profiles. I > don't know if there is lot of coding, but should be kept in mind for > future optimizations. Perhaps could be added

Re: [SR-Users] memory allocation failure while reading ca_list

2012-03-23 Thread Daniel-Constantin Mierla
On 3/19/12 12:59 PM, Juha Heinanen wrote: Daniel-Constantin Mierla writes: I guess it is loaded two time, for the server and client profiles. Try to set it via dedicated module parameter and see if you get better memory usage: http://kamailio.org/docs/modules/stable/modules/tls.html#ca_list

  1   2   >