]> xenbits.xensource.com Git - libvirt.git/commit
qemu: ensure domain event thread is always stopped
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 20 Mar 2020 11:06:17 +0000 (11:06 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Mon, 30 Mar 2020 15:48:15 +0000 (16:48 +0100)
commitd2954c072993ca5d552e011e5492c180a7c5f997
tree521da25974413c84ad34883d78b6a7220dd68b9c
parent544ef82d05a675d9c6f939c67635ed46c094b164
qemu: ensure domain event thread is always stopped

In previous commit:

  commit e6afacb0feabd9bf58331aa0e5259a35378be74e
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   Wed Feb 12 12:26:11 2020 +0000

    qemu: start/stop an event loop thread for domains

A bogus comment was added claiming we didn't need to shutdown the
event thread in the qemuProcessStop method, because this would be
done in the monitor EOF callback. This was wrong because the EOF
callback only runs in the case of a QEMU crash or a guest initiated
clean shutdown & poweroff.  In the case where the libvirt admin
calls virDomainDestroy, the EOF callback never fires because we
have already unregistered the event callbacks. We must thus always
attempt to stop the event thread in qemuProcessStop.

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reported-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/qemu/qemu_process.c