Bug 1112720 - Possible db deadlock between VdsUpdateRuntimeInfo and multiple images operations
Summary: Possible db deadlock between VdsUpdateRuntimeInfo and multiple images operations
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: 3.5
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: 3.5.0
Assignee: Liron Aravot
QA Contact: Gal Amado
URL:
Whiteboard: storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-24 14:43 UTC by Liron Aravot
Modified: 2016-02-10 17:56 UTC (History)
7 users (show)

Fixed In Version: ovirt-engine-3.5.0_beta
Clone Of:
Environment:
Last Closed: 2014-10-17 12:34:42 UTC
oVirt Team: Storage
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 29136 0 master MERGED core: avoid deadlocks on images related updated Never

Description Liron Aravot 2014-06-24 14:43:52 UTC
Description of problem:
Currently VdsUpdateRuntimeInfo updates the disc_image_dynamic table
according to the statistics retreived from the running vms.
Those updates are executed in a batchUpdate call, which currently
executes all the updates within the same transaction, as there is a FK
between the disk_image_dynamic on postgres version earlier than 9.3 a
lock will be taken on the referenced row which means that any other
concurrent operation on those images may cause to a deadlock.


Steps to Reproduce:
1. Run VM with multiple disks
2. Attempt to live migrate the vm disks on the same time

Actual results:
db deadlock might occur

Expected results:
db deadlock shouldn't occur

Comment 1 Gal Amado 2014-08-12 08:44:37 UTC
Verified on :
oVirt Engine Version: 3.5.0-0.0.master.20140804172041.git23b558e.el6
vdsm : vdsm-4.16.1-6.gita4a4614.el6.x86_64 

Creates VM with 4 disks.
Using the GUI , I Moved all 4 at once from One SD to the other (both are ISCSI).
Did that 3 times .

No Error at engine.log

Comment 2 Sandro Bonazzola 2014-10-17 12:34:42 UTC
oVirt 3.5 has been released and should include the fix for this issue.


Note You need to log in before you can comment on or make changes to this bug.