Bug 1112720

Summary: Possible db deadlock between VdsUpdateRuntimeInfo and multiple images operations
Product: [Retired] oVirt Reporter: Liron Aravot <laravot>
Component: ovirt-engine-coreAssignee: Liron Aravot <laravot>
Status: CLOSED CURRENTRELEASE QA Contact: Gal Amado <gamado>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.5CC: amureini, gklein, iheim, obasan, rbalakri, scohen, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: ovirt-engine-3.5.0_beta Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-17 12:34:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.