Re: Comm::TcpAcceptor::doAccept fd limit handling is broken

2014-07-18 Thread Rainer Weikusat
Rainer Weikusat rweiku...@mobileactivedefense.com writes: [...] It is possible to hit the 'fd limit' bug (with a single client) by running squid with a tight file descriptor limit (eg, 64) and trying hard enough. In order to make for easier debugging, I changed the TcpAcceptor/ AcceptLimiter

Re: [PATCH] Comm::TcpAcceptor::doAccept fd limit handling is broken

2014-07-17 Thread Alex Rousskov
On 07/16/2014 06:46 PM, Amos Jeffries wrote: On 17/07/2014 11:10 a.m., Alex Rousskov wrote: On 07/16/2014 02:38 PM, Rainer Weikusat wrote: Alex Rousskov rouss...@measurement-factory.com writes: On 07/16/2014 11:11 AM, Rainer Weikusat wrote: This is broken because it re-enables readable

Comm::TcpAcceptor::doAccept fd limit handling is broken

2014-07-16 Thread Rainer Weikusat
NB: This occurred in the real world on some 'customer machine' using 3.3.12. Since the code is unchanged in 3.HEAD, I assume it is affected, too. The method mentioned in the subject is void Comm::TcpAcceptor::doAccept(int fd, void *data) { try { debugs(5, 2, HERE New connection on

Re: Comm::TcpAcceptor::doAccept fd limit handling is broken

2014-07-16 Thread Alex Rousskov
On 07/16/2014 11:11 AM, Rainer Weikusat wrote: void Comm::TcpAcceptor::doAccept(int fd, void *data) { try { debugs(5, 2, HERE New connection on FD fd); Must(isOpen(fd)); TcpAcceptor *afd = static_castTcpAcceptor*(data); if (!okToAccept()) {

Re: Comm::TcpAcceptor::doAccept fd limit handling is broken

2014-07-16 Thread Rainer Weikusat
Alex Rousskov rouss...@measurement-factory.com writes: On 07/16/2014 11:11 AM, Rainer Weikusat wrote: void Comm::TcpAcceptor::doAccept(int fd, void *data) { try { debugs(5, 2, HERE New connection on FD fd); Must(isOpen(fd)); TcpAcceptor *afd =

Re: [PATCH] Comm::TcpAcceptor::doAccept fd limit handling is broken

2014-07-16 Thread Alex Rousskov
On 07/16/2014 02:38 PM, Rainer Weikusat wrote: Alex Rousskov rouss...@measurement-factory.com writes: On 07/16/2014 11:11 AM, Rainer Weikusat wrote: This is broken because it re-enables readable notifications even if no connection was accepted. In other words, it re-enables a check for new

Re: [PATCH] Comm::TcpAcceptor::doAccept fd limit handling is broken

2014-07-16 Thread Amos Jeffries
On 17/07/2014 11:10 a.m., Alex Rousskov wrote: On 07/16/2014 02:38 PM, Rainer Weikusat wrote: Alex Rousskov rouss...@measurement-factory.com writes: On 07/16/2014 11:11 AM, Rainer Weikusat wrote: This is broken because it re-enables readable notifications even if no connection was accepted.