diff --git a/src/ev_poll.c b/src/ev_poll.c index 3cc41dc68..b25d1dc32 100644 --- a/src/ev_poll.c +++ b/src/ev_poll.c @@ -264,6 +264,13 @@ static int _do_init(struct poller *p) int fd_evts_bytes; p->private = NULL; + + /* this old poller uses a process-wide FD list that cannot work with + * groups. + */ + if (global.nbtgroups > 1) + goto fail_srevt; + fd_evts_bytes = (global.maxsock + sizeof(**fd_evts) * 8 - 1) / (sizeof(**fd_evts) * 8) * sizeof(**fd_evts); if ((fd_evts[DIR_RD] = calloc(1, fd_evts_bytes)) == NULL) diff --git a/src/ev_select.c b/src/ev_select.c index b3e1b40e6..af14b2e9e 100644 --- a/src/ev_select.c +++ b/src/ev_select.c @@ -247,6 +247,12 @@ static int _do_init(struct poller *p) p->private = NULL; + /* this old poller uses a process-wide FD list that cannot work with + * groups. + */ + if (global.nbtgroups > 1) + goto fail_srevt; + if (global.maxsock > FD_SETSIZE) goto fail_srevt; diff --git a/src/haproxy.c b/src/haproxy.c index 513a967f2..3f03826a6 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -2533,7 +2533,8 @@ static void init(int argc, char **argv) if (!init_pollers()) { ha_alert("No polling mechanism available.\n" - " It is likely that haproxy was built with TARGET=generic and that FD_SETSIZE\n" + " This may happen when using thread-groups with old pollers (poll/select), or\n" + " it is possible that haproxy was built with TARGET=generic and that FD_SETSIZE\n" " is too low on this platform to support maxconn and the number of listeners\n" " and servers. You should rebuild haproxy specifying your system using TARGET=\n" " in order to support other polling systems (poll, epoll, kqueue) or reduce the\n"