Hi,
Last, but not least - I think time is overdue to put this on the list: ;-)
In the last months, while working on updates from 'squid 3.4.14' => '3.5.XX', I always noticed that the new 'squid' had serious problems, logged in '/var/log/squid/cache.log'.
The finally found reason is the current STOP-routine in '/etc/init.d/squid':
While the 'squid'-process stops immediately after 'squid -k shutdown', at least ONE process - (squid-1) - keeps running for a few seconds, depending on the number of open files etc.
Subsequently, this process is nevertheless killed by 'killproc /usr/sbin/squid >/dev/null', because this process can't be seen by the testing loop:
... while [ ${counter} -gt 0 ]; do statusproc /usr/sbin/squid >/dev/null && break; sleep 1 counter=$(( ${counter} - 1)) done ...
So the next 'killproc'-command kills this - still running - '(squid-1)'-process, resulting in a somehow damaged index file (/var/log/cache/swap.state).
The message is: "Rebuilding storage in /var/log/cache" (dirty log)"
In the following I always got several errors and warnings in '/var/log/squid/cache.log', as described here: https://forum.ipfire.org/viewtopic.php?f=17&t=16526#p97704 (german!)
So I started working on a solution by reworking the 'while'-loop, the current version can be seen here:
https://forum.ipfire.org/viewtopic.php?f=17&t=16526&start=15#p97986
If anyone has new/better ideas or solutions how to handle this, they're welcome!
Sorry for starting this a bit late, but I wanted to be REALLY sure, before I put this on the list.
Best, Matthias