<div dir="ltr">Hi Shankar,<div><br></div><div>What version of Kamailio are you running? Kamailio -V</div><div><br></div><div>Cheers</div><div>Jason</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 15, 2014 at 6:58 AM, Shankar <span dir="ltr"><<a href="mailto:shankar.rk@plintron.com" target="_blank">shankar.rk@plintron.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p>Hi Jason,<u></u><u></u></p><p><u></u> <u></u></p><p>Please find below my response inline,<u></u><u></u></p>
<div class="im"><p><u></u> <u></u></p><p><u></u> <u></u></p><p>I have some questions for you as we have used suspend/continue quite a lot in the IMS code and don't have any leaks.<u></u><u></u></p><p><u></u> <u></u></p>
<p>Firstly, why are you using pkg_mem for your hash_id and label? Remember that you will be in 2 different processes in the suspend and continue portions of the code... so pkg_mem will not work - you should use shm_mem instead.<u></u><u></u></p>
<p><u></u> <u></u></p></div><p><span style="background:yellow">[Shankar] We use pkg_mem because we are invoking t_continue from the same process ( using thread ).</span><u></u><u></u></p><div class="im"><p><u></u> <u></u></p>
<p>Secondly, how are you using top to tell that you have a leak? Kamailio's memory is internally managed.<u></u><u></u></p><p><u></u> <u></u></p></div><p><span style="background:yellow">[Shankar] After running for say 20minutes, we get out of shared memory error. Also in top output we observed incremental increase in the shared usage of shared memory for the process.</span><u></u><u></u></p>
<div class="im"><p><u></u> <u></u></p><p>Cheers<u></u><u></u></p><p>Jason<u></u><u></u></p><p><u></u> <u></u></p><p><u></u> <u></u></p><p>On Mon, Jan 13, 2014 at 1:29 PM, Shankar <<a href="mailto:shankar.rk@plintron.com" target="_blank">shankar.rk@plintron.com</a>> wrote:<u></u><u></u></p>
<p><u></u> <u></u></p><p>> Re-sending without the attachment.<u></u><u></u></p><p>><u></u> <u></u></p><p>><u></u> <u></u></p><p>><u></u> <u></u></p></div><p>> *From:* Shankar [<a href="mailto:shankar.rk@plintron.com" target="_blank">mailto:shankar.rk@plintron.com</a>]<u></u><u></u></p>
<p>> *Sent:* Monday, January 13, 2014 4:57 PM<u></u><u></u></p><p>> *To:* '<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>'<u></u><u></u></p><p>> *Subject:* Regd. t_suspend() and t_continue()<u></u><u></u></p>
<div><div class="h5"><p>><u></u> <u></u></p><p>><u></u> <u></u></p><p>><u></u> <u></u></p><p>> Hi,<u></u><u></u></p><p>><u></u> <u></u></p><p>><u></u> <u></u></p><p>><u></u> <u></u></p><p>> We are trying out the t_suspend() and t_continue() in our test setup. <u></u><u></u></p>
<p>> We are facing memory leak ( both shm and pkg as per top command results).<u></u><u></u></p><p>><u></u> <u></u></p><p>><u></u> <u></u></p><p>><u></u> <u></u></p><p>> Please find below the scenario,<u></u><u></u></p>
<p>><u></u> <u></u></p><p>><u></u> <u></u></p><p>><u></u> <u></u></p><p>> 1)      Do a t_newtran()<u></u><u></u></p><p>><u></u> <u></u></p><p>> 2)      Allocate pkg memory for hashid and label.<u></u><u></u></p>
<p>><u></u> <u></u></p><p>> 3)      Call t_suspend()<u></u><u></u></p><p>><u></u> <u></u></p><p>> 4)      Do t_continue() when async result is available<u></u><u></u></p><p>><u></u> <u></u></p><p>> 5)      De-allocate pkg memory reserved for hashid and label<u></u><u></u></p>
<p>><u></u> <u></u></p><p>> 6)      Do a t_relay() which forwards the sip message to another sip node.<u></u><u></u></p><p>><u></u> <u></u></p><p>><u></u> <u></u></p><p>><u></u> <u></u></p><p>> In the  step (6) above, we see t_newtran() allocates one more time <u></u><u></u></p>
<p>> shared memory for the same transaction.<u></u><u></u></p><p>><u></u> <u></u></p><p>><u></u> <u></u></p><p>><u></u> <u></u></p><p>> We tried t_release() after step (4) to release the transaction as<u></u><u></u></p>
<p>> t_relay() anyways allocates new shared memory. Nothing helped.<u></u><u></u></p><p>><u></u> <u></u></p><p>><u></u> <u></u></p><p>><u></u> <u></u></p><p>> Please let me know what are the logs you would require to debug the same.<u></u><u></u></p>
<p>> I am attaching syslog for this run.<u></u><u></u></p><p>><u></u> <u></u></p><p>><u></u> <u></u></p><p>><u></u> <u></u></p><p>> Regards,<u></u><u></u></p><p>><u></u> <u></u></p><p>> Shankar<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p></div></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div><table border="0" cellspacing="0" cellpadding="0" width="600" style="width:450pt"><tbody><tr><td valign="top" style="padding:0cm"><p></p></td>
</tr></tbody></table><table width="320px" border="0" cellpadding="0" cellspacing="0" style="font-family:monospace"><tbody><tr><td style="font-family:Arial,sans-serif;font-size:16px;color:rgb(117,179,67);line-height:18px;padding-left:15px;padding-top:10px">
<strong>Jason Penton</strong></td></tr><tr><td style="font-family:Arial,sans-serif;font-size:16px;color:rgb(117,179,67);line-height:18px;padding-left:15px;padding-top:10px"><strong>Senior Manager: Applications and Services</strong></td>
</tr><tr><td style="font-family:Arial,sans-serif;font-size:16px;color:rgb(134,145,154);line-height:18px;padding-left:15px;padding-top:10px"><strong>Smile Communications Pty (Ltd)</strong></td></tr><tr><td><table cellpadding="0" cellspacing="0" width="100%">
<tbody><tr><td width="27%" style="font-family:Arial,sans-serif;font-size:16px;color:rgb(134,145,154);line-height:18px;padding-left:15px;padding-top:10px"><strong>Mobile:</strong></td><td width="73%" style="font-family:Arial,sans-serif;font-size:16px;color:rgb(134,145,154);line-height:18px;padding-left:10px;padding-top:10px">
+27 (0) 83 283 7000</td></tr><tr><td style="font-family:Arial,sans-serif;font-size:16px;color:rgb(134,145,154);line-height:18px;padding-left:15px;padding-top:10px"><strong>Skype:</strong></td><td style="font-family:Arial,sans-serif;font-size:16px;color:rgb(134,145,154);line-height:18px;padding-left:10px;padding-top:10px">
jason.barry.penton</td></tr></tbody></table></td></tr><tr><td style="font-family:Arial,sans-serif;font-size:16px;color:rgb(117,179,67);line-height:18px;padding-left:15px;padding-top:10px"><a href="mailto:name.surname@smilecoms.com" style="font-family:Arial;color:rgb(117,179,67);text-decoration:none" target="_blank">jason.penton@smilecoms.com</a></td>
</tr><tr><td style="font-family:Arial,sans-serif;font-size:16px;color:rgb(117,179,67);line-height:18px;padding-left:15px;padding-top:10px"><a href="http://www.smilecoms.com/" style="font-family:Arial;color:rgb(117,179,67)" target="_blank">www.smilecoms.com</a><br>
<img src="http://196.33.227.129/~smlcoms/sigs/pty/images/smile_signature_07_09.jpg" width="420" height="144"><br></td></tr></tbody></table></div><br></div>
</div>

<pre>This email is subject to the disclaimer of Smile Communications at http://www.smilecoms.com/disclaimer