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 1296137 - Exception when /dev/cpu_dma_latency is not available
Summary: Exception when /dev/cpu_dma_latency is not available
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tuned
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Jaroslav Škarvada
QA Contact: Tereza Cerna
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-06 12:17 UTC by Frantisek Sumsal
Modified: 2016-11-04 07:26 UTC (History)
4 users (show)

Fixed In Version: tuned-2.7.0-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 07:26:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2479 0 normal SHIPPED_LIVE tuned bug fix and enhancement update 2016-11-03 14:08:42 UTC

Description Frantisek Sumsal 2016-01-06 12:17:54 UTC
Description of problem:
Containers created by systemd-nspawn do not create devices under /dev. This causes unhandled exception being thrown when /dev/cpu_dma_latency is not available:

Jan  6 04:10:40 rhel7 systemd: Started Dynamic System Tuning Daemon.
Jan  6 04:10:40 rhel7 tuned: Exception in thread Thread-2:
Jan  6 04:10:40 rhel7 tuned: Traceback (most recent call last):
Jan  6 04:10:40 rhel7 tuned: File "/usr/lib64/python2.7/threading.py", line 811, in __bootstrap_inner
Jan  6 04:10:40 rhel7 tuned: self.run()
Jan  6 04:10:40 rhel7 tuned: File "/usr/lib64/python2.7/threading.py", line 764, in run
Jan  6 04:10:40 rhel7 tuned: self.__target(*self.__args, **self.__kwargs)
Jan  6 04:10:40 rhel7 tuned: File "/usr/lib/python2.7/site-packages/tuned/daemon/daemon.py", line 96, in _thread_code
Jan  6 04:10:40 rhel7 tuned: self._unit_manager.create(self._profile.units)
Jan  6 04:10:40 rhel7 tuned: File "/usr/lib/python2.7/site-packages/tuned/units/manager.py", line 62, in create
Jan  6 04:10:40 rhel7 tuned: plugin.initialize_instances()
Jan  6 04:10:40 rhel7 tuned: File "/usr/lib/python2.7/site-packages/tuned/plugins/base.py", line 109, in initialize_instances
Jan  6 04:10:40 rhel7 tuned: self._instance_init(instance)
Jan  6 04:10:40 rhel7 tuned: File "/usr/lib/python2.7/site-packages/tuned/plugins/plugin_cpu.py", line 99, in _instance_init
Jan  6 04:10:40 rhel7 tuned: self._cpu_latency_fd = os.open("/dev/cpu_dma_latency", os.O_WRONLY)
Jan  6 04:10:40 rhel7 tuned: OSError: [Errno 2] No such file or directory: '/dev/cpu_dma_latency'

However, this exception does not prevent machine from successfully starting.

Version-Release number of selected component (if applicable):
tuned-2.5.1-4.el7.noarch

How reproducible:
## Create machine root & install packages from "minimal" group
# mkdir testvm
# yum -y --nogpgcheck --installroot "$(pwd)/testvm" groupinstall minimal
## Start test machine in another terminal/tmux/screen/...
# screen -S nspawn systemd-nspawn -D testvm
## Grep tuned messages from test machine's /var/log/messages
# grep tuned testvm/var/log/messages

Actual results:
Log shows an exception

Expected results:
tuned should report some kind of error message instead of unhandled exception

Comment 2 Jaroslav Škarvada 2016-01-06 13:20:10 UTC
Fixed in following upstream commit:
https://git.fedorahosted.org/cgit/tuned.git/commit/?id=a2b0741eacdd65cd17db6eec68ef2dabb96bbba4

But consider adding support for PM_QoS into nspawn. I think that PM_QoS kernel hints from nspawned processes makes sense and that nspawned processes should be able to make such hints to kernel.

Comment 7 Tereza Cerna 2016-08-18 14:00:39 UTC
============================
Verified in:
    tuned-2.7.1-2.el7.noarch
PASS
=============================

# mkdir testvm
# yum -y --nogpgcheck --installroot "$(pwd)/testvm" groupinstall minimal
# > testvm/var/log/messages && timeout 15 systemd-nspawn -bD testvm
# grep tuned testvm/var/log/messages
#

============================
Reproduced in:
    tuned-2.5.1-4.el7.noarch
FAIL
=============================

# mkdir testvm
# yum -y --nogpgcheck --installroot "$(pwd)/testvm" groupinstall minimal
# > testvm/var/log/messages && timeout 15 systemd-nspawn -bD testvm

# grep tuned testvm/var/log/messages
Aug 18 09:49:51 testvm tuned: Exception in thread Thread-2:
Aug 18 09:49:51 testvm tuned: Traceback (most recent call last):
Aug 18 09:49:51 testvm tuned: File "/usr/lib64/python2.7/threading.py", line 811, in __bootstrap_inner
Aug 18 09:49:51 testvm tuned: self.run()
Aug 18 09:49:51 testvm tuned: File "/usr/lib64/python2.7/threading.py", line 764, in run
Aug 18 09:49:51 testvm tuned: self.__target(*self.__args, **self.__kwargs)
Aug 18 09:49:51 testvm tuned: File "/usr/lib/python2.7/site-packages/tuned/daemon/daemon.py", line 96, in _thread_code
Aug 18 09:49:51 testvm tuned: self._unit_manager.create(self._profile.units)
Aug 18 09:49:51 testvm tuned: File "/usr/lib/python2.7/site-packages/tuned/units/manager.py", line 62, in create
Aug 18 09:49:51 testvm tuned: plugin.initialize_instances()
Aug 18 09:49:51 testvm tuned: File "/usr/lib/python2.7/site-packages/tuned/plugins/base.py", line 109, in initialize_instances
Aug 18 09:49:51 testvm tuned: self._instance_init(instance)
Aug 18 09:49:51 testvm tuned: File "/usr/lib/python2.7/site-packages/tuned/plugins/plugin_cpu.py", line 99, in _instance_init
Aug 18 09:49:51 testvm tuned: self._cpu_latency_fd = os.open("/dev/cpu_dma_latency", os.O_WRONLY)
Aug 18 09:49:51 testvm tuned: OSError: [Errno 2] No such file or directory: '/dev/cpu_dma_latency'
#

Comment 9 errata-xmlrpc 2016-11-04 07:26:58 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://rhn.redhat.com/errata/RHBA-2016-2479.html


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