[Dovecot] RE: epoll error when running as proxy

Jakob Hirsch jh at plonk.de
Fri Feb 10 03:39:54 EET 2006


Bill Boebel wrote:

>> - If I switch to poll instead of epoll, everything works fine.
>> Any ideas?

epoll is broken since 1alpha4.

By chance, I looked into the code tonight and found that
io_loop_handle_add calls epoll_ctl sometimes with MOD on fds that were
just DELeted before. This is caused by iolist_del, which always returns
TRUE. I don't fully understand the code (and it looks a little
overcomplicated to me, considering the epoll code I wrote myself), but
the attached mini patch makes epoll work again in my setup. Don't know
if this is a complete fix, though.

Timo, could you look into this and confirm/negate, please?
-------------- next part --------------
--- dovecot/src/lib/ioloop-epoll.c
+++ dovecot.epoll/src/lib/ioloop-epoll.c
@@ -139,7 +139,7 @@
 			if (list->ios[i] == io)
 				list->ios[i] = NULL;
 			else
-				last = TRUE;
+				last = FALSE;
 		}
 	}
 	return last;


More information about the dovecot mailing list