Bug 7635 - systemd doesn't reliably detect service startup failures
Summary: systemd doesn't reliably detect service startup failures
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Other (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: MediumPrio
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-02 11:25 CET by Pierre Ossman
Modified: 2021-03-09 14:45 CET (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2021-02-02 11:25:13 CET
If one of our services fails to start, systemd/systemctl will often still report success starting the service. This is not ideal as we want proper feedback to the sysadmin, and it might break automated systems that examine the service status.

The problem is that we are using "Type=forking", but we don't fulfil the signalling requirements that systemd has. In this mode the parent process is supposed to hang around until the service is fully operational. But we exit the parent as soon as the child is spawned off.

Details about the startup mode here:

https://www.freedesktop.org/software/systemd/man/systemd.service.html

Note that in some cases systemd detects the failure. I guess it is race:y and if the child manages to fail before systemd has noticed that the parent has exited then systemd will see that something has gone wrong.

Also note that this isn't really a new bug. Our current behaviour was incorrect even for SysV startup but we apparently didn't see any major practical problems with it.
Comment 1 Pierre Ossman cendio 2021-02-02 11:25:59 CET
This issue was noted in bug 7578.

Note You need to log in before you can comment on or make changes to this bug.