<div dir="ltr"><div><div><div><div><div><div><div><div>Hello,<br><br></div>About your questions:<br><br><b><i>1. Changes that fixes varnishtest problems (timeouts and path problems):</i></b><br><br></div>I have detected that the execution of GCC for compilation of VCL is slower than Linux and causes some problems (at least in my old laptop)<br>
<br></div>Last summer I changed to a new PC with SSD disk and more RAM but I have not tried to execute varnishtest removing this timeout changes. <br><br>My idea is to try removing this changes values for Varnish 4.0.0 (I was able to compile it but I have not check the varnishtest errors yet)<br>
<br><i><b>2. Changes that fixes some problems with varnishd and tcp_nodelay problems:</b></i><br><br></div>It is a bug of cygwin, I have to write to cygwin developers, but I prefered to make first a provisional fix for this issue:<br>
</div><div><br></div><div>  1.The getsockopt<span class=""> function at cygwin is documented  returns a INT value<br><br></span>  2.But the cygwin getsockopt<span class=""> function internally calls to windows getsockopt, that has his own rules...<br>
</span><ul><li><span class=""><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms738544%28v=vs.85%29.aspx">http://msdn.microsoft.com/en-us/library/windows/desktop/ms738544%28v=vs.85%29.aspx</a></span></li>
</ul><span class="">  3. The problem is that windows returns a "boolean" size value. This return value type causes trobles at following assert of varnish:</span><br><ul><li>assert<span class="">(</span>l <span class="">==</span><span class=""></span> <span class="">sizeof</span> tcp_nodelay<span class="">);</span></li>
</ul><span class="">Because <b>l</b> is INT size (</span><b></b><span class="">sizeof</span> tcp_nodelay before getsockopt call) and <span class=""></span> <b><span class="">sizeof</span> tcp_nodelay</b> is BOOL size<br><br>
</div>It seems that nobody had troubles before with this "tcp_nodelay", because if you have a zeroed int variable and call to <b>getsockopt</b>, the windows function returning BOOL only set first bits of int and everything works fine, unless you do a comparion of sizeof of variables.<br>
<br></div>(I have also tried to leave the int variable and removing "assert" and it also works fine)<br><br></div>My idea is to send the bug this following week to Cygwin Developers Mailist. They should wrap windows response to avoid this issue. <br>
<br>It will be fine to remove my workaround for Varnish 4.0.0, but it depends on Cygwin release times.<br><br></div>Regards,<br>Jorge Díaz<br><div><div><div><br><span class=""> </span><div><div><div><span class=""></span><br>
<div><div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2014-04-22 11:37 GMT+02:00 Poul-Henning Kamp <span dir="ltr"><<a href="mailto:phk@phk.freebsd.dk" target="_blank">phk@phk.freebsd.dk</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="">In message <<a href="mailto:5355AD6A.5090108@gmail.com">5355AD6A.5090108@gmail.com</a>>, jdzstz writes:<br>

<br>
>  - Changes that fixes varnishtest problems (timeouts and path<br>
>problems): <a href="https://www.varnish-cache.org/trac/attachment/wiki/VarnishOnCygwinWindows/varnish-3.0.5-cygwin_varnishtest.patch" target="_blank">https://www.varnish-cache.org/trac/attachment/wiki/VarnishOnCygwinWindows/varnish-3.0.5-cygwin_varnishtest.patch</a><br>

<br>
</div>This patch kind of hint that Varnish@Cygwin must suck pretty<br>
badly performance wise ?  Is that because of the hardware you<br>
run it on, or is it chronic ?<br>
<div class=""><br>
>  - Changes that fixes some problems with varnishd and tcp_nodelay problems:<br>
><a href="https://www.varnish-cache.org/trac/attachment/wiki/VarnishOnCygwinWindows/varnish-3.0.5-cygwin_varnishd.patch" target="_blank">https://www.varnish-cache.org/trac/attachment/wiki/VarnishOnCygwinWindows/varnish-3.0.5-cygwin_varnishd.patch</a><br>

<br>
</div>Where on Earth does the idea that TCP_NODELAY takes a bool argument<br>
come from ?  Are you sure about this ?<br>
<br>
Don't let the canonical decriptions mention about "The boolean option<br>
TCP_NODELAY [...]" confuse you:  It still takes an int argument any<br>
place I have ever seen it.<br>
<br>
If the Cygwin crew made it take a bool, they're portability-mororns.<br>
<span class=""><font color="#888888"><br>
--<br>
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20<br>
phk@FreeBSD.ORG         | TCP/IP since RFC 956<br>
FreeBSD committer       | BSD since 4.3-tahoe<br>
Never attribute to malice what can adequately be explained by incompetence.<br>
</font></span></blockquote></div><br></div></div></div></div></div></div></div></div></div></div></div></div></div>