[MacPorts] #54193: squid3+launchd causes multiple runaway processes when run in daemon mode
MacPorts
noreply at macports.org
Sun May 21 14:09:23 UTC 2017
#54193: squid3+launchd causes multiple runaway processes when run in daemon mode
------------------------+----------------------
Reporter: essandess | Owner: jmroot
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords:
Port: squid3 |
------------------------+----------------------
Comment (by essandess):
I believe I have an instance running now that exhibits the underlying
issue.
I have set the {{{-N}}} flag in {{{Squid.wrapper}}} and do not see the
runaway squid processes issue this is intended to fix; however, there are
other problems exist that I believe are related.
'''Problem 1:''' The {{{squid.pid}}} file doesn't match the squid pid.
'''Problem 2:''' The squid process is not responding to {{{-k}}} signals.
'''Good thing:''' The running squid process is working fine as a proxy.
Here's what I see:
{{{
$ ps -el | grep squid | grep -v grep
0 3621 1 4004 0 20 0 2506820 912 - Ss
0 ?? 0:00.02 /opt/local/bin/daemondo --label=Squid --start-cmd
/opt/local/etc/LaunchDaemons/org.macports.Squid/Squid.wrapper start ;
--stop-cmd /opt/local/etc/LaunchDaemons/org.macports.Squid/Squid.wrapper
stop ; --restart-cmd
/opt/local/etc/LaunchDaemons/org.macports.Squid/Squid.wrapper restart ;
--restart-netchange --pid=fileauto --pidfile
/opt/local/var/run/squid/squid.pid
504 3626 3622 4104 0 20 0 2970120 473076 - S
0 ?? 10:58.75 /opt/local/sbin/squid -s -N
504 3639 3626 4004 0 20 0 2432784 212 - Ss
0 ?? 0:05.76 (logfile-daemon) /opt/local/var/squid/logs/access.log
}}}
{{{
$ cat /opt/local/var/run/squid/squid.pid
74809
}}}
Error sending a signal to squid:
{{{
$ sudo squid -k rotate
squid: ERROR: Could not send signal 30 to process 74809: (3) No such
process
}}}
Permissions check:
{{{
$ ls -l /opt/local/var/run/squid/squid.pid
-rw-r--r-- 1 root squid 6 May 20 21:21
/opt/local/var/run/squid/squid.pid
}}}
{{{
$ ls -ld /opt/local/var/run/squid
drwxr-xr-x 4 squid squid 136 May 19 06:48 /opt/local/var/run/squid
}}}
(Is this correct? There's a difference between the permissions on
{{{squid.pid}}} file and the directory in which it resides.)
'''Background info:"
* Squid is loaded using the command {{{sudo port load squid}}}
* I have verified that the launchd plist is loaded:
{{{
$ sudo launchctl list | grep -i squid
- 0 org.squid-cache.squid-rotate.plist
3621 0 org.macports.Squid
}}}
* The state of the current problem arose some time after a fresh reboot
several days ago. The launchd plist was loaded at boot time.
Because this issue is running in a stable state (and I have a working
proxy), I would be able to query any additional logs that you might need.
I've also launched squid without the {{{-N}}} flag on a separate box and
am waiting for it to fail out with a bunch of runaway processes.
--
Ticket URL: <https://trac.macports.org/ticket/54193#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list