Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2013213

Summary: Decrease log level of messages "Found left-over process ..." and "Unit configured to use KillMode=none. This is unsafe..."
Product: Red Hat Enterprise Linux 9 Reporter: Michal Sekletar <msekleta>
Component: systemdAssignee: systemd-maint
Status: CLOSED ERRATA QA Contact: Frantisek Sumsal <fsumsal>
Severity: high Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: alexander.hass, bstinson, dtardon, fsumsal, jamacku, jwboyer, linux, michael.trapp, systemd-maint-list, systemd-maint
Target Milestone: rcKeywords: Improvement, Reproducer, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: systemd-250-4.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2013210 Environment:
Last Closed: 2022-05-17 15:57:34 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:
Bug Depends On: 2013210    
Bug Blocks: 1941649    

Description Michal Sekletar 2021-10-12 11:54:14 UTC
+++ This bug was initially created as a clone of Bug #2013210 +++

Description of problem:
Don't log about leftover processes in the cgroup if a unit is a service and has KillMode=none. In such case left over processes from the previous run of the service are kind of expected. Also decrease log level (to debug) about the KillMode=none not being safe.

Version-Release number of selected component (if applicable):
systemd-239-51.el8

How reproducible:
deterministic

Steps to Reproduce:
1. cat >  /run/systemd/system/leftover.service <<EOF
[Service]
ExecStart=/bin/sleep infinity
KillMode=none
EOF

2. systemctl daemon-reload

3. systemctl start leftover.service

4. systemctl restart leftover.service

5. journalctl -b -p warning -u leftover.service

Actual results:
Oct 12 07:40:51 localhost systemd[1]: /run/systemd/system/leftover.service:3: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed.
Oct 12 07:40:54 localhost systemd[1]: leftover.service: Found left-over process 784 (sleep) in control group while starting unit. Ignoring.
Oct 12 07:40:54 localhost systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.

Expected results:
First log message (about KillMode=) is logged as debug. Other two are logged as warning only if given cgroup that contains left-over processes *doesn't* belong to service that has KillMode=none.


Additional info:
KillMode=none is used by some SAP services because right now there is no alternative.

Comment 1 Plumber Bot 2022-02-23 09:26:13 UTC
fix merged to github main branch -> https://github.com/redhat-plumbers/systemd-rhel9/pull/70

Comment 3 Plumber Bot 2022-03-29 07:52:03 UTC
fix merged to github main branch -> https://github.com/redhat-plumbers/systemd-rhel9/pull/72

Comment 5 errata-xmlrpc 2022-05-17 15:57:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (new packages: systemd), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:3979