[libvirt] [PATCH 0/8] Refactor event state handling to fix crash
Daniel P. Berrange
berrange at redhat.com
Wed Dec 14 00:38:17 UTC 2011
When running
while true ; do date ; ../tools/virsh -q -c test:///default 'shutdown test; undefine test; dominfo test' ; done
we often experiance hangs or crashes or memory corruption in
glibc. The reason is that when the virConnectPtr is free'd this
in turn frees the event state, which in turn unregisters the
event timer. The timer may, however, still fire one last time
and it is possible this occurs after the event state has been
freed.
The solution in this series is to only register the timer when
the first callback is added and unregister the timer, when the
last callback is removed.
In doing this patch, I decide to unify more of the event handling
across drivers, and simplify the API usage by drivers, and hide
all the impl details.
More information about the libvir-list
mailing list