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.
This bug was initially created as a copy of Bug #1833644
I am copying this bug because:
It also applies
Description of problem:
A customer reports "pmlogger.service" dying with the following messages printed by systemd:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
New main PID XXX does not belong to service, and PID file is not owned by root. Refusing.
New main PID XXX does not belong to service, and PID file is not owned by root. Refusing.
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
These messages are triggered when the admin executes "/usr/share/pcp/lib/pmlogger reload" from a shell.
Indeed this command kills existing pmlogger daemon (running in "pmlogger.service" cgroup) and spawns *its own* pmlogger process (running in the session context).
There are 2 issues here:
1. systemd believes pmlogger.service died
2. new "pmlogger" process is spawned in the wrong cgroup (the cgroup of the shell, not the cgroup of the pmlogger.service unit)
This makes systemd print the messages, and start a new "pmlogger.service" unit which hopefully replaces the "pmlogger" process started through using "/usr/share/pcp/lib/pmlogger reload".
Version-Release number of selected component (if applicable):
pcp-5.0.2-5.el8.x86_64
How reproducible:
Always
Steps to Reproduce:
1. Execute a reload
# /usr/share/pcp/lib/pmlogger reload
2. Check the journal
# journalctl -u pmlogger -b
Actual results:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
pmlogger[7219]: /usr/share/pcp/lib/pmlogger: pmlogger not running
systemd[1]: pmlogger.service holdoff time over, scheduling restart.
systemd[1]: Stopped Performance Metrics Archive Logger.
systemd[1]: Starting Performance Metrics Archive Logger...
pmlogger[7660]: Starting pmlogger ...
systemd[1]: Can't open PID file /run/pcp/pmlogger.pid (yet?) after start: No such file or directory
systemd[1]: New main PID 13013 does not belong to service, and PID file is not owned by root. Refusing.
systemd[1]: New main PID 13013 does not belong to service, and PID file is not owned by root. Refusing.
systemd[1]: Daemon never wrote its PID file. Failing.
systemd[1]: Failed to start Performance Metrics Archive Logger.
systemd[1]: Unit pmlogger.service entered failed state.
systemd[1]: pmlogger.service failed.
systemd[1]: pmlogger.service holdoff time over, scheduling restart.
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
Expected results:
No error messages
Systemd units can explicitly set a umask with the UMask= directive in the [Service] section.
So we could add Umask=0002 in each /usr/lib/systemd/system/pm*.service
Note that's "Umask" with an uppercase 'U'. This change should be benign on systems that don't twiddle with the umask.
(In reply to Mark Goodwin from comment #14)
> Systemd units can explicitly set a umask with the UMask= directive in the
> [Service] section.
>
> So we could add Umask=0002 in each /usr/lib/systemd/system/pm*.service
> Note that's "Umask" with an uppercase 'U'. This change should be benign on
> systems that don't twiddle with the umask.
That's not the right fix - PCP runs on systems which don't use systemd too.
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 (pcp bug fix and enhancement update), 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-2021:1754