<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">We have recently upgraded to OpenSIPs 2.3.3 and after deploying to our production environment we have found a significant memory leak. The leak is being reported by OpenSIPS’ statistics only; the used memory
of the machine itself is not increasing.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I believe I have been able to reproduce the leak with locally testing with a relatively small number of transactions. These stats are from opensipsctl get_statistics command for the shmem group. You can see
the used memory is increasing linearly with every set of transactions:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div style="mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;padding:0in 0in 1.0pt 0in">
<p class="MsoNormal" style="border:none;padding:0in"><span style="font-size:11.0pt">Load Total Size Used Size Real Used Size Max Used Size Free Size Fragments<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt">Cold 134217728 2692232 2738472 2738480 131479256 521<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">4K Transactions 134217728 2849928 3334264 21373232 130883464 4529<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">8K Transactions 134217728 3026600 3609144 21676512 130608584 8537<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">12K Transactions 134217728 3208504 3884720 21944384 130333008 12537<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">16K Transactions 134217728 3392480 4160832 22144904 130056896 16537<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">This is from our SBC/LB instance, which does not use dialogs or topology_hiding. It is only transactionally aware.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I need assistance to gather further information to help debug this issue. Can you please advise what would be required?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I have looked over the guide [1], but I cannot use the make menuconfig option to set compile flags. Our build system is completely automated and I cannot pause it to take manual action prior to compile. Will
the process described on that page for OpenSIPS 1.7 still work in 2.3.3? Can I manually edit the Makefile.defs as described? Once I have this enabled, what logs do you need?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Is there anything else that is required? I’m continuing to run tests to see if I can isolate a specific module that is causing the leak.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">[1] - <a href="http://www.opensips.org/Documentation/TroubleShooting-OutOfMem">
http://www.opensips.org/Documentation/TroubleShooting-OutOfMem</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:black">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:black">Ben Newlin</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>