Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 771016 - virsh destroy a guest . guest status will hang with in shutdown
virsh destroy a guest . guest status will hang with in shutdown
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.3
x86_64 Linux
high Severity high
: rc
: ---
Assigned To: Daniel Veillard
Virtualization Bugs
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-31 02:10 EST by Huang Wenlong
Modified: 2013-10-20 17:44 EDT (History)
8 users (show)

See Also:
Fixed In Version: libvirt-0.9.4-23.el6_2.3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 02:40:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 15:31:38 EDT

  None (edit)
Description Huang Wenlong 2011-12-31 02:10:29 EST
Description of problem:
virsh destroy a guest  . guest status will hang with  in shutdown 
restart libvirtd will work around this 

libvirt-0.9.4-23.el6_2.1.x86_64  is fine so it is regression .


Version-Release number of selected component (if applicable):
libvirt-0.9.4-23.el6_2.2.x86_64
qemu-kvm-0.12.1.2-2.209.el6_2.2.x86_64


How reproducible:
100%

Steps to Reproduce:
1. #virsh start q2
Domain q2 started

2. #virsh destroy q2
Domain q2 destroyed
3.#virsh list --all
  - q2                   in shutdown


Actual results:
hang

Expected results:
no hang ,status should be shut off

Additional info:
Comment 4 Daniel Veillard 2012-01-04 00:13:10 EST
This was a side effect of the patch for 

  https://bugzilla.redhat.com/show_bug.cgi?id=770959

which was included in libvirt-0.9.4-23.el6_2.2 . The problem was reported
and fixed upstream.

libvirt-0.9.4-23.el6_2.3 is built and should include the fix:

commit 97652044af5f2c70e2bfbddbd59eb047bf0a82fa
Author: Jiri Denemark <jdenemar@redhat.com>
Date:   Wed Dec 7 12:52:59 2011 +0100

    qemu: Ignore shutdown event from destroyed domain
    
    During virDomainDestroy, QEMU may emit SHUTDOWN event as a response to
    SIGTERM and since domain object is still locked, the event is processed
    after the domain is destroyed. We need to ignore this event in such case
    to avoid changing domain state from shutoff to shutdown.

Daniel
Comment 6 tingting zheng 2012-01-04 03:11:26 EST
Reproduced the bug with:
libvirt-0.9.4-23.el6_2.2.x86_64
qemu-kvm-0.12.1.2-2.209.el6_2.2.x86_64

# virsh start rhel6
Domain rhel6 started

# virsh list 
 Id Name                 State
----------------------------------
  1 rhel6                running

# virsh destroy rhel6
Domain rhel6 destroyed

# virsh list --all
 Id Name                 State
----------------------------------
  - rhel6                in shutdown


When I updated libvirt to libvirt-0.9.4-23.el6_2.3.x86_64,it is fine:

# virsh start rhel6
Domain rhel6 started

# virsh list 
 Id Name                 State
----------------------------------
  1 rhel6                running

# virsh destroy rhel6
Domain rhel6 destroyed

# virsh list --all
 Id Name                 State
----------------------------------
  - rhel6                shut off
Comment 8 yuping zhang 2012-01-06 05:42:53 EST
Verified this issue with:
libvirt-0.9.4-23.el6_2.4.x86_64
libvirt-client-0.9.4-23.el6_2.4.x86_64
libvirt-python-0.9.4-23.el6_2.4.x86_64

# virsh start test
Domain test started

# virsh list --all
 Id Name                 State
----------------------------------
  2 test                 running

# virsh destroy test
Domain test destroyed
# virsh list --all
 Id Name                 State
----------------------------------
  - test                 shut off

So change the status to VERIFIED.
Comment 11 dyuan 2012-02-15 02:53:58 EST
Verified PASS with libvirt-0.9.10-1.el6.
pkg: 
qemu-kvm-0.12.1.2-2.225.el6
kernel-2.6.32-232.el6

# virsh start rhel6
Domain test started

# virsh list --all
 Id Name                 State
----------------------------------
  7 rhel6                running

# virsh destroy test
Domain test destroyed

# virsh list --all
 Id Name                 State
----------------------------------
  - rhel6                shut off
Comment 14 errata-xmlrpc 2012-06-20 02:40:52 EDT
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.

http://rhn.redhat.com/errata/RHSA-2012-0748.html

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