Re: [PATCH] avoid shutting down the vm twice

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

 



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
shortly.

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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]