]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: session: fix FD leak when transport layer logging is enabled
authorWilly Tarreau <w@1wt.eu>
Sat, 8 Dec 2012 07:44:02 +0000 (08:44 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 8 Dec 2012 07:48:04 +0000 (08:48 +0100)
commit0ede5a3318a28e35e342227900a70334da604e46
tree73539d815b30fce2b478a833ab3b0e9f2c6df50d
parent26d7cfce328c33e208437b30b4ca3fc2db359cd2
BUG/MEDIUM: session: fix FD leak when transport layer logging is enabled

Commit 2b199c9a attempted to fix all places where the transport layer
is improperly closed, but it missed one place in session_free(). If
SSL ciphers are logged, the close() is delayed post-log and performed
in session_free(). However, conn_xprt_close() only closes the transport
layer but not the file descriptor, resulting in a slow FD leak which is
hardly noticeable until the process cannot accept any new connection.

A workaround consisted in disabling %sslv/%sslc in log-format.

So use conn_full_close() instead of conn_xprt_close() to fix this there
too.

A similar pending issue existed in the close during outgoing connection
failure, though on this side, the transport layer is never tracked at the
moment.
src/session.c