Varnish LINGER crash on Solaris (Ticket #649)

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


Hello,

I am testing Varnish (r4576 <http://varnish-cache.org/changeset/4576>) 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
http://letsgetdugg.com/2009/12/04/varnish-on-solaris/<http://letsgetdugg.com/2009/12/04/varnish-on-solaris/>
I have the same LINGER crash like in
#660<http://varnish-cache.org/ticket/660>that has the same root cause
in
#649 <http://varnish-cache.org/ticket/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:
*  http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6378870<http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6378870>
*
http://bugs.opensolaris.org/bugdatabase/view_bug.do;jsessionid=7141b1811572e415779f4a711a96?bug_id=6850464<http://bugs.opensolaris.org/bugdatabase/view_bug.do;jsessionid=7141b1811572e415779f4a711a96?bug_id=6850464>

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)
#else
#define TCP_Check(a) ((a) == 0 || errno == ECONNRESET || errno == ENOTCONN)
#endif

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

Thank you
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20100531/b5e49f47/attachment-0003.html>


More information about the varnish-dev mailing list