[libvirt] Potential deadlock in libvirt lxc driver

Thomas Hunger tehunger at gmail.com
Wed Mar 14 21:33:07 UTC 2012


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] lxcMonitorEvent is run, but blocks on acquiring the driver
lock (thread A has it)
[Thread A] more killing, thead A frees domain AKA "vm"
[Thread A] releases driver lock
[Thread B] wakes up, acquires driver lock, operates on freed "vm" data
with unpredictable behaviour

any ideas/comments?
best,
Tom




More information about the libvir-list mailing list