Processes keep running after "systemctl stop"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I have a number of Ubuntu 22.04 installations on various computers. In the last month, I have seen more and more log messages like the following from different systems:
```
systemd[1]: apache2.service: Unit process 70257 (apache2) remains running after unit stopped.
systemd[1]: exim4.service: Unit process 61890 (exim4) remains running after unit stopped.
```
I started considering this a problem when subsequently, some php processes continued running after `systemctl stop apache2.service`. This can be a problem when rogue processes interfere with my file-based backup. I had at least one case where a rogue `php` process started misbehaving after both `apache2` and `mysql` where stopped. The `php` processes continued running, possibly inside a rogue `apache2` process, but failed to continue its normal operation due to the absence of `mysql`.
Motivation: I have a nightly backup script that stops common services like `exim4`, `apache2` and `mysql`, then performs file-based backup, and subsequently starts services again. I was relying on the fact that processes would end after `systemctl stop`, and do not modify the file system anymore. But this seems not always to be the case?
I do not necessarily think that this is a duplicate of https:/
Expected behavior: After `systemctl stop`, I would need all processes to end. This would be required so that I can be sure that it is safe to perform file based backup, without modifications on the file system.
I'm running systemd:amd64 249.11-0ubuntu3.10 from jammy-updates on Ubuntu 22.04.3 LTS.