Welcome! Log In Create A New Profile

Advanced

Client abort detection w/ upstream broken on anything but kqueue ()?

Marcello Barnaba
November 02, 2010 05:18PM
Hello,

I'm investigating why client aborts are successfully detected
by nginx when using kqueue () on BSD systems and not when using
poll () on BSD & Linux or epoll () on Linux systems.

I've done debug sessions and I nailed down the problem to the
ngx_http_upstream_check_broken_connection function, line 917 of
http/ngx_http_upstream.c of release 0.8.53.

From my tests on a Darwin 10.4.0 using poll () and on a Linux
2.6.32 using epoll () a client that closes its socket makes the
recv () on line 994 return 1, with errno set to EWOULDBLOCK on
Darwin/poll () and to EAGAIN on Linux/epoll ().

I've tried to change the condition at line 1016 from n > 0 to
(n > 0 && err != NGX_EAGAIN && err != NGX_EWOULDBLOCK) but I'm
sure it doesn't make much sense.

Is this a known issue? From where should I start to solve it?

Thank you,

~Marcello
--
~ marcello.barnaba@gmail.com
~ http://www.linkedin.com/in/marcellobarnaba
~ http://sindro.me/





_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Client abort detection w/ upstream broken on anything but kqueue ()?

Marcello Barnaba November 02, 2010 05:18PM

Re: Client abort detection w/ upstream broken on anything but kqueue ()?

Maxim Dounin November 02, 2010 08:14PM

Re: Client abort detection w/ upstream broken on anything but kqueue ()?

Marcello Barnaba November 03, 2010 07:24AM

Re: Client abort detection w/ upstream broken on anything but kqueue ()?

Maxim Dounin November 03, 2010 02:38PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 237
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready