]> git.ipfire.org Git - thirdparty/squid.git/commit
Fix MemObject.cc:123: "!updatedReply_" assertion (#1666)
authorAlex Rousskov <rousskov@measurement-factory.com>
Sat, 10 Feb 2024 20:03:14 +0000 (20:03 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sun, 11 Feb 2024 18:00:32 +0000 (18:00 +0000)
commit39b5a589110901365963432ef23d9022df107e63
tree510c2183bf261e9a2b52b6e7f6cbe0ff7d045590
parent541ecc09140f804b6cc8c384b410822de1539ea4
Fix MemObject.cc:123: "!updatedReply_" assertion (#1666)

    MemStore.cc(506) copyFromShm: entry 1284 copied ...
    FATAL: assertion failed: MemObject.cc:123: "!updatedReply_"

The code loading a response from the shared memory cache incorrectly
assumed that the being-loaded response could not have been updated by an
HTTP 304 (Not Modified) reply and called adjustableBaseReply() that is
banned for updated responses. The goal of that call was to determine
whether the cached response header has been parsed. That determination
can be made without using a method that is banned for updated responses.

StoreClient and clientReplyContext had very similar checks that used the
right/safe approach because their current code did not need an immediate
access to an "adjustable" response. We have updated all external
psParsed checks to reduce chances that this bug resurfaces.
src/MemStore.cc
src/Store.h
src/client_side_reply.cc
src/store.cc
src/store_client.cc