On Wed, Feb 02, 2011 at 11:37:37 -0700, Eric Blake wrote: > * src/qemu/qemu_driver.c (qemudShutdownVMDaemon): Check that vm is > still active. > Reported by Wen Congyang as follows: > > --- > > I was able to reproduce a segfault due to double shutdown, as > well as testing that this patch avoids the issue. > > src/qemu/qemu_driver.c | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c > index a3a68b1..d16a4ab 100644 > --- a/src/qemu/qemu_driver.c > +++ b/src/qemu/qemu_driver.c > @@ -2991,6 +2991,11 @@ static void qemudShutdownVMDaemon(struct qemud_driver *driver, > VIR_DEBUG("Shutting down VM '%s' pid=%d migrated=%d", > vm->def->name, vm->pid, migrated); > > + if (!virDomainObjIsActive(vm)) { > + VIR_DEBUG("VM '%s' not active", vm->def->name); > + return; > + } > + Looks like the solution Dan was asking for... ACK Jirka -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list