Re: [PATCH 1/2] avoid vm to be deleted if qemuConnectMonitor failed

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

 



On 01/26/2011 08:17 AM, Daniel P. Berrange wrote:
> On Tue, Jan 25, 2011 at 02:43:43PM +0800, Wen Congyang wrote:
>> The reason of libvirtd cores dump is that:
>> We add vm->refs when we alloc the memory, and decrease it 
>> in the function qemuHandleMonitorEOF() in other thread.
>>
>> We add vm->refs in the function qemuConnectMonitor() and
>> decrease it when the vm is inactive.
>>
>> The libvirtd will block in the function qemuMonitorSetCapabilities()
>> because the vm is stopped by signal SIGSTOP. Now the vm->refs is 2.
>>
>> Then we kill the vm by signal SIGKILL. The function
>> qemuMonitorSetCapabilities() failed, and then we will decrease vm->refs
>> in the function qemuMonitorClose().
>> In another thread, mon->fd is broken and the function
>> qemuHandleMonitorEOF() is called. 
>>

> 
> On closer examination I see why this change is required.
> Normally we would be doing qemuDomainObjBeginJob before
> doing anything with the monitor and that grabs an extra
> reference.
> 
> ACK

Pushed.

-- 
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]