On Mon, 18 May 2020 18:27:04 -0400 Sergio Durigan Junior wrote: > On Monday, May 18 2020, I wrote: > > > Just a few more details I've been able to gather this afternoon. > > > > I'm using a Debian sid VM where I installed sysvinit to replace systemd. > > I wasn't able to reproduce the problem reported above, even after > > activating the apparmor profile before upgrading. > > > > If you look at the /etc/init.d/squid script, you can see that the > > startup function does create the /run/squid/ directory. > > > > I will need more info to investigate this bug. > > I submitted > https://salsa.debian.org/squid-team/squid/-/merge_requests/13 to fix the > latent bug that I am experiencing when upgrading to the latest squid > (unstable) and when the apparmor profile is enabled. >
Good catch. Thanks. But that is not related to this problem. Apparmor profile and all package install/configure is fine for access to the /run/squid directory in latest packages. The issue is seen with manually run commands directly using the squid binary. Debian init scripts are caught by systemctl and do not show issues - though I expect it will be seen on Blends or installs without systemd at all (eg Devaun). The commands to replicate are: 1) the command documented as required to initialize caches before starting Squid: # squid -z -f /etc/squid/cache.cnf 2020/05/23 19:11:39| FATAL: failed to open /run/squid/squid.pid: (2) No such file or directory exception location: File.cc(190) open # tail -n 20 /var/log/squid/cache.log 2020/05/23 19:11:39| FATAL: failed to open /run/squid/squid.pid: (2) No such file or directory exception location: File.cc(190) open 2) command required to start multiple instances of Squid (may be run by a custom init script): # squid -n gateway -f /etc/squid/gateway.cnf # squid -n cache -f /etc/squid/cache.cnf # tail -n 20 /var/log/squid/cache.log 2020/05/23 19:10:32| FATAL: failed to open /run/squid/squid.pid: (2) No such file or directory exception location: File.cc(190) open 2020/05/23 19:10:32| FATAL: failed to open /run/squid/squid.pid: (2) No such file or directory exception location: File.cc(190) open # To fix we will either have to find a way to stop systemd erasing the /run/squid directory, or patch the Squid code to create the PID file path as-needed not just the file itself. For the latter, PRs are welcome upstream. I do not currently have time to work on this myself - thus the bug report. Amos