[Varnish] #271: Assert error in vca_kqueue_main(), cache_acceptor_kqueue.c line 139

Varnish varnish-bugs at projects.linpro.no
Sun Jul 6 19:40:31 CEST 2008


#271: Assert error in vca_kqueue_main(), cache_acceptor_kqueue.c line 139
------------------------+---------------------------------------------------
 Reporter:  bonetruck2  |       Owner:  phk  
     Type:  defect      |      Status:  new  
 Priority:  normal      |   Milestone:       
Component:  varnishd    |     Version:  1.1.2
 Severity:  normal      |    Keywords:       
------------------------+---------------------------------------------------
 This line:

 AZ(kevent(kq, ke, j, NULL, 0, NULL));

 asserts that kevent should return 0.  However, on OpenBSD -current that is
 not the case.  Both OpenBSD and FreeBSD kqueue man pages say ~

   kevent() returns the number of events placed in the eventlist, up to the
      value given by nevents.  If an error occurs while processing an
 element
      of the changelist and there is enough room in the eventlist, then the
      event will be placed in the eventlist with EV_ERROR set in flags and
 the
      system error in data.  Otherwise, -1 will be returned, and errno will
 be
      set to indicate the error condition.  If the time limit expires, then
      kevent() returns 0.

 When I changed the assert to test against 2, I was able to get past it and
 run into a setsockopt error later on.  Another ticket forthcoming.  ;-)

 So it appears to me that asserting kevent returns 0 really only covers one
 case, that being time limit expiration.  Perhaps dropping the assert and
 instead testing for -1 and the EV_ERROR flag may be more correct.

 BTW, I lost my password for my "bonetruck" account here and so created
 "bonetruck2".

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


More information about the varnish-bugs mailing list