Re: [PATCH 1/2] qemu: Add missing lock of virDomainObj before calling virDomainUnref

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

 



On 03/07/2011 03:03 AM, Daniel P. Berrange wrote:
>> I think the real reason for the deadlock is that:
>>
>> qemudDomainSaveFlag holds the domain lock while it calls
>> qemuDomainEventQueue, which requests the event loop lock
>>
>> the event loop thread holds the event loop lock, and can make several
>> different callbacks that can result in requesting a domain lock
> 
> I don't think this can be the deadlock scenario. The event loop lock
> is completely isolated from other locks, because it is only ever held
> while code in event.c is executing. It is always released when invoking
> any external callbacks, so you can't have any lock ordering dependencies
> wrt the event loop lock.

But right now, the event loop lock _is_ held while calling the destroy
callbacks; see virEventCleanupHandles.  Would it be better to break the
deadlock by dropping the event loop lock there?

Oh, serves me right for reading email in order; I just noticed that this
has been suggested already:
https://www.redhat.com/archives/libvir-list/2011-March/msg00218.html
https://www.redhat.com/archives/libvir-list/2011-March/msg00232.html

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