]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Disable EOF processing during qemuDomainDestroy
authorJiri Denemark <jdenemar@redhat.com>
Fri, 9 Dec 2011 14:33:13 +0000 (15:33 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Mon, 12 Dec 2011 15:31:19 +0000 (16:31 +0100)
commit5547d2b81c20522da2b5bc1a7f4e47d725d9e010
treec4006d488a77c7a0ac091ca510d385c60bfbb9f6
parent0fe2b40d5a1858f7eb0d42f46393e566b6d60812
qemu: Disable EOF processing during qemuDomainDestroy

When destroying a domain qemuDomainDestroy kills its qemu process and
starts a new job, which means it unlocks the domain object and locks it
again after some time. Although the object is usually unlocked for a
pretty short time, chances are another thread processing an EOF event on
qemu monitor is able to lock the object first and does all the cleanup
by itself. This leads to wrong shutoff reason and lifecycle event detail
and virDomainDestroy API incorrectly reporting failure to destroy an
inactive domain.

Reported by Charlie Smurthwaite.
src/qemu/qemu_domain.h
src/qemu/qemu_driver.c
src/qemu/qemu_process.c