[libvirt] [PATCH 0/4] fix some libvirtd cleanup leaks and crashes

Nikolay Shirokovskiy nshirokovskiy at virtuozzo.com
Thu Sep 22 08:38:48 UTC 2016


Crash situation of last 2 patches can easily simulated, just
patch libvirt:

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 30a2830..f6b71d6 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -4515,6 +4515,8 @@ processMonitorEOFEvent(virQEMUDriverPtr driver,
     unsigned int stopFlags = 0;
     virObjectEventPtr event = NULL;
 
+    sleep(3);
+
     if (qemuProcessBeginStopJob(driver, vm, QEMU_JOB_DESTROY, true) < 0)
         return;

then when it is up and running and there is also a qemu domain running:

kill -9 $QEMU_DOMAIN && kill libvirtd

If first 2 patches are not applied yet then make sure there is no admin
server clients present.

Nikolay Shirokovskiy (4):
  daemon: break cyclic deps between admin clients and daemon
  daemon: call free callbacks synchronously in event loop impl
  daemon: keep daemon until all hypervisors drivers are cleaned up
  qemu: first wait all workers finish on state cleanup

 daemon/libvirtd.c       |  7 ++++-
 src/qemu/qemu_driver.c  |  2 +-
 src/rpc/virnetdaemon.c  |  1 +
 src/rpc/virnetsocket.c  | 70 ++++++++++++++++++++++---------------------------
 src/util/vireventpoll.c | 24 +++++++----------
 5 files changed, 50 insertions(+), 54 deletions(-)

-- 
1.8.3.1




More information about the libvir-list mailing list