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

Re: [libvirt] [PATCH] avoid shutting down the vm twice

On 02/02/2011 06:18 AM, Jiri Denemark wrote:
>>> +     * vm is active before shutdown.
>>> +     */
>>> +    if (virDomainObjIsActive(vm))
>>> +        qemudShutdownVMDaemon(driver, vm, 0);
>> I'm still playing with this patch, but at first glance, it is making
>> sense to me.
> The patch makes sense to me, since we may unlock the domain object several
> times before we get to the cleanup code. Thus the state may have changed by
> the time we get there.
> Eric, what is the result of you playing with the patch? Is it ok to ack and
> push it?

I've confirmed that this patch does indeed make a difference in the
scenario Wen posted, where without the patch, I did indeed get a
double-free segfault in libvirtd due to simultaneous shutdown attempts
from two threads, but only one shutdown and no crash with the patch.

However, I'm testing an alternate patch based on danpb's suggestion of
hoisting the check into qemudShutdownVMDaemon (or qemuProcessStop, if
danpb's refactoring into qemu_process goes in first), which I'll post

Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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