Hi,<br>
<br>
more than 3 millions calls have been processed and no problem (crash, increment in memory allocation...) has been noticed since the update, so this check works for us. <br>
<br>
Thanks a lot,<br>
regards<br><br><div class="gmail_quote">2011/3/4 Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello,<br>
<br>
just committed a safety check for this case. If anyone can give it some tests, then we can backport.<br>
<br>
I will analyze to see why it got in such case, but anyhow it is better and safer to detect bogus dereferences to dialogs and not crash.<br>
<br>
Thanks,<br><font color="#888888">
Daniel</font><div><div></div><div class="h5"><br>
<br>
On 3/3/11 11:34 AM, Timo Reimann wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="h5">
Argh:<br>
<br>
<br>
On 03.03.2011 11:11, Timo Reimann wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
What I can tell though is that the crash happens because too much dialog<br>
reference counter decrementing takes place. Although I have no clue why,<br>
</blockquote>
                                                        ^^^^^^^^^^^^^^^^^<br>
<br>
...the crash happens,<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I believe the implementation of unref_dlg_unsafe() (a macro) could be<br>
somewhat more robust by not unlinking and destroying a dialog when the<br>
counter drops below zero. That is, instead of running the following block<br>
<br>
if ((_dlg)-&gt;ref&lt;=0) { \<br>
         unlink_unsafe_dlg( _d_entry, _dlg);\<br>
         LM_DBG(&quot;ref&lt;=0 for dialog %p\n&quot;,_dlg);\<br>
         destroy_dlg(_dlg);\<br>
}\<br>
</blockquote>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
for _dlg-&gt;ref&lt;= 0, I see no reason to change the compare operator to ==.<br>
</blockquote>
I see no reason *not* to change compare operator to ==. That is, I want<br>
the block to execute iff the reference counter is found to be zero.<br>
<br>
<br>
--Timo<br>
<br></div></div><div class="im">
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">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>
</div></blockquote><div><div></div><div class="h5">
<br>
-- <br>
Daniel-Constantin Mierla<br>
<a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
<br>
</div></div></blockquote></div><br>