Varnish LINGER crash on Solaris (Ticket #649)

Jorge Díaz jdzstz at
Mon May 31 12:52:52 CEST 2010


I am testing Varnish (r4576 <>) in
Solaris 10 5.10 Generic_120011-14 sun4v sparc SUNW,Sun-Fire-T2000.
We are planning to use a cache like Varnish or Squid and I have followed the
instructions in<>
I have the same LINGER crash like in
#660<>that has the same root cause
#649 <>

I have trying to fix the bug and I have found *the problem is that solaris
setsockopt returns sometimes EINVAL* when it is no invalid parameters,
problem found in Java JVM in Solaris:

I think the solution is to changed the definition of "TCP_Check" in *
libvarnish.h* only for Solaris*

/* In Solaris OS, errno == EINVAL is OK because setsockopt(3SOCKET) call
returns EINVAL when the connection is reset. */
#if defined (__SVR4) && defined (__sun)
#define TCP_Check(a) ((a) == 0 || errno == ECONNRESET || errno == ENOTCONN
|| errno == EINVAL)
#define TCP_Check(a) ((a) == 0 || errno == ECONNRESET || errno == ENOTCONN)

Do you think it is ok to commit it to trunk ?

Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the varnish-dev mailing list