[OpenSIPS-Devel] Memory leak in DR module, I think

Liviu Chircu liviu at opensips.org
Fri Dec 16 10:06:13 EST 2016


To apply the patch, simply place yourself in the 2.1 source dir, and run 
this command:

git apply <(base64 -d <<EOF
Y29tbWl0IDFjZDU5NGNjZmU4N2YwMjNkNzlmNmEwMTQ1MTcyZDMwOTZkNGI1ODYKQXV0aG9yOiBW
bGFkIFBhaXUgPHZsYWRwYWl1QG9wZW5zaXBzLm9yZz4KRGF0ZTogICBXZWQgTWFyIDE4IDIwOjAw
OjEyIDIwMTUgKzAyMDAKCiAgICBGaXggUEtHIG1lbSBsZWFrCiAgICAKICAgIChjaGVycnkgcGlj
a2VkIGZyb20gY29tbWl0IGYyNzY2OTFkMDVjNTY3NDhjNjI4ZmM5YWVmOWUyNzAwYWZmOGE1MzYp
CgpkaWZmIC0tZ2l0IGEvbW9kdWxlcy9kcm91dGluZy9kcm91dGluZy5jIGIvbW9kdWxlcy9kcm91
dGluZy9kcm91dGluZy5jCmluZGV4IDMxZGQ5NTAuLjZjM2U1N2IgMTAwNjQ0Ci0tLSBhL21vZHVs
ZXMvZHJvdXRpbmcvZHJvdXRpbmcuYworKysgYi9tb2R1bGVzL2Ryb3V0aW5nL2Ryb3V0aW5nLmMK
QEAgLTMxNTEsNiArMzE1MSw3IEBAIG5vX2d3czoKIAogCS8qIHdlIGFyZSBkb25lIHJlYWRpbmcg
LT4gdW5yZWYgdGhlIGRhdGEgKi8KIAlsb2NrX3N0b3BfcmVhZCggY3VycmVudF9wYXJ0aXRpb24t
PnJlZl9sb2NrICk7CisJaWYgKHJ1cmlfYnVmKSBwa2dfZnJlZShydXJpX2J1Zik7CiAKIAlyZXR1
cm4gMTsKIGVycm9yOgpAQCAtMzI4Nyw2ICszMjg4LDcgQEAgc3RhdGljIGludCByb3V0ZTJfZ3co
c3RydWN0IHNpcF9tc2cqIG1zZywgY2hhciogY2hfcGFydF9ndywgY2hhciogZ3dfYXR0X3B2KQog
CQl9CiAJfQogCisJaWYgKHJ1cmlfYnVmKSBwa2dfZnJlZShydXJpX2J1Zik7CiAJcmV0dXJuIDE7
CiAKIGVycm9yX2ZyZWU6Cg==
EOF
)

Cheers,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 16.12.2016 16:49, John Quick wrote:
> Glad I could be of help.
> Please could you email me the diff on that file, routing.c, so I can fix it on my proxy servers. Thanks.
>
> John Quick
>
>
> -----Original Message-----
> From: Devel [mailto:devel-bounces at lists.opensips.org] On Behalf Of Liviu Chircu
> Sent: 16 December 2016 14:42
> To: devel at lists.opensips.org
> Subject: Re: [OpenSIPS-Devel] Memory leak in DR module, I think
>
> That's right on the spot, John! It seems this issue had been caught a long time ago, but, unfortunately, the fix did not make its way into 2.1 until now, as I just backported it.
>
> Thank you for all the help!
>
> Best regards,
>
> Liviu Chircu
> OpenSIPS Developer
> http://www.opensips-solutions.com
>
> On 16.12.2016 16:11, John Quick wrote:
>> For attention of Liviu Chircu,
>>
>> Thanks for your help with diagnosing memory leaks. I think I have now
>> found the culprit. The smoking gun!
>>
>> I kept increasing the syslog rate limiting value until it reached
>> 40000 burst. This was still not enough, but I can see the one that is
>> frequent and it fits with the symptoms too.
>> Here is a small sample from the end of the dump:
>>
>> 2016-12-16 13:59:30      13335. N  address=0x7f4be90020d8
>> frag=0x7f4be90020a8 size=64 used=1
>> 2016-12-16 13:59:30              alloc'd from drouting.c:
>> route2_carrier(3046)
>> 2016-12-16 13:59:30          start check=f0f0f0f0f0f0f0f0, end check=
>> c0c0c0c0c0c0c0c0, abcdefedabcdefed
>> 2016-12-16 13:59:30      13336. N  address=0x7f4be9002178
>> frag=0x7f4be9002148 size=48 used=1
>> 2016-12-16 13:59:30              alloc'd from drouting.c:
>> route2_carrier(3046)
>> 2016-12-16 13:59:30          start check=f0f0f0f0f0f0f0f0, end check=
>> c0c0c0c0c0c0c0c0, abcdefedabcdefed
>> 2016-12-16 13:59:30      13337. N  address=0x7f4be9002208
>> frag=0x7f4be90021d8 size=40 used=1
>> 2016-12-16 13:59:30              alloc'd from drouting.c:
>> route2_carrier(3046)
>> 2016-12-16 13:59:30          start check=f0f0f0f0f0f0f0f0, end check=
>> c0c0c0c0c0c0c0c0, abcdefedabcdefed
>>
>> I use the DR module to select a route for calls through this proxy.
>> The memory leak is fastest when there are lots of calls during the
>> day, then it is slow at night.
>> OpenSIPS Version 2.1.4
>>
>> John Quick
>> Smartvox Limited
>> Web: www.smartvox.co.uk
>>
>>
>>
>> _______________________________________________
>> Devel mailing list
>> Devel at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>
>
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel




More information about the Devel mailing list