From: Alex Rousskov Date: Tue, 17 Aug 2010 16:24:18 +0000 (-0600) Subject: Potential bug #3015 fix: assertion failed: comm.cc:143: "ccb->active()" X-Git-Tag: take1~372 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=52f6ea9e15b30030c9ad896d931d5b6ebe29779e;p=thirdparty%2Fsquid.git Potential bug #3015 fix: assertion failed: comm.cc:143: "ccb->active()" Fixed "ccb->active()" assertion related to the automatic write timeout. We need to manually cancel writer's interest in select(2) before calling back so that select() does not try to call the write handler when there is no active callback anymore. Normally, select() cancels writer's interest when calling the write handler, but in this case the call back is triggered not from select() but from checkTimeouts(). From: 3p1-rock r9597 --- diff --git a/src/comm.cc b/src/comm.cc index 1542f27342..e7064a23d6 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -2155,6 +2155,8 @@ checkTimeouts(void) if (writeTimedOut(fd)) { // We have an active write callback and we are timed out + debugs(5, 5, "checkTimeouts: FD " << fd << " auto write timeout"); + commSetSelect(fd, COMM_SELECT_WRITE, NULL, NULL, 0); commio_finish_callback(fd, COMMIO_FD_WRITECB(fd), COMM_ERROR, ETIMEDOUT); } else if (AlreadyTimedOut(F)) continue;