Re: [libvirt] Potential deadlock in libvirt lxc driver

2012-06-25 Thread Thomas Hunger
Hi Eric, > I just noticed this message.  Is this still a problem in 0.9.12?  There > have been several patches in the meantime.  Unfortunately, the patch as > is will not work: Sorry for the late reply: I just tried and it is still a problem in 0.9.12. I hit this bug every 5 minutes in my setup s

[libvirt] [PATCH] Use virDomainFindbyID and pass id instead of a pointer to lxcMontitorEvent.

2012-03-22 Thread Thomas Hunger
This fixes a race condition when VIR_EVENT_HANDLE_HANGUP is triggered during lxcDomainDestroyFlags: lxcMonitorEvent tries to acquire the driver lock held by lxcDomainDestroyFlags and blocks. Meanwhile lxcDomainDestroyFlags will free the "vm" structure and release the driver lock. lxcMonitorEvent un

Re: [libvirt] Potential deadlock in libvirt lxc driver

2012-03-14 Thread Thomas Hunger
Hi, last email hopefully. My last patch was broken because it double locked vm. I discovered that virDomainFindBy* locks vm before returning it. The new patch does not double-lock. best, Tom From f2fd4cb72c8f2e01567320a643fe2d665308119e Mon Sep 17 00:00:00 2001 From: Thomas Hunger Date: Thu, 15

Re: [libvirt] Potential deadlock in libvirt lxc driver

2012-03-14 Thread Thomas Hunger
Hey again, attached is a patch against master that fixes the race condition for me. Not sure if this is the best solution. My system is quite stable now under load instead of dying every so often. best, Tom From db8d9d3e674328b81fabc3dcb7981b4727a8e369 Mon Sep 17 00:00:00 2001 From: Thomas

Re: [libvirt] Potential deadlock in libvirt lxc driver

2012-03-14 Thread Thomas Hunger
Hi, I've got a theory on what's happening now, but I am not sure how to fix this. The following seems to be the order of events that kills libvirtd: [Thread A] lxcDomainDestroyFlags requested [Thread A] acquires driver lock [Thread A] cgroup killing triggers VIR_EVENT_HANDLE_HANGUP [Thread B] lxc

[libvirt] Potential deadlock in libvirt lxc driver

2012-03-14 Thread Thomas Hunger
Hi, I'm running version 0.9.10 on debian [1]. When starting and stopping containers I see deadlocks every so often. I attached a full backtrace (see at the end of the log). This seems to happen in conditions similar to the segfault I wrote about recently. I.e. usually when destroying domains. I'm

[libvirt] Segfault in libvirt with lxc driver

2012-03-14 Thread Thomas Hunger
Hi, I am running libvirt 0.10 on debian [1] and I am getting the following segfault [2] about once a day when using the lxc driver. I don't know how to reproduce the circumstances unfortunately. It seems to happen when destroying domains. I attached the debug log leading up to the segfault. Is thi