<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 28, 2017 at 1:04 PM, Joseph Smith <span dir="ltr"><<a href="mailto:warlock1999@hotmail.com" target="_blank">warlock1999@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div id="gmail-m_-3767273352724995455divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p>Hello,</p>
<p>I've recently setup a small load test against an instance of Asterisks.  I've tested on asterisk 13.5 and 14.6 with the same results.</p></div></div></blockquote><div></div><div>I think you mean 13.15.0 as the excessive ref count trap is not in 13.5.0. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div id="gmail-m_-3767273352724995455divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p>I am using PJSIP.  My dial plan is,</p>
<blockquote style="margin:0px 0px 0px 40px;border-width:medium;border-style:none;border-color:currentcolor;padding:0px">
<p></p>
<div>[test]</div>
<p></p>
<p></p>
<div>exten => 1001,1,Answer</div>
<p></p>
<p></p>
<div>exten => 1001,n,MusicOnHold(15)</div>
<p></p>
<p></p>
<div>exten => 1001,n,Hangup</div>
<p></p>
</blockquote>
<p></p>
<div></div>
<div><br>
</div>
I am using SIPP to test.  I can share XML if desired but it simply waits on the line while music plays for 8 seconds.  I used sippycup to generate it with the following steps in the yaml file.
<p></p>
<p></p>
<blockquote style="margin:0px 0px 0px 40px;border-width:medium;border-style:none;border-color:currentcolor;padding:0px">
<p><br>
</p>
<p></p>
<div>steps:</div>
<p></p>
<p></p>
<div>  - invite</div>
<p></p>
<p></p>
<div>  - wait_for_answer</div>
<p></p>
<p></p>
<div>  - ack_answer</div>
<p></p>
<p></p>
<div>  - sleep 8</div>
<p></p>
<p></p>
<div>  - send_bye</div>
<p></p>
</blockquote>
<p></p>
<p></p>
<div></div>
<div></div>
<div></div>
<div><br>
</div>
<div>At around 500 calls per second I begin to see the following ERRORs,</div>
<p></p>
<blockquote style="margin:0px 0px 0px 40px;border-width:medium;border-style:none;border-color:currentcolor;padding:0px">
<p></p>
<div><br>
</div>
<p></p>
<p></p>
<div>
<div>[Aug 28 17:46:14] ERROR[26150][C-00005594]: frame.c:343 ast_frdup: Excessive refcount 100000 reached on ao2 object 0x26bffc0</div>
</div>
<p></p>
<p></p>
<div>
<div>[Aug 28 17:46:14] ERROR[26150][C-00005594]: frame.c:343 ast_frdup: FRACK!, Failed assertion Excessive refcount 100000 reached on ao2 object 0x26bffc0 (0)</div>
</div>
<p></p>
<p></p>
<div>
<div>Got 19 backtrace records</div>
</div>
<p></p>
<p></p>
<div>
<div>#0: [0x45d229] /usr/sbin/asterisk(__ao2_ref+<wbr>0x1a9) [0x45d229]</div>
</div>
<p></p>
<p></p>
<div>
<div>#1: [0x526ce6] /usr/sbin/asterisk(ast_frdup+<wbr>0x116) [0x526ce6]</div>
</div>
<p></p>
<p></p>
<div>
<div>#2: [0x5fa616] /usr/sbin/asterisk(ast_<wbr>translate+0x306) [0x5fa616]</div>
</div>
<p></p>
<p></p>
<div>
<div>#3: [0x4bf16b] /usr/sbin/asterisk(ast_write+<wbr>0x104b) [0x4bf16b]</div>
</div>
<p></p>
<p></p>
<div>
<div>#4: [0x7efeb578230b] /usr/lib/asterisk/modules/res_<wbr>musiconhold.so(+0x430b) [0x7efeb578230b]</div>
</div>
<p></p>
<p></p>
<div>
<div>#5: [0x4b5b52] /usr/sbin/asterisk() [0x4b5b52]</div>
</div>
<p></p>
<p></p>
<div>
<div>#6: [0x4c259c] /usr/sbin/asterisk() [0x4c259c]</div>
</div>
<p></p>
<p></p>
<div>
<div>#7: [0x4c4a45] /usr/sbin/asterisk() [0x4c4a45]</div>
</div>
<p></p>
<p></p>
<div>
<div>#8: [0x7efeb578478d] /usr/lib/asterisk/modules/res_<wbr>musiconhold.so(+0x678d) [0x7efeb578478d]</div>
</div>
<p></p>
<p></p>
<div>
<div>#9: [0x58ec79] /usr/sbin/asterisk(pbx_exec+<wbr>0xb9) [0x58ec79]</div>
</div>
<p></p>
<p></p>
<div>
<div>#10: [0x582e84] /usr/sbin/asterisk() [0x582e84]</div>
</div>
<p></p>
<p></p>
<div>
<div>#11: [0x584e7c] /usr/sbin/asterisk() [0x584e7c]</div>
</div>
<p></p>
<p></p>
<div>
<div>#12: [0x5863fb] /usr/sbin/asterisk() [0x5863fb]</div>
</div>
<p></p>
<p></p>
<div>
<div>#13: [0x60002a] /usr/sbin/asterisk() [0x60002a]</div></div></blockquote></div></div></blockquote><div><br></div><div>This inline backtrace would be more useful if you had BETTER_BACKTRACES enabled.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div id="gmail-m_-3767273352724995455divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr"><blockquote style="margin:0px 0px 0px 40px;border-width:medium;border-style:none;border-color:currentcolor;padding:0px"><div>
</div>
<div><br>
</div>
<p></p>
</blockquote>
I've also seen similar behavior when using playback instead of MusicOnHold.  CPU usage gets around 50%.  Can anyone enlighten me on the meaning and cause of the error?  Is there some steps (config etc) that can be taken to alleviate the issue?
</div></div></blockquote><div><br></div><div>This particular FRACK is meant to help find ao2 object reference leaks.  It acts as an early warning for excessive references to any particular ao2 object used in the code.  The FRACK itself is benign.  Based upon the inline backtrace the ao2 object is likely to be a codec format.<br><br>* What codecs are you using in this setup?<br><br></div><div>* With 500 calls/sec and the calls lasting 8 seconds that comes to 4000 active channels.  Hitting the FRACK would result in an average of 25 references to the format per channel.  This is a simplistic calculation as there are going to be some references that have nothing to do with a call.  The number of base references would depend upon which codec is involved.<br><br></div><div>* There is no user configurable option to change the excessive ref count trigger value.  However, you could change the EXCESSIVE_REF_COUNT define value in the main/astobj2.c file and recompile.<br></div><div><br></div><div>Richard<br></div></div><br></div></div>