]> git.ipfire.org Git - thirdparty/squid.git/commit
Avoid "BUG #3329: Lost orphan ..." during accept problems (#780)
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Mon, 31 May 2021 17:32:48 +0000 (17:32 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 1 Jun 2021 01:09:10 +0000 (01:09 +0000)
commit4831b46cd050f069dcdd5145848ff16d1127ed44
tree12ee8c2b2a00c762262a61a1902cfe7fe21d8af6
parentcf1f23eea5cf4bc3053f6153ac0b96c415ad6033
Avoid "BUG #3329: Lost orphan ..." during accept problems (#780)

Comm::TcpAcceptor creates a Comm::Connection with an open FD. Lots of
things could go wrong while that connection object travels to its
intended owner (e.g., Ftp::Server). A Connection object abandoned during
that travel will auto-close, triggering level-4 "BUG #3329" messages.

TODO: The manual enter/leaveOrphanage() tracking is unreliable. We need
to design and implement a true connection ownership concept that does
not require such tracking. These changes highlight handover spots.

Also made a few TcpAcceptor members protected to reduce the chance of
missing a Connection recipient (i.e. TcpAcceptor subscriber). Most of
these members should be (at least) protected for other reasons as well.
src/clients/FtpClient.cc
src/comm/TcpAcceptor.cc
src/comm/TcpAcceptor.h
src/servers/FtpServer.cc
src/servers/Server.cc