Re: [PATCH v3] qemu: qemuDomainRename and virDomainObjListNumOfDomains ABBA deadlock fix

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

 



On 01.02.2016 13:43, Michal Privoznik wrote:
> On 01.02.2016 10:33, Nikolay Shirokovskiy wrote:
>> A pretty nasty deadlock occurs while trying to rename a VM in parallel
>> with virDomainObjListNumOfDomains.
>> The short description of the problem is as follows:
>>
>> Thread #1:
>>
>> qemuDomainRename:
>>     ------> aquires domain lock by qemuDomObjFromDomain
>>        ---------> waits for domain list lock in any of the listed functions:
>>           - virDomainObjListFindByName
>>           - virDomainObjListRenameAddNew
>>           - virDomainObjListRenameRemove
>>
>> Thread #2:
>>
>> virDomainObjListNumOfDomains:
>>     ------> aquires domain list lock
>>        ---------> waits for domain lock in virDomainObjListCount
>>
>> Introduce generic virDomainObjListRename function for renaming domains.
>> It aquires list lock in right order to avoid deadlock. Callback is used
>> to make driver specific domain updates.
>>
>> Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx>
>> ---
>>  src/conf/virdomainobjlist.c |  98 +++++++++++++++++++-----------
>>  src/conf/virdomainobjlist.h |  16 +++--
>>  src/libvirt_private.syms    |   3 +-
>>  src/qemu/qemu_driver.c      | 142 ++++++++++++++++++++------------------------
>>  4 files changed, 142 insertions(+), 117 deletions(-)
> 
> Looking good. ACK. But I rather wait couple of moments in case others
> would like to express their feelings.
> 
> Michal
> 

I went ahead and pushed it. Thanks.

Michal

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