[Varnish] #629: Fix the (Open)Solaris event port acceptor

Varnish varnish-bugs at projects.linpro.no
Fri Jan 22 20:52:59 CET 2010


#629: Fix the (Open)Solaris event port acceptor
----------------------+-----------------------------------------------------
 Reporter:  slink     |       Owner:  phk
     Type:  defect    |      Status:  new
 Priority:  normal    |   Milestone:     
Component:  varnishd  |     Version:  2.0
 Severity:  normal    |    Keywords:     
----------------------+-----------------------------------------------------
 Hi,

 I've implemented a couple of fixes for the event port acceptor and the
 results look promising - I couldn't reproduce hanging client connections
 with these.

 Bug fixes are:

  * Upon HTC_Rx(sp->htc) == 0, we need to wait for more (header) data, so
 we need to vca_add again (because with event ports, we need to
 reasssociate to get another event)

  * port_getn may even deliver events if (errno == EINTR) || (errno ==
 ETIME), so we need to check nevents even if the return value is < 0.
 Otherwise we'll see hanging client connections

 Cosmetic changes:

  * POLLERR is not an event, but just an revent
  * I don't think we need to register for POLLPRI events

 Others:

  * Increase port_getn timeout from 50ms to 100ms to match the poll
 acceptor/waiter
  * No need to call vca_del once we've received an event for the respective
 fd

 I'll attach the cache_acceptor_ports.c file as of 2.x

 Please note:

  * For older 2.x versions, you'll need to remove the TCP_linger call
  * For trunc, apply s:acceptor:waiter:

 Cheers, Nils

-- 
Ticket URL: <http://varnish.projects.linpro.no/ticket/629>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator


More information about the varnish-bugs mailing list