[libvirt] [PATCH] Fix race condition when destroying guests

Jiri Denemark jdenemar at redhat.com
Fri Jan 18 14:54:25 UTC 2013


On Fri, Jan 18, 2013 at 14:39:11 +0000, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> When running virDomainDestroy, we need to make sure that no other
> background thread cleans up the domain while we're doing our work.
> This can happen if we release the domain object while in the
> middle of work, because the monitor might detect EOF in this window.
> For this reason we have a 'beingDestroyed' flag to stop the monitor
> from doing its normal cleanup. Unfortunately this flag was only
> being used to protect qemuDomainBeginJob, and not qemuProcessKill
> 
> This left open a race condition where either libvirtd could crash,
> or alternatively report bogus error messages about the domain already
> having been destroyed to the caller

Right, ACK.

Jirka




More information about the libvir-list mailing list