[erlang-questions] Kernel poll patch

Yerl yerl@REDACTED
Sat Dec 9 16:12:41 CET 2006


Thanks Rickard, updated.
cheers
Younès


Rickard Green a écrit :
> If you use the kernel poll feature of Erlang/OTP R11B-2 on any
> OS other than SunOS we recommend you to apply the attached patch.
>
>    $ tar -zxf otp_src_R11B-2.tar.gz
>    $ patch -p0 < kernel-poll.patch
>    patching file otp_src_R11B-2/erts/emulator/sys/unix/erl_poll.c
>    $ # Build as usual...
>
> Release note:
>
>    OTP-6344  A bug in the kernel poll implementation could cause the
>              emulator to omit polling for events on file descriptors.
>              The bug was only present when using the kernel poll
>              implementation based on epoll or kqueue. This bug was
>              introduced in erts-5.5.2.
>
> BR,
> Rickard Green, Erlang/OTP
>
> ------------------------------------------------------------------------
>
> --- otp_src_R11B-2/erts/emulator/sys/unix/erl_poll.c	2006-11-06 14:57:46.000000000 +0100
> +++ otp_src_R11B-2_kernel-poll-patch/erts/emulator/sys/unix/erl_poll.c	2006-12-09 12:08:15.000000000 +0100
> @@ -1013,12 +1013,13 @@
>  	    if (!*update_fallback) {
>  		*update_fallback = 1;
>  		return 0;
>  	    }
>  #endif
> -	    res = update_fallback_pollset(ps, fd);
>  	    ASSERT(!(ps->fds_status[fd].flags & ERTS_POLL_FD_FLG_INFLBCK));
> +	    res = update_fallback_pollset(ps, fd);
> +	    ASSERT(ps->fds_status[fd].flags & ERTS_POLL_FD_FLG_INFLBCK);
>  	    break;
>  	}
>  	case EPOLL_CTL_DEL: {
>  	    /*
>  	     * Since we use a lazy update approach EPOLL_CTL_DEL will
> @@ -1076,10 +1077,14 @@
>  #endif
>  
>      if (!need_update(ps, fd))
>  	return 0;
>  
> +#if ERTS_POLL_USE_FALLBACK
> +    ps->fds_status[fd].flags &= ~ERTS_POLL_FD_FLG_RST;
> +#endif
> +
>  #if ERTS_POLL_USE_POLL	/* --- poll -------------------------------- */
>      if (!ps->fds_status[fd].events) {
>  	int pix = ps->fds_status[fd].pix;
>  	int last_pix;
>  	if (pix < 0) {
>
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>   




More information about the erlang-questions mailing list