r4552 - trunk/varnish-cache/bin/varnishd

kristian at projects.linpro.no kristian at projects.linpro.no
Thu Feb 11 12:58:02 CET 2010


Author: kristian
Date: 2010-02-11 12:58:01 +0100 (Thu, 11 Feb 2010)
New Revision: 4552

Modified:
   trunk/varnish-cache/bin/varnishd/cache_waiter_epoll.c
Log:
Don't use edge-triggered mode in epoll

Fixes #644


Modified: trunk/varnish-cache/bin/varnishd/cache_waiter_epoll.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_waiter_epoll.c	2010-02-10 15:23:34 UTC (rev 4551)
+++ trunk/varnish-cache/bin/varnishd/cache_waiter_epoll.c	2010-02-11 11:58:01 UTC (rev 4552)
@@ -68,10 +68,14 @@
 vca_modadd(int fd, void *data, short arm)
 {
 
+	/* XXX: EPOLLET (edge triggered) can cause rather Bad Things to
+	 * XXX: happen: If NEEV+1 threads get stuck in write(), all threads
+	 * XXX: will hang. See #644.
+	 */
 	assert(fd >= 0);
 	if (data == vca_pipes || data == dotimer_pipe) {
 		struct epoll_event ev = {
-		    EPOLLIN | EPOLLPRI | EPOLLET, { data }
+		    EPOLLIN | EPOLLPRI , { data }
 		};
 		AZ(epoll_ctl(epfd, arm, fd, &ev));
 	} else {



More information about the varnish-commit mailing list