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 1773792 - Code in systopology can miss when cpu0 is offline
Summary: Code in systopology can miss when cpu0 is offline
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: rteval
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: 8.2
Assignee: John Kacur
QA Contact: Mike Stowell
URL:
Whiteboard:
Depends On:
Blocks: 1722609
TreeView+ depends on / blocked
 
Reported: 2019-11-18 22:37 UTC by John Kacur
Modified: 2020-04-28 15:29 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 15:29:01 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)
don't assume cpu0 cannot be offlined (1.10 KB, patch)
2019-11-19 11:41 UTC, John Kacur
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1571 0 None None None 2020-04-28 15:29:18 UTC

Description John Kacur 2019-11-18 22:37:45 UTC
Description of problem:
covscan undcovered some deadcode. On some machines it is not possible for cpu0 to go offline, but if it is then the file /sys/devices/system/cpu/cpu0/online exists. Instead of just assuming that cpu0 cannot be offlined we need to properly test that.

Version-Release number of selected component (if applicable):
rteval-3.0-2.el8

How reproducible:
it can be rather difficult to reproduce, since it needs numa hardware where cpu0 can be offlined, and then you need to offline it.

I think for testing purposes it is sufficient that the covscan doesn't report this as deadcode, and then verify it by inspection

Comment 1 John Kacur 2019-11-18 22:44:15 UTC
1. rteval-3.0/rteval/systopology.py:124: between: At condition "!os.path.exists(path + "/online") && (n == 0)", the value of "!os.path.exists(path + "/online") && (n == 0)" must be between 0 and 1.
2. rteval-3.0/rteval/systopology.py:120: cond_cannot_single: Condition "n == 0", taking false branch. Now the value of "n" cannot be equal to 0.
3. rteval-3.0/rteval/systopology.py:124: cannot_single: At condition "!os.path.exists(path + "/online") && (n == 0)", the value of "n" cannot be equal to 0.
4. rteval-3.0/rteval/systopology.py:124: truth: At condition "!os.path.exists(path + "/online") && (n == 0)", the truth value of "!os.path.exists(path + "/online") && (n == 0)" must be false.
5. rteval-3.0/rteval/systopology.py:124: possible_types: At condition "!os.path.exists(path + "/online") && (n == 0)", the type of "!os.path.exists(path + "/online") && (n == 0)" must be Boolean.
6. rteval-3.0/rteval/systopology.py:124: dead_error_condition: The condition "!os.path.exists(path + "/online") && (n == 0)" cannot be true.
7. rteval-3.0/rteval/systopology.py:125: dead_error_line: Execution cannot reach this statement: "return True;".
#   123|           # Some hardware doesn't allow cpu0 to be turned off
#   124|           if not os.path.exists(path + '/online') and n == 0:
#   125|->             return True
#   126|           else:
#   127|               return sysread(path, "online") == "1"

Comment 2 John Kacur 2019-11-19 11:41:21 UTC
Created attachment 1637616 [details]
don't assume cpu0 cannot be offlined

Comment 8 errata-xmlrpc 2020-04-28 15:29:01 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-2020:1571


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