squidGuard Package Hangs on Uninstall or Upgrade
Tested on two different appliances (SG-1100 and XG-7100), but likely affects all appliances. If you try to upgrade squidGuard from a previous version to the latest or attempt to uninstall the current version after successfully installing, it will hang on "Deinstall commands....done" and never move forward. The pkg-static process will hang (left without killing the process for 20 minutes without change), leaving the package database locked. Killing the processes can sometimes also leave the database in a locked state, requiring a reboot to resolve. Trying to run the uninstall process again after running pkill -9 pkg-static also fails at the same point.
The package will persist in the System --> Package Manager --> Installed Packages menu, but will have disappeared from the Services menu structure, leaving it in a "half uninstalled" state.
Output of "ps aux | grep pkg" showing the pkg-static process hung (tested waiting for 30 minutes and these processes remain):
root 26671 0.0 0.5 9552 4884 - I 11:29 0:00.01 pkg-static -
root 26749 0.0 0.3 9552 3032 - I 11:29 0:00.03 pkg-static -
System Log Output:
Sep 5 11:29:42 php /etc/rc.packages: [squid] - squid_resync function call pr:1 bp: rpc:no
Sep 5 11:29:44 php /etc/rc.packages: [squid] Adding cronjobs ...
Sep 5 11:29:44 php /etc/rc.packages: [squid] Antivirus features disabled.
Sep 5 11:29:44 php /etc/rc.packages: [squid] Removing freshclam cronjob.
Sep 5 11:29:44 php /etc/rc.packages: [squid] Stopping any running proxy monitors
Sep 5 11:29:45 php /etc/rc.packages: [squid] Reloading for configuration sync...
Sep 5 11:29:46 php /etc/rc.packages: [squid] Starting a proxy monitor script
After reboot, if you try to uninstall the package again, it still fails until you disable the squid service. Upon stopping the squid service, the uninstall goes through just fine.
It seems that the squid service isn't being stopped properly during the uninstall process of squidguard, since its dependent on it, so it's failing to uninstall.