Bug 643522

Summary: qemu hangs in "info balloon" monitor command if the guest is paused/crashed
Product: [Fedora] Fedora Reporter: Laine Stump <laine>
Component: qemuAssignee: Justin M. Forbes <jforbes>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: high    
Version: 14CC: amit.shah, berrange, dwmw2, ehabkost, gcosta, itamar, jaswinder, jforbes, knoel, markmc, ondrejj, scottt.tw, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-19 14:51:45 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Laine Stump 2010-10-15 16:35:11 EDT
+++ This bug was initially created as a clone of Bug #623903 +++

See Bug 623903 and Bug 626544 for details. Basically, if a guest CPU is somehow stopped (eg, click the "pause" button in virt-manager, or issue the "destroy" command from virsh), and the qemu process receives an "info monitor" command, it will hang forever waiting for the stats to become ready.

This is "very bad", since virt-manager is constantly polling the libvirt "dominfo" command, which is constantly calling the qemu monitor with "info balloon". Without fail, if a guest is paused while virt-manager is running, the info balloon command will hang, resulting in qemu, libvirtd, and virt-manager all being hung.

The only way I've found to get out of this situation is to kill the qemu process *and* kill -9 libvirtd.

I witnessed this behavior in F14-beta updated on 2010-10-15:

(libvirt from git 2010-10-15, post 0.8.3)

Also note Bug 626544, which presents another example of bad behavior from the same cause. Pay particular attention to https://bugzilla.redhat.com/show_bug.cgi?id=626544#c4, which points out that the fix proposed for
Comment 1 Laine Stump 2010-10-15 16:43:54 EDT
Actually, I went a bit too far in my "remedy" - it's only necessary to kill the qemu process by hand to get things back under control.
Comment 2 Laine Stump 2010-10-18 11:37:28 EDT
Here is the upstream qemu-kvm "fix" for this problem.

commit 07b0403dfc2b2ac179ae5b48105096cc2d03375a
 Author: Eduardo Habkost <ehabkost@redhat.com>
 Date:   Tue Sep 14 13:43:39 2010 -0300
    disable guest-provided stats on "info balloon" command
    The addition of memory stats reporting to the virtio balloon causes
    the 'info balloon' command to become asynchronous.  This is a regression
    because in some cases it can hang the user monitor.
Comment 3 Justin M. Forbes 2010-10-19 14:51:45 EDT
This patch has been included in qemu-0.13.0-1.fc14