[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 2/5] qemu: Avoid using stale data in virDomainGetBlockInfo



On Tue, Dec 24, 2013 at 07:22:38 -0700, Eric Blake wrote:
> On 12/20/2013 02:36 PM, Jiri Denemark wrote:
> > Generally, every API that is going to begin a job should do that before
> > fetching data from vm->def. However, qemuDomainGetBlockInfo does not
> > know whether it will have to start a job or not before checking vm->def.
> > To avoid using disk alias that might have been freed while we were
> > waiting for a job, we use its copy. In case the disk was removed in the
> > meantime, we will fail with "cannot find statistics for device '...'"
> > error message.
> > 
> > Signed-off-by: Jiri Denemark <jdenemar redhat com>
> > ---
> >  src/qemu/qemu_driver.c | 17 ++++++++++++-----
> >  1 file changed, 12 insertions(+), 5 deletions(-)
> 
> This fixes the potential for a crash, but isn't this related to the same
> problem that John has been working on?  That is, when one thread is
> migrating a domain and the other is getting block info, we have a race
> where qemu will quit before we get a chance to probe for the block info.
> https://www.redhat.com/archives/libvir-list/2013-December/msg00984.html
> 
> Would changing when we grab the job (and grabbing it unconditionally,
> even if we end up not needing to query) help solve both issues?

I might help with what John was trying to do but I don't think this
patch alone would solve the issue. May I consider this patch ACKed? :-)

Jirka


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]