From: Christos Tsantilas Date: Tue, 27 Jan 2009 21:53:47 +0000 (+0200) Subject: Bug 2505: assertion failed: comm.cc:350: "!fd_table[fd].closing()" (comment #12,bug... X-Git-Tag: SQUID_3_2_0_1~1235 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ed2c738b062b0db98b16032f7dad5ae65810c84c;p=thirdparty%2Fsquid.git Bug 2505: assertion failed: comm.cc:350: "!fd_table[fd].closing()" (comment #12,bug 2505) This patch fixes the bug reported in comment #12 of bug 2505. In the DeferredReadManager::kickARead method it is possible that the socket in which refers a DeferredRead object has been closed, but the DeferredReadManager is not informed yet because the related comm_close handler has not been executed yet. This patch checks the socket state and if it is closing just ignore the object. --- diff --git a/src/comm.cc b/src/comm.cc index 1c965de003..23147723a9 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -2564,6 +2564,9 @@ DeferredReadManager::kickARead(DeferredRead const &aRead) { if (aRead.cancelled) return; + if(aRead.theRead.fd>=0 && fd_table[aRead.theRead.fd].closing()) + return; + debugs(5, 3, "Kicking deferred read on FD " << aRead.theRead.fd); aRead.theReader(aRead.theContext, aRead.theRead);