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 1028119

Summary: dbus timeout
Product: Red Hat Enterprise Linux 7 Reporter: Jaroslav Škarvada <jskarvad>
Component: tunedAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED CURRENTRELEASE QA Contact: Branislav Blaškovič <bblaskov>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: bblaskov, jeder, jscotka, jskarvad, perfbz
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tuned-2.3.0-2.el7 Doc Type: Bug Fix
Doc Text:
Cause: There was an hidden race condition in the Tuned code since the beginning of the Tuned v2 development. Consequence: If the switch profile command was sent to the Tuned daemon quickly more times (e.g. twice) and the previous switch profile command wasn't yet finished, the race condition may occur and the deadlock may trigger. In the deadlocked state the Tuned daemon stopped responding to further commands and had to be killed by the operator. Fix: The Tuned code was modified for the deadlock not to occur any more. Result: Multiple quick requests can be processed now and the Tuned daemon still responds.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 11:00:37 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:
Attachments:
Description Flags
Proposed fix none

Description Jaroslav Škarvada 2013-11-07 17:22:37 UTC
Description of problem:
tuned-adm can timeout and tuned dies.

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

How reproducible:
Sometimes

Steps to Reproduce:
1. Run the reproducer

Actual results:
dbus timeout

Expected results:
No timeout

Additional info:
Older tuned seems also affected.

Reproducer:

PROFILES=(balanced latency-performance powersave throughput-performance virtual-guest virtual-host)

for (( i=0; i < 100; i++ ))
do
  p=${PROFILES[$(( RANDOM % ${#PROFILES[@]} ))]}
  echo "iter: $i, profile: $p"
  tuned-adm profile $p
done

Comment 1 Jaroslav Škarvada 2013-11-07 17:24:51 UTC
The source of this problem is currently unclear to me. I am working on it

Comment 2 Jaroslav Škarvada 2013-11-07 21:34:23 UTC
I got it, there is race condition in the start/stop code. The race is there since the beginning of the tuned-2 development.

Comment 3 Jaroslav Škarvada 2013-11-07 21:36:53 UTC
Simple reproducer:
tuned-adm profile balanced && tuned-adm profile balanced

Comment 4 Jaroslav Škarvada 2013-11-07 22:34:17 UTC
Created attachment 821328 [details]
Proposed fix

Comment 7 Branislav Blaškovič 2013-11-19 10:25:14 UTC
I cannot reproduce this with tuned-2.3.0-3.el7.noarch either.
Marking as VERIFIED.

Comment 8 Ludek Smid 2014-06-13 11:00:37 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.