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 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 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 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 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 leak fix on xcap_ auth.c

2012-01-30 Thread Daniel-Constantin Mierla
Hi Laura, thanks for the patch. I wonder how an xcap related function landed in utils module, perhaps Juha felt more comfortable adding it there. At first sight, patch looks ok. I cc-ed Juha in case he wants to have a look and integrate it. If not, I will commit before 3.2.2. Cheers, Daniel

[SR-Users] memory leak fix on xcap_ auth.c

2012-01-30 Thread laura testi
Hi Daniel, I'm sending you some memory leak fix we have found and fixed on modules/utils/xcap_ auth.c. The fixed memory leak is in pres_watcher_allowed (), and it is about the "xmlFreeDoc" that it's never called for the "xcap_tree" variable. We downloaded the source file from master branch and th

Re: [SR-Users] Memory Leak on DB Errors?

2011-10-31 Thread Klaus Darilion
On 31.10.2011 17:28, Daniel-Constantin Mierla wrote: Hello, On 10/31/11 7:56 AM, Klaus Darilion wrote: Hi Daniel! The "out of memory" happened again. This time they were able to dump the memory statistics before restarting the server. There are almost no allocations from other modules, but

Re: [SR-Users] Memory Leak on DB Errors?

2011-10-31 Thread Klaus Darilion
On 31.10.2011 17:28, Daniel-Constantin Mierla wrote: On 10/31/11 7:56 AM, Klaus Darilion wrote: Hi Daniel! The "out of memory" happened again. This time they were able to dump the memory statistics before restarting the server. There are almost no allocations from other modules, but lot of

Re: [SR-Users] Memory Leak on DB Errors?

2011-10-31 Thread Daniel-Constantin Mierla
Hello, On 10/31/11 7:56 AM, Klaus Darilion wrote: Hi Daniel! The "out of memory" happened again. This time they were able to dump the memory statistics before restarting the server. There are almost no allocations from other modules, but lot of allocations from usrloc and snmpstats: # gre

Re: [SR-Users] Memory Leak on DB Errors?

2011-10-30 Thread Klaus Darilion
Hi Daniel! The "out of memory" happened again. This time they were able to dump the memory statistics before restarting the server. There are almost no allocations from other modules, but lot of allocations from usrloc and snmpstats: # grep 'd from usrloc' syslog_core_dump|wc -l 138083 # gr

Re: [SR-Users] Memory Leak on DB Errors?

2011-10-17 Thread Daniel-Constantin Mierla
Hi Klaus, over the weekend I looked a bit at snmpstats module. These allocated chunks are for exporting location records. Are you pulling them over snmp? At the first sight, there should be a free of the memory when the records are consumed. The fact is that they are not pulled from usrloc m

Re: [SR-Users] Memory Leak on DB Errors?

2011-10-06 Thread Daniel-Constantin Mierla
Hello, On 10/6/11 6:04 PM, Klaus Darilion wrote: Daniel, I tried sercmd cfg.set_now_int core mem_dump_pkg but it did not dumped anything. Is this by design? even if you send a mi command afterwards (like kamctl fifo ps)? It might be something missing for this process, since the command to du

Re: [SR-Users] Memory Leak on DB Errors?

2011-10-06 Thread Klaus Darilion
Daniel, I tried sercmd cfg.set_now_int core mem_dump_pkg but it did not dumped anything. Is this by design? thanks klaus On 06.10.2011 13:07, Daniel-Constantin Mierla wrote: Hello, On 10/5/11 11:18 AM, Klaus Darilion wrote: On 04.10.2011 14:03, Daniel-Constantin Mierla wrote: Hello, On

Re: [SR-Users] Memory Leak on DB Errors?

2011-10-06 Thread Daniel-Constantin Mierla
Hello, seem the leak is in snmpstats, I see lot of allocations like: ALERT: qm_status:37599. N address=0xf30cdf74 frag=0xf30cdf5c size=20 used=1 ALERT: qm_status: alloc'd from snmpstats: interprocess_buffer.c: handleContactCallbacks(143) ALERT: qm_status: start check=f0

Re: [SR-Users] Memory Leak on DB Errors?

2011-10-06 Thread Klaus Darilion
Indeed, DBG_QM_MALLOC is defined. So I have set memlog=1 and dumped mem_info with: sercmd cfg.set_now_int core mem_dump_pkg 13286 sercmd cfg.set_now_int core mem_dump_shm 13286 The dumps were done after ~1h uptime. I can not offload the traffic and wait until transactions are freed, thus the lo

Re: [SR-Users] Memory Leak on DB Errors?

2011-10-06 Thread Daniel-Constantin Mierla
Hello, On 10/5/11 11:18 AM, Klaus Darilion wrote: On 04.10.2011 14:03, Daniel-Constantin Mierla wrote: Hello, On 10/4/11 12:27 PM, Klaus Darilion wrote: Meanwhile the server was restarted and the DB problems were fixed. As it is a production server I can not reproduce anymore. So, once it

Re: [SR-Users] Memory Leak on DB Errors?

2011-10-05 Thread Klaus Darilion
On 04.10.2011 14:03, Daniel-Constantin Mierla wrote: Hello, On 10/4/11 12:27 PM, Klaus Darilion wrote: Meanwhile the server was restarted and the DB problems were fixed. As it is a production server I can not reproduce anymore. So, once it started it didn't recovered, continued always with

Re: [SR-Users] Memory Leak on DB Errors?

2011-10-04 Thread Daniel-Constantin Mierla
Hello, On 10/4/11 12:27 PM, Klaus Darilion wrote: Meanwhile the server was restarted and the DB problems were fixed. As it is a production server I can not reproduce anymore. So, once it started it didn't recovered, continued always with that error? How much of shm did you configure? You ca

Re: [SR-Users] Memory Leak on DB Errors?

2011-10-04 Thread Daniel-Constantin Mierla
Hello, On 10/4/11 12:37 PM, Klaus Darilion wrote: Daniel, is it necessary to call "sql_result_free()" ad the end of the timer route? May it be related to this? it is not really necessary to call sql_result_free(), just if you want to free the existing result quickly, otherwise it will be freed

Re: [SR-Users] Memory Leak on DB Errors?

2011-10-04 Thread Klaus Darilion
Daniel, is it necessary to call "sql_result_free()" ad the end of the timer route? May it be related to this? regards Klaus On 04.10.2011 12:24, Daniel-Constantin Mierla wrote: Hello, sqlops is using pkg and tm shm, so they should not be directly related, but maybe in the way config file work

Re: [SR-Users] Memory Leak on DB Errors?

2011-10-04 Thread Klaus Darilion
Meanwhile the server was restarted and the DB problems were fixed. As it is a production server I can not reproduce anymore. Sorry Klaus On 04.10.2011 12:24, Daniel-Constantin Mierla wrote: Hello, sqlops is using pkg and tm shm, so they should not be directly related, but maybe in the way con

Re: [SR-Users] Memory Leak on DB Errors?

2011-10-04 Thread Daniel-Constantin Mierla
Hello, sqlops is using pkg and tm shm, so they should not be directly related, but maybe in the way config file works. Can you run it again with memlog lower than debug and see where the allocated (not-freed) chunks were done? It should appear soon, not waiting for out of mem message. If y

[SR-Users] Memory Leak on DB Errors?

2011-10-04 Thread Klaus Darilion
Hi! I recently had a problem with Kamailio 3.1.4 (provided Debian packages): I had some DB problems (missing tables). Thus, the timer module failed to insert the statistics (for siremis): ERROR: db_mysql [km_dbase.c:120]: driver error on query: Table 'kamailio.statistics_tmx' doesn't exist

Re: [SR-Users] Memory leak

2010-09-24 Thread Jeff Russell
Just a comment. As a 'rookie' SER user I am impressed with your knowledge and problem solving skills. Great work gentlemen! Jeff On 2010-09-23, at 2:01 PM, Santiago Soares wrote: > It worked! > It was the pcre_match that was consuming all the memory available. > Kamailio has been running for

Re: [SR-Users] Memory leak

2010-09-23 Thread Santiago Soares
It worked! It was the pcre_match that was consuming all the memory available. Kamailio has been running for more than 24 hours, and memory comsumption is not increasing. Thank you very much! Santiago Soares Fone: (41) 8488-0537 On Wed, Sep 22, 2010 at 12:21 PM, marius zbihlei wrote: > On 09/22/

Re: [SR-Users] Memory leak

2010-09-23 Thread Andrei Pelinescu-Onciul
On Sep 23, 2010 at 09:56, Daniel-Constantin Mierla wrote: > > > On 9/23/10 9:46 AM, Andrei Pelinescu-Onciul wrote: > >On Sep 22, 2010 at 22:25, Iñaki Baz Castillo wrote: > >>2010/9/22 marius zbihlei: > >>>this will be much better handled by a transformation > >>> > >>>if ( $(fn{s.len})> 62 ) {

Re: [SR-Users] Memory leak

2010-09-23 Thread Daniel-Constantin Mierla
On 9/23/10 9:46 AM, Andrei Pelinescu-Onciul wrote: On Sep 22, 2010 at 22:25, Iñaki Baz Castillo wrote: 2010/9/22 marius zbihlei: this will be much better handled by a transformation if ( $(fn{s.len})> 62 ) {...} Yes, using pcre_math is good when we need to perform a regular expression aga

Re: [SR-Users] Memory leak

2010-09-23 Thread Andrei Pelinescu-Onciul
On Sep 22, 2010 at 22:25, Iñaki Baz Castillo wrote: > 2010/9/22 marius zbihlei : > > this will be much better handled by a transformation > > > > if ( $(fn{s.len}) > 62 ) {...} > > Yes, using pcre_math is good when we need to perform a regular > expression against a PV (which is not possible usin

Re: [SR-Users] Memory leak

2010-09-22 Thread Iñaki Baz Castillo
2010/9/22 Daniel-Constantin Mierla : >> It *does* work. Not sure what I did in my previous tests but I didn't >> get it working, so you are right :) > > which versions have you tried this time? K 1.5.4. -- Iñaki Baz Castillo ___ SIP Express Router (

Re: [SR-Users] Memory leak

2010-09-22 Thread Daniel-Constantin Mierla
On 9/22/10 11:33 PM, Iñaki Baz Castillo wrote: 2010/9/22 Iñaki Baz Castillo: 2010/9/22 Daniel-Constantin Mierla: if(!$rU =~ $var(re)) { Yes, I tryed that (hope I'm not wrong) and it also didn't do the job. Perhaps it should work? I expect so, but I haven't tried with 3.x -- iirc, I added it

Re: [SR-Users] Memory leak

2010-09-22 Thread Iñaki Baz Castillo
2010/9/22 Iñaki Baz Castillo : > 2010/9/22 Daniel-Constantin Mierla : if(!$rU =~ $var(re)) { >>> >>> Yes, I tryed that (hope I'm not wrong) and it also didn't do the job. >>> Perhaps it should work? >> >> I expect so, but I haven't tried with 3.x -- iirc, I added it in openser >> some time ago

Re: [SR-Users] Memory leak

2010-09-22 Thread Iñaki Baz Castillo
2010/9/22 Daniel-Constantin Mierla : >>> if(!$rU =~ $var(re)) { >> >> Yes, I tryed that (hope I'm not wrong) and it also didn't do the job. >> Perhaps it should work? > > I expect so, but I haven't tried with 3.x -- iirc, I added it in openser > some time ago (or maybe I only wanted to :-) ?!?!) --

Re: [SR-Users] Memory leak

2010-09-22 Thread Daniel-Constantin Mierla
On 9/22/10 10:38 PM, Iñaki Baz Castillo wrote: 2010/9/22 Daniel-Constantin Mierla: Yes, using pcre_math is good when we need to perform a regular expression against a PV (which is not possible using "=~"). For example I use it to check if the RURI username matches a prefix extracted from a dat

Re: [SR-Users] Memory leak

2010-09-22 Thread Iñaki Baz Castillo
2010/9/22 Daniel-Constantin Mierla : >> Yes, using pcre_math is good when we need to perform a regular >> expression against a PV (which is not possible using "=~"). For >> example I use it to check if the RURI username matches a prefix >> extracted from a database: >> >>   if ! pcre_match("$rU", "

Re: [SR-Users] Memory leak

2010-09-22 Thread Daniel-Constantin Mierla
On 9/22/10 10:25 PM, Iñaki Baz Castillo wrote: 2010/9/22 marius zbihlei: this will be much better handled by a transformation if ( $(fn{s.len})> 62 ) {...} Yes, using pcre_math is good when we need to perform a regular expression against a PV (which is not possible using "=~"). For example

Re: [SR-Users] Memory leak

2010-09-22 Thread Iñaki Baz Castillo
2010/9/22 marius zbihlei : > this will be much better handled by a transformation > > if ( $(fn{s.len}) > 62 ) {...} Yes, using pcre_math is good when we need to perform a regular expression against a PV (which is not possible using "=~"). For example I use it to check if the RURI username matches

Re: [SR-Users] Memory leak

2010-09-22 Thread marius zbihlei
On 09/22/2010 06:21 PM, marius zbihlei wrote: On 09/22/2010 06:08 PM, Klaus Darilion wrote: Am 22.09.2010 15:31, schrieb Santiago Soares: Thank's for the answers. Based on your explanation, I think that the problem is an external library. The kamailio process is taking all the system

Re: [SR-Users] Memory leak

2010-09-22 Thread marius zbihlei
On 09/22/2010 06:08 PM, Klaus Darilion wrote: Am 22.09.2010 15:31, schrieb Santiago Soares: Thank's for the answers. Based on your explanation, I think that the problem is an external library. The kamailio process is taking all the system memory. When the system runs out of memory, it kills

Re: [SR-Users] Memory leak

2010-09-22 Thread Klaus Darilion
Am 22.09.2010 15:31, schrieb Santiago Soares: Thank's for the answers. Based on your explanation, I think that the problem is an external library. The kamailio process is taking all the system memory. When the system runs out of memory, it kills kamailio. But how can I find out what is the libr

Re: [SR-Users] Memory leak

2010-09-22 Thread Klaus Darilion
Am 20.09.2010 21:21, schrieb Santiago Soares: Hello, We use Kamailio as a stateless load balancer. It runs on a VM, with 512 MB RAM, and it seems to have some kind of memory leak. The kamailio processes consume all available memory, until Kamailio crashes and restart. What do you mean with "

Re: [SR-Users] Memory leak

2010-09-21 Thread marius zbihlei
On 09/21/2010 05:41 PM, Santiago Soares wrote: Thanks for the answers. Here are the config file and the memory status right now. I didn't change the memory pool. I don't know how to interpret the memory log. Can you help me? Hello Yes sure. But you still haven't answer my question. Is it priva

Re: [SR-Users] Memory leak

2010-09-21 Thread Daniel-Constantin Mierla
he lower offset is usually alloc'ed during module initialization so any big leak will happen at higher offsets (I don't know if this is the rule but this is what I observed). Have you tried increasing the memory pool? Cheers Marius

Re: [SR-Users] Memory leak

2010-09-21 Thread Santiago Soares
onfig ? >>> >>> Marius >>> >> >> Also, is it shared memory or private memory? If you have a dump of the >> memory distribution, can you spot anything out of the ordinary. As a tip >> look for functions in the ending part of the dump that rep

Re: [SR-Users] Memory leak

2010-09-21 Thread Daniel-Constantin Mierla
ers Marius From: sr-users-boun...@lists.sip-router.org [sr-users-boun...@lists.sip-router.org] On Behalf Of Santiago Soares [santiagosoa...@gmail.com] Sent: Monday, September 20, 2010 9:21 PM To: SR-Users; us...@lists.kamailio.org Subject: [SR-Users] Memory leak Hello, We us

Re: [SR-Users] Memory leak

2010-09-21 Thread marius zbihlei
rg Subject: [SR-Users] Memory leak Hello, We use Kamailio as a stateless load balancer. It runs on a VM, with 512 MB RAM, and it seems to have some kind of memory leak. The kamailio processes consume all available memory, until Kamailio crashes and restart. This occurs about once a day. Since it&#

Re: [SR-Users] Memory leak

2010-09-20 Thread Marius Zbihlei
: Monday, September 20, 2010 9:21 PM To: SR-Users; us...@lists.kamailio.org Subject: [SR-Users] Memory leak Hello, We use Kamailio as a stateless load balancer. It runs on a VM, with 512 MB RAM, and it seems to have some kind of memory leak. The kamailio processes consume all available memory, until

[SR-Users] Memory leak

2010-09-20 Thread Santiago Soares
Hello, We use Kamailio as a stateless load balancer. It runs on a VM, with 512 MB RAM, and it seems to have some kind of memory leak. The kamailio processes consume all available memory, until Kamailio crashes and restart. This occurs about once a day. Since it's stateless, and the restart is very