Bug 913262

Summary: squid.service Supervising process which is not our child
Product: [Fedora] Fedora Reporter: Henrique Martins <fedora>
Component: squidAssignee: Michal Luscon <mluscon>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: henrik, johannbg, jonathansteffan, lnykryn, metherid, mluscon, mschmidt, msekleta, notting, plautrba, systemd-maint, thozza, vpavlin
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-08 11:56:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Henrique Martins 2013-02-20 18:52:14 UTC
Description of problem:
Not sure this is even a problem or just a warning, and if a problem if it is due to systemd or squid.
I have these lines in /var/log/messages:
  systemd[1]: squid.service: Supervising process NNNN which is not our child. We'll most likely not notice when it exits.  On bug 699114 "this" was fixed for mysqld, but the fix may have been to make mysql work and not get rid of the warning.

Version-Release number of selected component (if applicable):
systemd-197-1.fc18.1.x86_64
squid-3.2.5-2.fc18.x86_64

How reproducible:
Every time

Steps to Reproduce:
1. Configure squid to run
2. look in /var/log/messages
  
Actual results:
Warnings above

Expected results:
No warning, unless that's the way it is...

Additional info:

Comment 1 Michal Schmidt 2013-02-22 16:48:10 UTC
squid runs the following processes (example):
PID             command line
==========================================================
14358           /usr/sbin/squid -f /etc/squid/squid.conf
  `-14360       (squid-1) -f /etc/squid/squid.conf
      `-14361   (logfile-daemon) /var/log/squid/access.log

The pidfile /run/squid.pid contains:
14360

systemd reads the pidfile (as the PIDFile= directive in the unit file asks it to) in order to know which process is the main process of the service.
When that process dies, systemd wants to know. But since PID 14360 is not a direct child of PID 1, systemd will not receive the SIGCHLD. This is what the warning message means.

I don't know why squid does not write PID 14358 in the pidfile. If it did that, systemd would be able to supervise it and the warning would go away. squid may have a reason for doing things this way though. I would like some explanation from the squid maintainers. Reassigning.

Comment 2 Michal Luscon 2013-07-08 11:56:11 UTC
We discussed this buzilla with Michal Sekletar and decided to fix child warning by removing PIDFile from squid.service.

Exhaustive upstream discussion about systemd and squid - http://bugs.squid-cache.org/show_bug.cgi?id=3826