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 1528368 - tuned fails to verify the value of cpumask when it has more than 32 cores
Summary: tuned fails to verify the value of cpumask when it has more than 32 cores
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tuned
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Jaroslav Škarvada
QA Contact: Dominik Rehák
URL:
Whiteboard:
Depends On:
Blocks: 1546815 1549614
TreeView+ depends on / blocked
 
Reported: 2017-12-21 16:03 UTC by Sergio Lopez
Modified: 2021-03-11 16:45 UTC (History)
5 users (show)

Fixed In Version: tuned-2.10.0-0.1.rc1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 10:48:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3172 0 None None None 2018-10-30 10:50:31 UTC

Description Sergio Lopez 2017-12-21 16:03:02 UTC
Description of problem:

On servers with more than 32 cores, with non-isolated cores over the 32 mark, tuned verification may fail like this:

# tuned-adm verify
Verification failed, current system settings differ from the preset profile.
You can mostly fix this by Tuned restart, e.g.:
  service tuned restart
Sometimes (if some plugins like bootloader are used) also reboot is required.
See tuned log file ('/var/log/tuned/tuned.log') for details.

# grep ERROR /var/log/tuned/tuned.log
2017-12-21 18:34:20,716 ERROR    tuned.plugins.base: verify: failed: '/sys/devices/virtual/workqueue/cpumask' = 'ffffffff,80808000', expected 'ffffffff,80808000'
2017-12-21 18:34:20,716 ERROR    tuned.plugins.base: verify: failed: '/sys/bus/workqueue/devices/writeback/cpumask' = 'ffffffff,80808000', expected 'ffffffff,80808000'


Version-Release number of selected component (if applicable):

tuned-profiles-cpu-partitioning-2.8.0-5.el7.noarch
tuned-2.8.0-5.el7.noarch


How reproducible:

Always.


Additional info:

The problem lies in this section:

tuned/plugins/base.py:
    495         def _verify_value(self, name, new_value, current_value, ignore_missing, device = None):
    496                 if new_value is None:
    497                         return None
    498                 ret = False
    499                 if current_value is None and ignore_missing:
    500                         if device is None:
    501                                 log.info(consts.STR_VERIFY_PROFILE_VALUE_MISSING % name)
    502                         else:
    503                                 log.info(consts.STR_VERIFY_PROFILE_DEVICE_VALUE_MISSING % (device,         name))
    504                         return True
    505 
    506                 if current_value is not None:
    507                         current_value = self._norm_value(current_value)
    508                         new_value = self._norm_value(new_value)
    509                         try:
    510                                 ret = int(new_value) == int(current_value)
    511                         except ValueError:
    512                                 try:
    513                                         ret = int(new_value, 16) == int(current_value, 16)
    514                                 except ValueError:
    515                                         ret = str(new_value) == str(current_value)

When the server has more than 32 cores, cpumask is split into two 32 bit values separated by a comma, like "00000000,00000000".

This possibility is not contemplated by the above code, and this is what happens:

 - Line 510: Cast to int fails because there's a comma.
 - Line 513: Cast to int from a limited string fails because the comma is present in the first 16 characters.
 - Line 515: String comparison fails because the value read from sysfs contains a new line ("\n").

Comment 12 errata-xmlrpc 2018-10-30 10:48:57 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, 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-2018:3172


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