Can I get you to open a ticket with this text in it, so we have a record of why we are doing this ?
Poul-Henning In message <[email protected]>, =?IS O-8859-1?Q?Jorge_D=EDaz?= writes: >--===============8061307876579297173== >Content-Type: multipart/alternative; boundary=0016e659f6d29162560487e1a818 > >--0016e659f6d29162560487e1a818 >Content-Type: text/plain; charset=ISO-8859-1 > >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 >* > >--0016e659f6d29162560487e1a818 >Content-Type: text/html; charset=ISO-8859-1 >Content-Transfer-Encoding: quoted-printable > >Hello,<br><br><p> >I am testing Varnish (<a class=3D"changeset" href=3D"http://varnish-cache.o= >rg/changeset/4576" title=3D"Tell FlexeLint=20 >that we ignore returnvalues on purpose.">r4576</a>) in Solaris 10 5.10=20 >Generic_120011-14 sun4v sparc SUNW,Sun-Fire-T2000. <br> >We are planning to use a cache like Varnish or Squid and I have followed > the instructions in <a class=3D"ext-link" href=3D"http://letsgetdugg.com/2= >009/12/04/varnish-on-solaris/"><span class=3D"icon">=A0</span>http://letsge= >tdugg.com/2009/12/04/varnish-on-solaris/</a> ></p> > >I have the same LINGER crash like in <a class=3D"closed ticket" href=3D"htt= >p://varnish-cache.org/ticket/660" title=3D"defect: Varnish LINGER > crash in tcp.c (closed: duplicate)">#660</a> that has the same root=20 >cause in <a class=3D"new ticket" href=3D"http://varnish-cache.org/ticket/64= >9" title=3D"defect: Varnish LINGER > crash on Solaris (new)">#649</a> <br><br>I have trying to fix the bug and = >I have found <strong>the problem is=20 >that solaris setsockopt returns sometimes EINVAL</strong> when it is no=20 >invalid parameters, problem found in Java JVM in Solaris:<br> >* <a class=3D"ext-link" href=3D"http://bugs.sun.com/bugdatabase/view_bug.do= >?bug_id=3D6378870"><span class=3D"icon">=A0</span>http://bugs.sun.com/bugda= >tabase/view_bug.do?bug_id=3D6378870</a> > <br> >* <a class=3D"ext-link" href=3D"http://bugs.opensolaris.org/bugdatabase/vie= >w_bug.do;jsessionid=3D7141b1811572e415779f4a711a96?bug_id=3D6850464"><span = >class=3D"icon">=A0</span>http://bugs.opensolaris.org/bugdatabase/view_bug.d= >o;jsessionid=3D7141b1811572e415779f4a711a96?bug_id=3D6850464</a> ><br><br>I think the solution is to changed the definition of "TCP_Chec= >k" in <b>libvarnish.h</b> only for Solaris<strong><br><br><span style= >=3D"font-family: courier new,monospace;">/* In Solaris OS, errno =3D=3D EIN= >VAL is OK because setsockopt(3SOCKET) call returns EINVAL when the connecti= >on is reset. */</span><br style=3D"font-family: courier new,monospace;"> ><span style=3D"font-family: courier new,monospace;">#if defined (__SVR4) &a= >mp;& defined (__sun) </span><br style=3D"font-family: courier new,monos= >pace;"><span style=3D"font-family: courier new,monospace;">#define TCP_Chec= >k(a) ((a) =3D=3D 0 || errno =3D=3D ECONNRESET || errno =3D=3D ENOTCONN || e= >rrno =3D=3D EINVAL)</span><br style=3D"font-family: courier new,monospace;"= >> ><span style=3D"font-family: courier new,monospace;">#else</span><br style= >=3D"font-family: courier new,monospace;"><span style=3D"font-family: courie= >r new,monospace;">#define TCP_Check(a) ((a) =3D=3D 0 || errno =3D=3D ECONNR= >ESET || errno =3D=3D ENOTCONN)</span><br style=3D"font-family: courier new,= >monospace;"> ><span style=3D"font-family: courier new,monospace;">#endif</span><br style= >=3D"font-family: courier new,monospace;"><br><span style=3D"font-weight: no= >rmal;">Do you think it is ok to commit it to trunk ?<br><br>Thank you<br></= >span></strong> > >--0016e659f6d29162560487e1a818-- > > >--===============8061307876579297173== >Content-Type: text/plain; charset="us-ascii" >MIME-Version: 1.0 >Content-Transfer-Encoding: 7bit >Content-Disposition: inline > >_______________________________________________ >varnish-dev mailing list >[email protected] >http://lists.varnish-cache.org/mailman/listinfo/varnish-dev >--===============8061307876579297173==-- > -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 [email protected] | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. _______________________________________________ varnish-dev mailing list [email protected] http://lists.varnish-cache.org/mailman/listinfo/varnish-dev
