[squid-dev] [PATCH] Fixed Write.cc:41 "!ccb->active()" assertion

Christos Tsantilas christos at chtsanti.net
Mon Nov 14 18:03:23 UTC 2016


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.


There is strong possibility that the bug fixing this patch is a variant 
of the bug4174:
   http://bugs.squid-cache.org/show_bug.cgi?id=4174
However we are getting different backtrace.


This is a Measurement Factory project.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SQUID-238-assertion_failed_Write_cc_Not_ccb_active-t3.patch
Type: text/x-patch
Size: 11100 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20161114/b97e860e/attachment.bin>


More information about the squid-dev mailing list