El Tue, 6 Nov 2012 12:09:31 +0100
Jon Bonilla (Manwe) <ma...@aholab.ehu.es> escribió:

> As example one uf the external udp receivers uses less than 1MB while one of
> the internal ones uses almost 6MB. I'm attaching the mem dump of one of those
> internal udp receiver processes via 
> "ngcp-sercmd lb cfg.set_now_int core mem_dump_pkg 25437" command. I see
> several tens of thousands of lines like these ones: 
> 
> N  address=0x7fd1207383c0 frag=0x7fd120738390 size=56 used=1
> alloc'd from <core>: parser/parse_param.c: parse_params(539)
> start check=f0f0f0f0, end check= c0c0c0c0, abcdefed
> 
> 

This mail was waiting moderator request yesterday. Meanwhile Richard Fuchs
tried to debug this issue and looks like he found a mem leak problem. I'm now
testing a patched version in the same server and let's see if that was the case.

I'm attaching the patch I'm testing at the moment if someone is curious about
it.


cheers,

Jon

Index: modules_k/siputils/checks.c
===================================================================
--- modules_k/siputils/checks.c
+++ modules_k/siputils/checks.c
@@ -168,7 +168,7 @@
 	str *param, *value, t;
 
 	param_hooks_t hooks;
-	param_t* params;
+	param_t* params, *pit;
 
 	param = (str*)_param;
 	value = (str*)_value;
@@ -185,25 +185,23 @@
 	        return -1;
 	}
 
-	while (params) {
-		if ((params->name.len == param->len) &&
-		    (strncmp(params->name.s, param->s, param->len) == 0)) {
+	for (pit = params; pit; pit = pit->next) {
+		if ((pit->name.len == param->len) &&
+		    (strncmp(pit->name.s, param->s, param->len) == 0)) {
 			if (value) {
-				if ((value->len == params->body.len) &&
-				    strncmp(value->s, params->body.s, value->len) == 0) {
+				if ((value->len == pit->body.len) &&
+				    strncmp(value->s, pit->body.s, value->len) == 0) {
 					goto ok;
 				} else {
 					goto nok;
 				}
 			} else {
-				if (params->body.len > 0) {
+				if (pit->body.len > 0) {
 					goto nok;
 				} else {
 					goto ok;
 				}
 			}
-		} else {
-			params = params->next;
 		}
 	}
 	
_______________________________________________
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-users

Reply via email to