Bug 915753

Summary: Deadlock detected during creation vms in pool
Product: [Retired] oVirt Reporter: mkublin <mkublin>
Component: ovirt-engine-coreAssignee: Liron Aravot <laravot>
Status: CLOSED CURRENTRELEASE QA Contact: Aharon Canan <acanan>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.2CC: abaron, acathrow, amureini, bazulay, hateya, iheim, jkt, lpeer, Rhev-m-bugs, sbonazzo, yeylon
Target Milestone: ---   
Target Release: 3.3.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-19 14:24:26 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:
Attachments:
Description Flags
log none

Description mkublin 2013-02-26 12:56:04 UTC
Created attachment 702848 [details]
log

Description of problem:

Deadlock in DB during creation pool of vms


Version-Release number of selected component (if applicable):
Latest upstream: commit 7fd9d7045a064d5bceaf5e7be5aaceb40746bc76

How reproducible:


Steps to Reproduce:
1. Initiate creation of pool of vms (In my case pool with 15 vms)
  
Actual results:
Part of vm was not created because of deadlock in DB

Expected results:

No deadlock should be

Additional info:

I have one host, and 3 running vms, so this is not because of load.
Regards reproduce: it is obvious from exception how to fix it.

Comment 1 Haim 2013-02-27 09:38:57 UTC
Michael,

Comment 2 Ayal Baron 2013-03-14 06:30:16 UTC
Michael, please add a full description of the issue, reproducer etc.

Comment 3 mkublin 2013-03-14 08:06:11 UTC
It is upstream bug.
Steps, like I wrote - I created a pool of vms, log attached. I success to reproduce it couple of times.
Due to logs a bug can be solved.
The deadlock is:
EntityAsyncTask::EndCommandAction [within thread]: EndAction for action type AddVm threw an exception: javax.ejb.EJBTransactionRolledbackException: CallableStatementCallback; SQL [{call updateimagestatus(?, ?)}]; ERROR: deadlock detected
  Detail: Process 13637 waits for ShareLock on transaction 1692869; blocked by process 13514.
Process 13514 waits for ShareLock on transaction 1692880; blocked by process 13637.
  Hint: See server log for query details.
  Where: SQL statement "UPDATE images
    SET    imageStatus = v_status
    WHERE  image_guid = v_image_id"

Comment 5 Sandro Bonazzola 2013-11-15 10:57:24 UTC
Re-targeting to 3.3.2 since 3.3.0 has been released.

Comment 6 Sandro Bonazzola 2013-12-19 14:24:26 UTC
oVirt 3.3.2 has been released resolving the problem described in this bug report.