[Varnish] #644: Deadlock in 2.0.x under high load.

Varnish varnish-bugs at projects.linpro.no
Mon Mar 1 17:41:01 CET 2010


#644: Deadlock in 2.0.x under high load.
----------------------+-----------------------------------------------------
 Reporter:  kmcfate   |        Owner:  kristian
     Type:  defect    |       Status:  reopened
 Priority:  normal    |    Milestone:          
Component:  varnishd  |      Version:  2.0     
 Severity:  normal    |   Resolution:          
 Keywords:  deadlock  |  
----------------------+-----------------------------------------------------
Comment (by kmcfate):

 I will verify.. I am also testing the following:


 {{{
 --- cache_acceptor_epoll.c      2009-11-06 02:43:32.000000000 -0600
 +++ cache_acceptor_epoll.c.new  2010-03-01 10:39:30.000000000 -0600
 @@ -109,21 +109,22 @@
         AN(ep->data.ptr);
         if (ep->data.ptr == vca_pipes) {
                 if (ep->events & EPOLLIN || ep->events & EPOLLPRI) {
 -                       j = 0;
 -                       i = read(vca_pipes[0], ss, sizeof ss);
 -                       if (i == -1 && errno == EAGAIN)
 -                               return;
 -                       while (i >= sizeof ss[0]) {
 -                               CHECK_OBJ_NOTNULL(ss[j], SESS_MAGIC);
 -                               assert(ss[j]->fd >= 0);
 -                               AZ(ss[j]->obj);
 -                               VTAILQ_INSERT_TAIL(&sesshead, ss[j],
 list);
 -                               vca_cond_modadd(ss[j]->fd, ss[j]);
 -                               j++;
 -                               i -= sizeof ss[0];
 -                       }
 -                       assert(i == 0);
 -               }
 +            while (i = read(vca_pipes[0], ss, sizeof ss)){
 +                j = 0;
 +                if (i == -1 && errno == EAGAIN)
 +                    return;
 +                while (i >= sizeof ss[0]) {
 +                    CHECK_OBJ_NOTNULL(ss[j], SESS_MAGIC);
 +                    assert(ss[j]->fd >= 0);
 +                    AZ(ss[j]->obj);
 +                    VTAILQ_INSERT_TAIL(&sesshead, ss[j], list);
 +                    vca_cond_modadd(ss[j]->fd, ss[j]);
 +                    j++;
 +                    i -= sizeof ss[0];
 +                }
 +                assert(i == 0);
 +            }
 +        }
         } else {
                 CAST_OBJ_NOTNULL(sp, ep->data.ptr, SESS_MAGIC);
                 if (ep->events & EPOLLIN || ep->events & EPOLLPRI) {
 }}}

-- 
Ticket URL: <http://varnish-cache.org/ticket/644#comment:10>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator


More information about the varnish-bugs mailing list