Exception: deadlock detected

Bug #1401983 reported by Jason Hobbs on 2014-12-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Critical
Blake Rouse
1.7
Critical
Blake Rouse

Bug Description

I have a MAAS with 100+ nodes in it, and in its maas-django.log I'm seeing these errors from time to time, especially if I try to start many nodes at once.

ERROR 2014-12-12 16:30:25,747 maasserver ################################ Exception: deadlock detected
DETAIL: Process 746 waits for ShareLock on transaction 43344353; blocked by process 742.
Process 742 waits for ExclusiveLock on tuple (5,3) of relation 16585 of database 16385; blocked by process 746.
HINT: See server log for query details.
 ################################
ERROR 2014-12-12 16:30:25,747 maasserver Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.7/dist-packages/maasserver/api/pxeconfig.py", line 171, in pxeconfig
    node.save()
  File "/usr/lib/python2.7/dist-packages/maasserver/models/cleansave.py", line 38, in save
    return super(CleanSave, self).save(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/maasserver/models/timestampedmodel.py", line 55, in save
    return super(TimestampedModel, self).save(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 545, in save
    force_update=force_update, update_fields=update_fields)
  File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 573, in save_base
    updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
  File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 635, in _save_table
    forced_update)
  File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 679, in _do_update
    return filtered._update(values) > 0
  File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 507, in _update
    return query.get_compiler(self.db).execute_sql(None)
  File "/usr/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 975, in execute_sql
    cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
  File "/usr/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 781, in execute_sql
    cursor.execute(sql, params)
  File "/usr/lib/python2.7/dist-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/usr/lib/python2.7/dist-packages/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/lib/python2.7/dist-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
OperationalError: deadlock detected
DETAIL: Process 746 waits for ShareLock on transaction 43344353; blocked by process 742.
Process 742 waits for ExclusiveLock on tuple (5,3) of relation 16585 of database 16385; blocked by process 746.
HINT: See server log for query details.

Related branches

description: updated
Changed in maas:
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → Blake Rouse (blake-rouse)
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
Andres Rodriguez (andreserl) wrote :

This bug has been reported and fixed on upstream MAAS. However, provided that the bug was listed on the debian changelog, this appears as needing verification for pending SRU [1]. This bug did not affect current MAAS in Ubuntu, hence setting this to verification-done to unblock pending SRU.

[1]:http://people.canonical.com/~ubuntu-archive/pending-sru.html

tags: added: verification-done
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers