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 884713 - Add support for qemu-kvm's BALLOON_CHANGE event to avoid using monitor in virDomainGetXMLDesc
Summary: Add support for qemu-kvm's BALLOON_CHANGE event to avoid using monitor in vir...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: x86_64
OS: Linux
high
urgent
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 884650
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-06 15:46 UTC by Chris Pelland
Modified: 2012-12-19 09:43 UTC (History)
29 users (show)

Fixed In Version: libvirt-0.9.10-21.el6_3.7
Doc Type: Bug Fix
Doc Text:
Whenever the virDomainGetXMLDesc() function was executed on a domain that was unresponsive, the call also became unresponsive. With this update, QEMU sends the BALLOON_CHANGE event when memory usage on a domain changes so that virDomainGetXMLDesc() no longer has to query an unresponsive domain. As a result, virDomainGetXMLDesc() calls no longer hang in the described scenario.
Clone Of:
Environment:
Last Closed: 2012-12-19 09:43:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:1595 0 normal SHIPPED_LIVE libvirt bug fix update 2012-12-19 14:43:05 UTC

Description Chris Pelland 2012-12-06 15:46:45 UTC
This bug has been copied from bug #884650 and has been proposed
to be backported to 6.3 z-stream (EUS).

Comment 6 Huang Wenlong 2012-12-11 04:52:31 UTC
Hi, Jiri 

I try to verify this bug , but I do not know the exactly steps,I do the following step ,can you give me some suggestions to verify this bug ?

my env: 
libvirt-0.9.10-21.el6_3.7.x86_64
qemu-kvm-rhev-0.12.1.2-2.295.el6_3.balloon2.x86_64 (https://bugzilla.redhat.com/show_bug.cgi?id=881732#c36 )
vdsm-4.9.6-44.0.el6_3.x86_64

1) start a guest 

2) check "BALLOON_CHANGE" event
# virsh qemu-monitor-command n2  '{"execute": "query-events"}'
{"return":[{"name":"BALLOON_CHANGE"},{"name":"WAKEUP"},{"name":"SUSPEND"},{"name":"__com.redhat_SPICE_DISCONNECTED"},{"name":"__com.redhat_SPICE_INITIALIZED"},{"name":"BLOCK_JOB_CANCELLED"},{"name":"BLOCK_JOB_COMPLETED"},{"name":"DEVICE_TRAY_MOVED"},{"name":"SPICE_DISCONNECTED"},{"name":"SPICE_INITIALIZED"},{"name":"SPICE_CONNECTED"},{"name":"WATCHDOG"},{"name":"RTC_CHANGE"},{"name":"BLOCK_IO_ERROR"},{"name":"VNC_DISCONNECTED"},{"name":"VNC_INITIALIZED"},{"name":"VNC_CONNECTED"},{"name":"RESUME"},{"name":"STOP"},{"name":"POWERDOWN"},{"name":"RESET"},{"name":"SHUTDOWN"}],"id":"libvirt-39"}


but if I do the steps in bug 881732 the host vdsm is still stuck .


Wenlong

Comment 8 Jiri Denemark 2012-12-11 09:03:46 UTC
To test this bug, you don't even need vdsm. Just follow the steps below:

1. virsh start DOM
2. virsh setmem DOM MEMORY
3. kill -STOP DOM_QEMU_PROCESS
4. virsh dumpxml DOM
5. kill -CONT DOM_QEMU_PROCESS

With unfixed libvirt, virsh dumpxml would block until step 5 is done. The fixed version will return domain XML immediately even if the qemu process is stopped and not responding.

Comment 9 Huang Wenlong 2012-12-11 09:16:28 UTC
(In reply to comment #8)
> To test this bug, you don't even need vdsm. Just follow the steps below:
> 
> 1. virsh start DOM
> 2. virsh setmem DOM MEMORY
> 3. kill -STOP DOM_QEMU_PROCESS
> 4. virsh dumpxml DOM
> 5. kill -CONT DOM_QEMU_PROCESS
> 
> With unfixed libvirt, virsh dumpxml would block until step 5 is done. The
> fixed version will return domain XML immediately even if the qemu process is
> stopped and not responding.

Thanks for your help !

Verify this bug: 
libvirt-0.9.10-21.el6_3.7.x86_64
qemu-kvm-rhev-0.12.1.2-2.295.el6_3.balloon2.x86_64

1)  start a guest
virsh list 
 Id    Name                           State
----------------------------------------------------
 10    n2                             running


2) virsh setmem DOM MEMORY 
#virsh setmem n2 800M 

3)kill -STOP DOM_QEMU_PROCESS

4) virsh dumpxml n2     (no block)

<domain type='kvm' id='10'>
  <name>n2</name>
  <uuid>25f3ac88-0cc8-4025-bfc0-b09d5aac28eb</uuid>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>819200</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <cputune>
    <shares>1020</shares>
  </cputune>
  <sysinfo type='smbios'>
    <system>
.....


5) kill -CONT DOM_QEMU_PROCESS

Comment 10 Huang Wenlong 2012-12-11 10:16:20 UTC
I reproduce this bug with :

libvirt-0.9.10-21.el6_3.6.x86_64
qemu-kvm-rhev-0.12.1.2-2.295.el6_3.8.x86_64 

and 

libvirt-0.9.10-21.el6_3.6.x86_64
qemu-kvm-rhev-0.12.1.2-2.295.el6_3.balloon2.x86_64

then verify it with comment 9

Comment 11 Huang Wenlong 2012-12-14 06:21:30 UTC
I can reproduce this bug with:

libvirt-0.9.10-21.el6_3.6.x86_64
qemu-kvm-rhev-0.12.1.2-2.295.el6_3.10.x86_64


then verify this bug with:

libvirt-0.9.10-21.el6_3.7.x86_64
qemu-kvm-rhev-0.12.1.2-2.295.el6_3.10.x86_64

steps as comment 9

Comment 13 errata-xmlrpc 2012-12-19 09:43:41 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.

http://rhn.redhat.com/errata/RHBA-2012-1595.html


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