> However, some init scripts can contain hacky or racy code and this could > potentially lead to such issues in systemd. But again, I'm not able to > reproduce > the problem which is why I am downgrading the severity of this bug report and > tagging it accordingly.
systemd is racing the Squid internal startup process. As you can see from your trace PID 3089 is not the one systemd "supervises" during the startup period and whichever PID that supervision was done for (3047? or 3087?) is potentially finished before squid.pid is produced by PID 3089. systemd is doing some hidden thing to isolate PID 3089 as the worker process - how it manages to get that right is already a miracle. AFAIK the replication of this problem just requires a config file that loads a lot of data into some ACL. That can take long enough so systemd wins the race to read squid.pid before it exists. Ubuntu decided to drop the LSB init script line telling systemd where the PID file would appear. As far as I am aware that leaves systemd supervising the wrong process permanently - which is a gamble that systemd does not need to send any signals to it, unexpected things might happen if a signal gets sent to the wrong PID. That might be used as a workaround for anyone having this issue. But be aware that it was put there in the first place to resolve issues with systemd controlling Squid-3. So pick your poison / YMMV. > In the long term, the squid package should be updated to provide native > systemd > support in the form of service files. Since we have agreed in Debian to > support > systemd as the default and preferred init system. all packages are required to > function properly with systemd which is why native systemd service files for > squid are desirable. > That is coming with Squid-4 in the Debian Buster cycle. Squid-3 (all versions) are not very compatible with systemd for the reasons already stated. Squid-4 had to have a full redesign of its startup procedures and process responsibilities. That is too intrusive to backport to 3.5 stable releases, so I am doubtful Jesse will ever see a better Squid-systemd interaction. Amos