Updated varnish cygwin patches to 3.0.5 varnish version (32 and 64 bits)

jdzstz - gmail dot com jdzstz at gmail.com
Fri Apr 25 20:04:10 CEST 2014


About your questions:

*1. Changes that fixes varnishtest problems (timeouts and path problems):*

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)

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.

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)

*2. Changes that fixes some problems with varnishd and tcp_nodelay

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:

  1.The getsockopt function at cygwin is documented  returns a INT value

  2.But the cygwin getsockopt function internally calls to windows
getsockopt, that has his own rules...


  3. The problem is that windows returns a "boolean" size value. This
return value type causes trobles at following assert of varnish:

   - assert(l == sizeof tcp_nodelay);

Because *l* is INT size (sizeof tcp_nodelay before getsockopt call) and
*sizeof tcp_nodelay* is BOOL size

It seems that nobody had troubles before with this "tcp_nodelay", because
if you have a zeroed int variable and call to *getsockopt*, the windows
function returning BOOL only set first bits of int and everything works
fine, unless you do a comparion of sizeof of variables.

(I have also tried to leave the int variable and removing "assert" and it
also works fine)

My idea is to send the bug this following week to Cygwin Developers
Mailist. They should wrap windows response to avoid this issue.

It will be fine to remove my workaround for Varnish 4.0.0, but it depends
on Cygwin release times.

Jorge Díaz

2014-04-22 11:37 GMT+02:00 Poul-Henning Kamp <phk at phk.freebsd.dk>:

> In message <5355AD6A.5090108 at gmail.com>, jdzstz writes:
> >  - Changes that fixes varnishtest problems (timeouts and path
> >problems):
> https://www.varnish-cache.org/trac/attachment/wiki/VarnishOnCygwinWindows/varnish-3.0.5-cygwin_varnishtest.patch
> This patch kind of hint that Varnish at Cygwin must suck pretty
> badly performance wise ?  Is that because of the hardware you
> run it on, or is it chronic ?
> >  - Changes that fixes some problems with varnishd and tcp_nodelay
> problems:
> >
> https://www.varnish-cache.org/trac/attachment/wiki/VarnishOnCygwinWindows/varnish-3.0.5-cygwin_varnishd.patch
> Where on Earth does the idea that TCP_NODELAY takes a bool argument
> come from ?  Are you sure about this ?
> Don't let the canonical decriptions mention about "The boolean option
> TCP_NODELAY [...]" confuse you:  It still takes an int argument any
> place I have ever seen it.
> If the Cygwin crew made it take a bool, they're portability-mororns.
> --
> Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
> phk at FreeBSD.ORG         | TCP/IP since RFC 956
> FreeBSD committer       | BSD since 4.3-tahoe
> Never attribute to malice what can adequately be explained by incompetence.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20140425/2d3911f6/attachment.html>

More information about the varnish-dev mailing list