]> git.ipfire.org Git - thirdparty/squid.git/commit
Fixed Write.cc:41 "!ccb->active()" assertion.
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Tue, 15 Nov 2016 09:41:26 +0000 (11:41 +0200)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Tue, 15 Nov 2016 09:41:26 +0000 (11:41 +0200)
commit24e1fd72cb91ada091059b7409c19d89a5278d3d
tree3fa45ab157867b449dcd626d80ae14ad4959fbc2
parent8575d303057e2de0349b476e52be4db60a8afa72
Fixed Write.cc:41 "!ccb->active()" assertion.

The following sequence of events triggers this assertion:
  - The server sends an 1xx control message.
  - http.cc schedules ConnStateData::sendControlMsg call.
  - Before sendControlMsg is fired, http.cc detects an error (e.g., I/O
    error or timeout) and starts writing the reply to the user.
  - The ConnStateData::sendControlMsg is fired, starts writing 1xx, and
    hits the "no concurrent writes" assertion.

We could only reproduce this sequence in the lab after changing Squid
code to trigger a timeout at the right moment, but the sequence looks
plausible. Other event sequences might result in the same outcome.

To avoid concurrent writes, Squid now drops the control message if
Http::One::Server detects that a reply is already being written. Also,
ConnStateData delays reply writing until a pending control message write
has been completed.

This is a Measurement Factory project.
src/HttpControlMsg.cc
src/HttpControlMsg.h
src/client_side.cc
src/client_side.h
src/servers/Http1Server.cc