Bug 1218145 - vm deadlock when deleting a nonexistent iothread with --config
Summary: vm deadlock when deleting a nonexistent iothread with --config
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-04 09:34 UTC by Luyao Huang
Modified: 2015-11-19 06:30 UTC (History)
6 users (show)

Fixed In Version: libvirt-1.2.16-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 06:30:01 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2202 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2015-11-19 08:17:58 UTC

Description Luyao Huang 2015-05-04 09:34:56 UTC
description of problem:
vm deadlock when del an unexist iothread with --config

Version-Release number of selected component (if applicable):
libvirt-1.2.15-1.el7.x86_64
qemu-kvm-rhev-2.2.0-8.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.
prepare a running vm:

# virsh list
 Id    Name                           State
----------------------------------------------------
 4     test3                          running

2.
# virsh iothreaddel test3 1234567891 --config
error: invalid argument: cannot find IOThread '1234567891' in persistent iothreadids

# virsh iothreaddel test3 1234567891 --current
error: Timed out during operation: cannot acquire state change lock (held by remoteDispatchDomainDelIOThread)

Actual results:
 vm deadlock when del an unexist iothread with --config

Expected results:
no deadlock

infomation:

Comment 1 Luyao Huang 2015-05-04 09:38:17 UTC
Patch already send to upstream:

https://www.redhat.com/archives/libvir-list/2015-May/msg00016.html

Comment 2 Ján Tomko 2015-05-04 10:22:29 UTC
Pushed upstream:
commit 3f7cad7a8fb5f646a924975517ff3f04c723540b
Author:     Luyao Huang <lhuang@redhat.com>
CommitDate: 2015-05-04 12:18:55 +0200

    qemu: fix the vm deadlock when deleting a nonexistent iothread
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1218145
    
    Jump to endjob instead of cleanup to fix this deadlock.
    
    Signed-off-by: Luyao Huang <lhuang@redhat.com>

git describe: v1.2.15-8-g3f7cad7

Comment 4 Fangge Jin 2015-08-20 08:57:18 UTC
I can reproduce this bug on build libvirt-1.2.15-1.el7.x86_64

Verify it on build libvirt-1.2.17-5.el7.x86_64

Steps:
1.Prepare a guest with iothreadinfo like below:
# virsh iothreadinfo rhel7d2
 IOThread ID     CPU Affinity   
---------------------------------------------------
 1               4
 2               6
 6               1-4,6
 8               1-4,6

2.# virsh iothreaddel rhel7d2 12345 --config
error: invalid argument: cannot find IOThread '12345' in persistent iothreadids

3.# virsh iothreaddel rhel7d2 12345 --current
error: invalid argument: cannot find IOThread '12345' in iothreadids list

4.# virsh iothreaddel rhel7d2 1 --current

5.# virsh iothreadinfo rhel7d2 
 IOThread ID     CPU Affinity   
---------------------------------------------------
 2               6
 6               1-4,6
 8               1-4,6

Comment 6 errata-xmlrpc 2015-11-19 06:30: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://rhn.redhat.com/errata/RHBA-2015-2202.html


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