haproxy/include
Willy Tarreau d6f087ea1c [BUG] fix truncated responses with sepoll
Due to the way Linux delivers EPOLLIN and EPOLLHUP, a closed connection
received after some server data sometimes results in truncated responses
if the client disconnects before server starts to respond. The reason
is that the EPOLLHUP flag is processed as an indication of end of
transfer while some data may remain in the system's socket buffers.

This problem could only be triggered with sepoll, although nothing should
prevent it from happening with normal epoll. In fact, the work factoring
performed by sepoll increases the risk that this bug appears.

The fix consists in making FD_POLL_HUP and FD_POLL_ERR sticky and that
they are only checked if FD_POLL_IN is not set, meaning that we have
read all pending data.

That way, the problem is definitely fixed and sepoll still remains about
17% faster than epoll since it can take into account all information
returned by the kernel.
2008-01-18 17:20:13 +01:00
..
common [MINOR] add transparent proxy support for balabit's Tproxy v4 2008-01-13 17:37:16 +01:00
import [MAJOR] migrated task, tree64 and session to pool2 2007-05-13 19:43:47 +02:00
proto [BUG] fix truncated responses with sepoll 2008-01-18 17:20:13 +01:00
types [BUG] fix truncated responses with sepoll 2008-01-18 17:20:13 +01:00