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

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

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.


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]