[Tarantool-patches] [PATCH] libev: unlimited select flag did not work on mac
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Thu Feb 13 03:14:10 MSK 2020
Thanks for the patch! Good catch, interesting case.
On 10/02/2020 19:45, Maria Khaydich wrote:
> Stress tests failed due to lack of fds for mac. The problem was in the
> libev library where DARWIN_UNLIMITED_SELECT flag was defined too late
> to do the trick.
Please, describe in more details. Too late why? Before what should it
be defined? I found this info in a link in the ticket, but I think it
needs to be in the commit message, and in the comment to
_DARWIN_UNLIMITED_SELECT
> Closes #3867, #4673
>
> ---
> Issues:
> https://github.com/tarantool/tarantool/issues/3867
> https://github.com/tarantool/tarantool/issues/4673 <https://github.com/tarantool/tarantool/issues/3867https://github.com/tarantool/tarantool/issues/4673Branch:https://github.com/tarantool/tarantool/compare/eljashm/gh-4673-replication-flaky-test>
> Branch:
> https://github.com/tarantool/tarantool/compare/eljashm/gh-4673-replication-flaky-test <https://github.com/tarantool/tarantool/issues/3867https://github.com/tarantool/tarantool/issues/4673Branch:https://github.com/tarantool/tarantool/compare/eljashm/gh-4673-replication-flaky-test>
>
> third_party/libev/ev.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
> diff --git a/third_party/libev/ev.c b/third_party/libev/ev.c
> index 6a2648591..b65a77e0e 100644
> --- a/third_party/libev/ev.c
> +++ b/third_party/libev/ev.c
> @@ -196,6 +196,14 @@
> # define ECB_NO_SMP 1
> #endif
>
> +/* OS X, in its infinite idiocy, actually HARDCODES
> + * a limit of 1024 into their select. Where people have brains,
> + * OS X engineers apparently have a vacuum. Or maybe they were
> + * ordered to have a vacuum, or they do anything for money.
> + * This might help. Or not.
> + */
> +#define _DARWIN_UNLIMITED_SELECT 1
> +
> #ifndef _WIN32
> # include <sys/time.h>
> # include <sys/wait.h>
> @@ -211,14 +219,6 @@
> # undef EV_AVOID_STDIO
> #endif
>
> -/* OS X, in its infinite idiocy, actually HARDCODES
> - * a limit of 1024 into their select. Where people have brains,
> - * OS X engineers apparently have a vacuum. Or maybe they were
> - * ordered to have a vacuum, or they do anything for money.
> - * This might help. Or not.
> - */
> -#define _DARWIN_UNLIMITED_SELECT 1
> -
> /* this block tries to deduce configuration from header-defined symbols and defaults */
>
> /* try to deduce the maximum number of signals on this platform */
> --
> 2.24.0
>
> --
> Maria Khaydich
More information about the Tarantool-patches
mailing list