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 1204017

Summary: vm deadlock if do setvcpus failed
Product: Red Hat Enterprise Linux 7 Reporter: Luyao Huang <lhuang>
Component: libvirtAssignee: Peter Krempa <pkrempa>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.1CC: dyuan, honzhang, mzhan, pkrempa, rbalakri, shyu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-1.2.13-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 06:24:34 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:

Description Luyao Huang 2015-03-20 07:37:27 UTC
description of problem:
vm deadlock if do setvcpus failed

Version-Release number of selected component (if applicable):
libvirt-1.2.8-16.el7_1.1.x86_64
qemu-kvm-rhev-2.1.2-23.el7_1.1.x86_64

How reproducible:
100%

Steps to Reproduce:
 
1.prepare a offline vm and make it will failed when do setvcpus to a offline vm(becuase bug 1204006):

# virsh setvcpus test3 10
error: Failed to create controller cpu for group: No such file or directory

# virsh setvcpus test3 10
error: Timed out during operation: cannot acquire state change lock


Actual results:
vm deadlock if do setvcpus failed

Expected results:
no deaklock

Additional info:

This was introduce in a backport in bug
https://bugzilla.redhat.com/show_bug.cgi?id=1161540

and fixed by upstream commit:

commit 0df2f0404fdc87691c940565e42fbde83ce71679
Author: Peter Krempa <pkrempa>
Date:   Wed Feb 18 18:05:21 2015 +0100

    qemu: Exit job on error path of qemuDomainSetVcpusFlags()
    
    Commit e105dc981438bc33fa771bd67cece6234dbf6c8d moved some code but
    didn't adjust the jump labels so that the job would be terminated.


and because bug 1204006 will make this deadlock easy to meet, so i think
need filed a bug to track it and check if we need backport.

Comment 3 Luyao Huang 2015-05-18 10:11:40 UTC
Because cannot verify this bug with the same steps (because bug 1204006 have been fixed in libvirt-1.2.15-2.el7.x86_64) with libvirt-1.2.15-2.el7.x86_64,
I chose another way to verify this issue:

1. prepare a running vm with max cpu 2 and current 1:

# virsh dumpxml test3
  <vcpu placement='static' current='1'>2</vcpu>

2. umount cgroup cpuset:

# umount /sys/fs/cgroup/cpuset

3. no deadlock:
# virsh setvcpus test3 2
error: Failed to create controller cpuset for group: No such file or directory

# virsh setvcpus test3 2
error: Failed to create controller cpuset for group: No such file or directory


And verify use the same steps with comment 0 with libvirt-1.2.13-1.el7.x86_64:

1. prepare a inactive vm with cpu 2 and current 1:

# virsh dumpxml test3
  <vcpu placement='static' current='1'>2</vcpu>

2. no deadlock:
# virsh setvcpus test3 2
error: Failed to create controller cpuacct for group: No such file or directory

# virsh setvcpus test3 2
error: Failed to create controller cpuacct for group: No such file or directory

Comment 5 errata-xmlrpc 2015-11-19 06:24:34 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-2015-2202.html