]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 5309: frequent "lowestOffset () <= target_offset" assertion (#1561)
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 31 Oct 2023 23:01:16 +0000 (23:01 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 31 Oct 2023 23:01:27 +0000 (23:01 +0000)
commit3a5c8b44ecc1fcbe03c4ff04bbeecad28eafd634
tree59b1a0e87e0fef38bb2366b512fdec29d98ff126
parent890424ba89cab3699934420f1b4494aa72310ead
Bug 5309: frequent "lowestOffset () <= target_offset" assertion (#1561)

Recent commit 122a6e3 left store_client::readOffset() unchanged but
should have adjusted it to match changed copyInto.offset semantics:
Starting with that commit, storeClientCopy() callers supply HTTP
response _body_ offset rather than HTTP response offset.

This bug decreased readOffset() values (by the size of stored HTTP
response headers), effectively telling Store that we are not yet done
with some of the MemObject/mem_hdr bytes. This bug could cause slightly
higher transaction memory usage because the same response bytes are
trimmed later. This bug should not have caused any assertions.

However, the old mem_hdr::freeDataUpto() code that uses readOffset() is
also broken -- the assertion in that method only "works" when
readOffset() returns values matching a memory node boundary. The smaller
values returned by buggy readOffset() triggered buggy assertions.

This minimal fix removes the recent store_client::readOffset() bug
described above. We will address old mem_hdr problems separately.
src/MemObject.cc
src/StoreClient.h
src/store_client.cc