]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Potential bug #3015 fix: assertion failed: comm.cc:143: "ccb->active()"
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 17 Aug 2010 16:24:18 +0000 (10:24 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Tue, 17 Aug 2010 16:24:18 +0000 (10:24 -0600)
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

src/comm.cc

index 1542f27342386a7a046f210e2d3a31fb3b1fd436..e7064a23d6b280875aee2d39ed3e05044c64d12f 100644 (file)
@@ -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;