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 1455478

Summary: Traceback during activation of realtime* profile with invalid value of isolated_cores
Product: Red Hat Enterprise Linux 7 Reporter: Tereza Cerna <tcerna>
Component: tunaAssignee: John Kacur <jkacur>
Status: CLOSED DUPLICATE QA Contact: Jiri Kastner <jkastner>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: bhu, jeder, jkacur, jskarvad, psklenar
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-13 10:45:57 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:    
Bug Blocks: 1465887    

Description Tereza Cerna 2017-05-25 09:44:51 UTC
Description of problem:
=======================
If isolated_cores=0 (invalid value) is set for realtime* profiles. When he activates this profile, traceback appears in /var/log/tuned/tuned.log.
Problem was found in machines from 1minutetip.


Version-Release number of selected component:
=============================================
tuned-2.8.0-3.el7.noarch
tuned-profiles-nfv-host-2.8.0-3.el7.noarch


How reproducible:
=================
Always in 1minutetip machines


Steps to Reproduce:
===================
# cat /etc/tuned/realtime-virtual-host-variables.conf
isolated_cores=0

# tuned-adm profile realtime-virtual-host
# tuned-adm active
Current active profile: realtime-virtual-host


Actual results:
===============
# cat /var/log/tuned/tuned.log 
2017-05-25 04:43:40,451 INFO     tuned.daemon.daemon: stopping tunning
2017-05-25 04:43:40,801 INFO     tuned.profiles.loader: loading profile: realtime-virtual-host
2017-05-25 04:43:40,804 INFO     tuned.daemon.daemon: starting tuning
2017-05-25 04:43:40,808 INFO     tuned.plugins.base: instance cpu: assigning devices cpu0
2017-05-25 04:43:40,810 ERROR    tuned.utils.commands: Executing x86_energy_perf_policy error: 
2017-05-25 04:43:40,810 WARNING  tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias
2017-05-25 04:43:40,812 INFO     tuned.plugins.plugin_cpu: setting new cpu latency 1
2017-05-25 04:43:40,881 INFO     tuned.plugins.plugin_sysctl: reapplying system sysctl
2017-05-25 04:43:40,884 ERROR    tuned.utils.commands: Writing to file '/sys/devices/virtual/workqueue/cpumask' error: '[Errno 22] Invalid argument'
2017-05-25 04:43:40,884 INFO     tuned.plugins.plugin_bootloader: installing additional boot command line parameters to grub2
2017-05-25 04:43:40,885 INFO     tuned.plugins.plugin_script: calling script '/usr/lib/tuned/realtime/script.sh' with arguments '['start']'
2017-05-25 04:43:40,918 ERROR    tuned.plugins.plugin_script: script '/usr/lib/tuned/realtime/script.sh' error: 1, 'Traceback (most recent call last):
  File "/usr/bin/tuna", line 710, in <module>
    main()
  File "/usr/bin/tuna", line 546, in main
    tuna.isolate_cpus(cpu_list, get_nr_cpus())
  File "/usr/lib/python2.7/site-packages/tuna/tuna.py", line 366, in isolate_cpus
    raise e
OSError: [Errno 22] Invalid argument'
2017-05-25 04:43:40,931 INFO     tuned.daemon.daemon: static tuning from profile 'realtime-virtual-host' applied


Expected results:
=================
No traceback. Add check for this wrong value.

Comment 2 Jaroslav Škarvada 2017-05-25 11:07:42 UTC
It's traceback in Tuna, we moved away from Tuna in upstream, so it shoudln't happen with the latest git head. Related upstream commit:
https://github.com/redhat-performance/tuned/commit/af56ac35ed839846a475b048d8e982d81bbde6c4

Comment 4 Jaroslav Škarvada 2017-08-09 16:02:37 UTC
Users can switch to Tuna in Tuned, thus it should be fixed in Tuna, reassigning to Tuna. It should exit cleanly in case of invalid argument.

Comment 5 John Kacur 2017-09-11 12:58:49 UTC
It would be nice to know the version of tuna as well!

Comment 6 Tereza Cerna 2017-09-12 08:05:48 UTC
Hi, currently I met this traceback with installed tuna-0.13-5.el7.noarch, tuned packages are the same as in description.