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 1850919 - False positive log "rhsmd process exceeded runtime and was killed." due to mistake in cronjob [rhel-7.9.z]
Summary: False positive log "rhsmd process exceeded runtime and was killed." due to mi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.8
Hardware: All
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
: 1846665 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-25 07:47 UTC by Jan Jansky
Modified: 2024-03-25 16:05 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-15 11:20:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1752059 0 unspecified CLOSED [rhel78] System gets mail report when cron.daily is run and the list continue to grow 2021-02-22 00:41:40 UTC

Description Jan Jansky 2020-06-25 07:47:49 UTC
Description of problem:
Because change in BZ 1752059 cronjob was changed to use syslog instead of mail, but because of not precise ps_check and pkill in cronjob itself is false positively rhsmd -s marked as exceeded time and all rhsmd processes killed.

After boot there is running process rhsmd because ps_check is checking all rhsmd processes and not only rhsmd -s its always reported as exceeded even when rhsmd -s finished successfully and original rhsmd running since boot is killed

Version-Release number of selected component (if applicable):
subscription-manager-1.24.26-3.el7_8.x86_64

How reproducible: 
Always


Steps to Reproduce:
1. Reboot system
2. /etc/cron.daily/rhsmd

Actual results:
in /var/log/messages is "rhsmd process exceeded runtime and was killed" and all rhsmd processes killed

Expected results:
no processed killed and no false log message if timeout really not exceeded

Additional info:
Tested with change below

from:

ps_check=$(pgrep -f '/usr/libexec/rhsmd')
pkill -f '/usr/libexec/rhsmd' >/dev/null 2>&1

to:

ps_check=$(ps -Af | grep '/usr/libexec/rhsmd -s' | grep -v grep | awk '{print $2}')
pkill -f '/usr/libexec/rhsmd -s' >/dev/null 2>&1

Comment 3 Rehana 2020-09-30 10:02:28 UTC
*** Bug 1846665 has been marked as a duplicate of this bug. ***

Comment 7 Archana Pandey 2020-11-18 15:16:49 UTC
Reproducer:

[root@lenovo-rd230-01 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.0-1
subscription management rules: 5.41
subscription-manager: 1.24.42-1.el7
[root@lenovo-rd230-01 ~]#

With already running rhsmd process start cron job

[root@lenovo-rd230-01 /]# /etc/cron.daily/rhsmd
[root@lenovo-rd230-01 /]#
[root@lenovo-rd230-01 ~]# cat /var/log/messages 
Nov 18 04:36:12 lenovo-rd230-01 systemd: Stopping System Logging Service...
Nov 18 04:36:12 lenovo-rd230-01 rsyslogd: [origin software="rsyslogd" swVersion="8.24.0-55.el7" x-pid="1082" x-info="http://www.rsyslog.com"] exiting on signal 15.
Nov 18 04:36:12 lenovo-rd230-01 systemd: Stopped System Logging Service.
Nov 18 04:36:12 lenovo-rd230-01 systemd: Starting System Logging Service...
Nov 18 04:36:12 lenovo-rd230-01 rsyslogd: [origin software="rsyslogd" swVersion="8.24.0-55.el7" x-pid="2275" x-info="http://www.rsyslog.com"] start
Nov 18 04:36:12 lenovo-rd230-01 systemd: Started System Logging Service.
Nov 18 04:37:33 lenovo-rd230-01 rhsmd: In order for Subscription Manager to provide your system with updates, your system must be registered with the Customer Portal. Please enter your Red Hat login to ensure your system is up-to-date.
Nov 18 04:37:43 lenovo-rd230-01 rhsmd: rhsmd process exceeded runtime and was killed.
Nov 18 04:38:33 lenovo-rd230-01 rhsmd: In order for Subscription Manager to provide your system with updates, your system must be registered with the Customer Portal. Please enter your Red Hat login to ensure your system is up-to-date.
Nov 18 04:38:43 lenovo-rd230-01 rhsmd: rhsmd process exceeded runtime and was killed.

                                                                ^^^^------ logging for killed rhsmd process

Verification: 

[root@lenovo-rd230-01 /]# subscription-manager version

server type: This system is currently not registered.

subscription management server: 3.2.0-1

subscription management rules: 5.41

subscription-manager: 1.24.43-1.el7_9

With already running rhsmd process start cron job
[root@lenovo-rd230-01 /]# /etc/cron.daily/rhsmd
[root@lenovo-rd230-01 /]#

[root@lenovo-rd230-01 /]# tail -f /var/log/messages 
Nov 18 04:45:27 lenovo-rd230-01 systemd: Started Enable periodic update of entitlement certificates..
Nov 18 04:45:46 lenovo-rd230-01 systemd: Stopping System Logging Service...
Nov 18 04:45:46 lenovo-rd230-01 rsyslogd: [origin software="rsyslogd" swVersion="8.24.0-55.el7" x-pid="2275" x-info="http://www.rsyslog.com"] exiting on signal 15.
Nov 18 04:45:46 lenovo-rd230-01 systemd: Stopped System Logging Service.
Nov 18 04:45:46 lenovo-rd230-01 systemd: Starting System Logging Service...
Nov 18 04:45:46 lenovo-rd230-01 rsyslogd: [origin software="rsyslogd" swVersion="8.24.0-55.el7" x-pid="13031" x-info="http://www.rsyslog.com"] start
Nov 18 04:45:46 lenovo-rd230-01 systemd: Started System Logging Service.
Nov 18 04:46:05 lenovo-rd230-01 dbus[733]: [system] Activating service name='com.redhat.SubscriptionManager' (using servicehelper)
Nov 18 04:46:05 lenovo-rd230-01 dbus[733]: [system] Successfully activated service 'com.redhat.SubscriptionManager'
Nov 18 04:47:53 lenovo-rd230-01 rhsmd: In order for Subscription Manager to provide your system with updates, your system must be registered with the Customer Portal. Please enter your Red Hat login to ensure your system is up-to-date.

^^^^------ no logging regarding killed rhsmd process

Result: No logging for killed process in /var/log/messages

Comment 11 errata-xmlrpc 2020-12-15 11:20:20 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 (subscription-manager 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-2020:5452


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