libvirt/src/qemu
Daniel P. Berrange 0231e37a53 Fix race condition when destroying guests
When running virDomainDestroy, we need to make sure that no other
background thread cleans up the domain while we're doing our work.
This can happen if we release the domain object while in the
middle of work, because the monitor might detect EOF in this window.
For this reason we have a 'beingDestroyed' flag to stop the monitor
from doing its normal cleanup. Unfortunately this flag was only
being used to protect qemuDomainBeginJob, and not qemuProcessKill

This left open a race condition where either libvirtd could crash,
or alternatively report bogus error messages about the domain already
having been destroyed to the caller

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 81621f3e6e)

Conflicts:
	src/qemu/qemu_driver.c
2013-01-28 14:12:33 -05:00
..
libvirtd_qemu.aug Re-order config options in qemu driver augeas lens 2012-06-14 18:23:20 -04:00
MIGRATION.txt qemu: Implement migration job phases 2011-07-27 08:45:09 -06:00
qemu_agent.c qemu_agent: Wait for events instead of agent response 2012-08-12 18:35:01 -04:00
qemu_agent.h qemu_agent: Wait for events instead of agent response 2012-08-12 18:35:01 -04:00
qemu_bridge_filter.c Remove conn parameter from virReportSystemError 2010-02-09 01:04:54 +01:00
qemu_bridge_filter.h build: consistently indent preprocessor directives 2010-03-09 19:22:28 +01:00
qemu_capabilities.c S390: Override QEMU_CAPS_NO_ACPI for s390x 2012-08-12 19:21:18 -04:00
qemu_capabilities.h snapshot: add qemu capability for 'transaction' command 2012-03-23 16:38:19 -06:00
qemu_cgroup.c Fix a string format bug in qemu_cgroup.c 2012-08-12 19:23:50 -04:00
qemu_cgroup.h qemu: Implement period and quota tunable XML configuration and parsing 2011-07-21 17:11:12 +08:00
qemu_command.c qemu: pass -usb and usb hubs earlier, so USB disks with static address are handled properly 2012-12-09 17:48:11 -05:00
qemu_command.h build: use correct type for pid and similar types 2012-03-02 06:57:43 -07:00
qemu_conf.c qemu: Add connection close callbacks 2012-03-21 17:31:09 +01:00
qemu_conf.h qemu: Make autodestroy utilize connection close callbacks 2012-03-21 17:31:09 +01:00
qemu_domain.c qemu: Emit compatible XML when migrating a domain 2012-06-14 11:19:18 -04:00
qemu_domain.h qemu: Emit compatible XML when migrating a domain 2012-06-14 11:19:18 -04:00
qemu_driver.c Fix race condition when destroying guests 2013-01-28 14:12:33 -05:00
qemu_driver.h Split all QEMU process mangement code into separate file 2011-02-17 12:48:55 +00:00
qemu_hostdev.c qemu: Rollback on used USB devices 2012-06-14 18:22:51 -04:00
qemu_hostdev.h qemu: call usb search function for hostdev initialization and hotplug 2012-06-14 11:28:14 -04:00
qemu_hotplug.c qemu: syntax fix 2012-08-12 21:15:46 -04:00
qemu_hotplug.h qemu: Start nested job in qemuDomainCheckEjectableMedia 2012-04-02 21:44:27 +02:00
qemu_migration.c qemu: Clear async job when p2p migration fails early 2012-10-17 16:59:37 +02:00
qemu_migration.h qemu: Avoid dangling migration-out job when client dies 2012-03-21 17:31:09 +01:00
qemu_monitor_json.c qemu: Fix name comparison in qemuMonitorJSONBlockIoThrottleInfo() 2012-12-09 17:48:11 -05:00
qemu_monitor_json.h snapshot: improve qemu handling of reused snapshot targets 2012-03-23 16:38:20 -06:00
qemu_monitor_text.c qemu: Keep QEMU host drive prefix in BlkIoTune 2012-12-09 17:48:11 -05:00
qemu_monitor_text.h xml: use better types for memory values 2012-03-07 18:24:44 -07:00
qemu_monitor.c qemu: Fix off-by-one error while unescaping monitor strings 2012-06-14 18:38:27 -04:00
qemu_monitor.h snapshot: improve qemu handling of reused snapshot targets 2012-03-23 16:38:20 -06:00
qemu_process.c qemu_agent: Wait for events instead of agent response 2012-08-12 18:35:01 -04:00
qemu_process.h qemu: Don't overwrite security labels 2012-06-14 18:38:27 -04:00
qemu.conf Re-order config options in qemu driver augeas lens 2012-06-14 18:23:20 -04:00
test_libvirtd_qemu.aug qemu: Support for overriding NOFILE limit 2011-12-22 17:49:04 +01:00
THREADS.txt qemu: fix crash when mixing sync and async monitor jobs 2011-08-01 09:41:57 -06:00