<div dir="ltr">Hi,<div><br></div><div>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. </div><div><br></div><div>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.</div>
<div><br></div><div>Secondly, how are you using top to tell that you have a leak? Kamailio's memory is internally managed.</div><div><br></div><div>Cheers</div><div>Jason</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Jan 13, 2014 at 1:29 PM, 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 class="MsoNormal"><span style="color:#1f497d">Re-sending without the attachment.<u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Shankar [mailto:<a href="mailto:shankar.rk@plintron.com" target="_blank">shankar.rk@plintron.com</a>] <br>
<b>Sent:</b> Monday, January 13, 2014 4:57 PM<br><b>To:</b> '<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>'<br><b>Subject:</b> Regd. t_suspend() and t_continue()<u></u><u></u></span></p>
</div></div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Hi,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">We are trying out the t_suspend() and t_continue() in our test setup. We are facing memory leak ( both shm and pkg as per top command results). <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Please find below the scenario,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p style="margin-left:.75in"><u></u><span>1)<span style="font:7.0pt "Times New Roman"">      </span></span><u></u>Do a t_newtran()<u></u><u></u></p>
<p style="margin-left:.75in"><u></u><span>2)<span style="font:7.0pt "Times New Roman"">      </span></span><u></u>Allocate pkg memory for hashid and label.<u></u><u></u></p><p style="margin-left:.75in"><u></u><span>3)<span style="font:7.0pt "Times New Roman"">      </span></span><u></u>Call t_suspend()<u></u><u></u></p>
<p style="margin-left:.75in"><u></u><span>4)<span style="font:7.0pt "Times New Roman"">      </span></span><u></u>Do t_continue() when async result is available<u></u><u></u></p><p style="margin-left:.75in"><u></u><span>5)<span style="font:7.0pt "Times New Roman"">      </span></span><u></u>De-allocate pkg memory reserved for hashid and label<u></u><u></u></p>
<p style="margin-left:.75in"><u></u><span>6)<span style="font:7.0pt "Times New Roman"">      </span></span><u></u>Do a t_relay() which forwards the sip message to another sip node.<u></u><u></u></p><p class="MsoNormal">
<u></u> <u></u></p><p class="MsoNormal">In the  step (6) above, we see t_newtran() allocates one more time shared memory for the same transaction. <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">
We tried t_release() after step (4) to release the transaction as t_relay() anyways allocates new shared memory. Nothing helped. <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Please let me know what are the logs you would require to debug the same. I am attaching syslog for this run.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Regards,<u></u><u></u></p><p class="MsoNormal">Shankar<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p></div></div>

<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></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