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

Varnish varnish-bugs at projects.linpro.no
Thu Feb 11 12:57:37 CET 2010


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

 Ok, EPOLLET is not ideal here.

 Epoll with ET will wake up even if you do not empty the buffer, but it
 will only wake up if something changes.

 The problem seems to be that the pipe buffer fills up, which means that
 write() on the worker threads turns into a blocking call. If more than
 NEEV clients end up in this situation, varnish will deadlock: It will wake
 up 100 threads, but all of those threads will in turn block when they are
 done, which WONT wake up epoll because nothing actually changed on the fd.

 Having discussed this a bit and run some tests, I don't see any real
 reason why we want to use edge triggered mode at all: there are no
 situations where we don't want to read the data waiting on the fd right
 away. However, letting epoll wake up potential other threads while we re-
 enter threads into the thread pool sounds like a good idea.

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


More information about the varnish-bugs mailing list