<div dir="ltr">Hi,<div><br></div><div>Here is what I&#39;ve done:</div><div><br></div><div>1) Ensured OpenSIPS doesn&#39;t receive any calls.</div><div>2) Waited for all calls to terminate.</div><div>3) Checked that the <span style="font-family:monospace;font-size:10.4000005722046px">inuse</span><tt style="font-size:10.4000005722046px">_tra<tt>nsaction</tt></tt> is 0.</div><div>4) Stopped OpenSIPS.</div><div><br></div><div>I confirm there are still a lot of AVPs in memory.</div><div><br></div><div>Who is supposed to free these AVPs? Is it a memory leak?</div><div><br></div><div>Thanks,</div><div>Mickael</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 15, 2015 at 12:48 PM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <tt>Hi Michael,<br>
      <br>
      <tt>You can do &quot;opensipsctl fifo get<tt>_statistics tm:&quot; and you
          have the &quot;inuse<tt>_tra<tt>nsaction&quot; statistic :<br>
              <tt>   
                <a href="http://www.opensips.org/html/docs/modules/1.11.x/tm.html#id296307" target="_blank">http://www.opensips.org/html/docs/modules/1.11.x/tm.html#id296307</a><br>
                <br>
                <tt>Regards,</tt><br>
                <br>
              </tt></tt></tt></tt></tt></tt><span class="">
    <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
    </span><div><div class="h5"><div>On 14.05.2015 09:45, Mickael Marrache
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      
      
      <div>
        <p class="MsoNormal"><span style="color:#1f497d" lang="EN-US">I&#39;m
            not sure there were no transactions in memory at shutdown.<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="color:#1f497d" lang="EN-US">How
            can I check this? I didn&#39;t find an MI command for that.<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
        <div>
          <div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
            <p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">
                Bogdan-Andrei Iancu [<a href="mailto:bogdan@opensips.org" target="_blank">mailto:bogdan@opensips.org</a>] <br>
                <b>Sent:</b> Wednesday, May 13, 2015 6:44 PM<br>
                <b>To:</b> OpenSIPS users mailling list;
                <a href="mailto:mickaelmarrache@gmail.com" target="_blank">mickaelmarrache@gmail.com</a><br>
                <b>Subject:</b> Re: [OpenSIPS-Users] Possible memory
                leak related to AVPs<u></u><u></u></span></p>
          </div>
        </div>
        <p class="MsoNormal"><u></u> <u></u></p>
        <p class="MsoNormal"><tt><span style="font-size:10.0pt">Hi
              Mickael,</span></tt><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><br>
            <br>
            <tt>What means &quot;a lot&quot;  :) ? I&#39;m asking as if you have 100
              transactions in memory (when doing shutdown) and you use
              ~10 AVPs per INVITE in script -&gt; you have 1000 AVPs in
              mem.</tt><br>
            <br>
            <tt>When doing the shutdown, are any transaction in memory ?
              (with no active transactions in mem, there are no AVPs in
              mem).</tt><br>
            <br>
            <tt>Regards,</tt><br>
            <br>
          </span><u></u><u></u></p>
        <pre>Bogdan-Andrei Iancu<u></u><u></u></pre>
        <pre>OpenSIPS Founder and Developer<u></u><u></u></pre>
        <pre><a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a><u></u><u></u></pre>
        <div>
          <p class="MsoNormal">On 13.05.2015 17:53, Mickael Marrache
            wrote:<u></u><u></u></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal">Hi,<u></u><u></u></p>
          <p class="MsoNormal"> <u></u><u></u></p>
          <p class="MsoNormal"><span lang="EN-US">We have a memory leak
              and are trying to find the cause.</span><u></u><u></u></p>
          <p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
          <p class="MsoNormal"><span lang="EN-US">We compiled the call
              with memory debugging and at shutdown, we see a lot of
              allocated AVPs that are not released.</span><u></u><u></u></p>
          <p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
          <p class="MsoNormal"><span lang="EN-US">opensips[27560]:    
              277067. N  address=0x2aae957a0330 frag=0x2aae957a0300
              size=24 used=1</span><u></u><u></u></p>
          <p class="MsoNormal"><span lang="EN-US">opensips[27560]:            
              alloc&#39;d from usr_avp.c: new_avp(119)</span><u></u><u></u></p>
          <p class="MsoNormal"><span lang="EN-US">opensips[27560]:        
              start check=f0f0f0f0f0f0f0f0, end check= c0c0c0c0c0c0c0c0,
              abcdefedabcdefed</span><u></u><u></u></p>
          <p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
          <p class="MsoNormal"><span lang="EN-US">Is it possible to have
              a memory leak related to AVPs? IIRC OpenSIPS handles it
              internally.</span><u></u><u></u></p>
          <p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
          <p class="MsoNormal"><span lang="EN-US">Thanks,</span><u></u><u></u></p>
          <p class="MsoNormal"><span lang="EN-US">Mickael</span><u></u><u></u></p>
          <p class="MsoNormal"><span><br>
              <br>
              <br>
              <u></u><u></u></span></p>
          <pre>_______________________________________________<u></u><u></u></pre>
          <pre>Users mailing list<u></u><u></u></pre>
          <pre><a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><u></u><u></u></pre>
          <pre><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><u></u><u></u></pre>
        </blockquote>
        <p class="MsoNormal"><span><u></u> <u></u></span></p>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div>