<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jul 12, 2015 at 10:20 AM, Amos Jeffries <span dir="ltr"><<a href="mailto:squid3@treenet.co.nz" target="_blank">squid3@treenet.co.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 12/07/2015 7:03 p.m., Kinkie wrote:<br>
> I tried it. Unfortunately it fails for those cases of debugs() which do not<br>
> use xstrerror, e.g.<br>
><br>
> ../../src/esi/Element.h: In member function 'virtual bool<br>
> ESIElement::addElement(ESIElement::Pointer)':<br>
> ../../src/esi/Element.h:64:74: error: unused variable '_squid_errno'<br>
> [-Werror=unused-variable]<br>
>          debugs(86,5, "ESIElement::addElement: Failed for " << this);<br>
><br>
> :(<br>
> I believe putting the burden of saving state to the caller is way too<br>
> intrusive: a simple count places the number of xstrerror calls at about 260.<br>
> So we're back to square one, the -v2 patch. Do you see any other options?<br>
><br>
<br>
</span>No sorry. But I do know that we also have to deal with CONTENT cotaining<br>
nested functions etc. That means nested debugs() calls...<br></blockquote><div><br></div><div>Yes, but we do not really need to be reentrant: the problems you have identified are all in debugLogTime, which doesn't need to be reentrant (and right now it is not, as it uses a static buffer).<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
At debugs level 9 this is a big problem, particularly for things like<br>
debugs in SBuf/String/MemBuf/MemAllocator methods that get triggered by<br>
any object producing debug output for display.</blockquote><div><br></div><div>Yes.<br></div><div>At the same time, while the proposed patch may not be the final fix to the problem, I believe it helps a little bit in improving things. Especially since no alternate path seems viable.<br></div></div><br>-- <br><div class="gmail_signature">    Francesco</div>
</div></div>