Database deadlock while starting regiond
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Gavin Panella | ||
1.9 |
Fix Released
|
Critical
|
Gavin Panella |
Bug Description
This is error #3 from bug #1457788.
2015-05-22 08:39:24 [maasserver.
Traceback (most recent call last):
File "/usr/lib/
yield deferToThread(
File "/usr/lib/
result = context.call(ctx, function, *args, **kwargs)
File "/usr/lib/
return self.currentCon
File "/usr/lib/
return func(*args,**kw)
File "/usr/lib/
return func_outside_
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
register_
File "/usr/lib/
return func_within_
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
"nodegroupi
File "/usr/lib/
cursor.
File "/usr/lib/
return self.cursor.
File "/usr/lib/
six.
File "/usr/lib/
return self.cursor.
OperationalError: deadlock detected
DETAIL: Process 25691 waits for AccessExclusiveLock on relation 16924 of database 16385; blocked by process 25706.
Process 25706 waits for AccessShareLock on relation 16759 of database 16385; blocked by process 25691.
HINT: See server log for query details.
2015-05-22 08:39:24 [maas.websocket
2015-05-22 08:39:25 [maasserver.
Traceback (most recent call last):
File "/usr/lib/
yield deferToThread(
OperationalError: deadlock detected
LINE 1: ...maasserver_
DETAIL: Process 25761 waits for AccessShareLock on relation 16759 of database 16385; blocked by process 25730.
Process 25730 waits for AccessExclusiveLock on relation 16924 of database 16385; blocked by process 25761.
This one is weird: seems there is a deadlock when accessing the DB… but this is happening within start_up and this is supposed to grab an exclusive lock before running…. this needs to be investigated.
Related branches
- Blake Rouse (community): Approve
-
Diff: 570 lines (+294/-39)9 files modifiedsrc/maasserver/locks.py (+6/-3)
src/maasserver/models/signals/tests/test_power.py (+5/-2)
src/maasserver/rpc/regionservice.py (+6/-2)
src/maasserver/start_up.py (+5/-2)
src/maasserver/utils/dblocks.py (+16/-5)
src/maasserver/utils/orm.py (+53/-6)
src/maasserver/utils/tests/test_dblocks.py (+71/-3)
src/maasserver/utils/tests/test_orm.py (+86/-16)
src/maastesting/doubles.py (+46/-0)
- Blake Rouse (community): Approve
-
Diff: 247 lines (+60/-75)4 files modifiedsrc/maasserver/dns/config.py (+3/-7)
src/maasserver/dns/tests/test_config.py (+16/-29)
src/maasserver/locks.py (+2/-2)
src/maasserver/security.py (+39/-37)
Changed in maas: | |
assignee: | Mike Pontillo (mpontillo) → nobody |
Changed in maas: | |
milestone: | 1.8.0 → 1.8.1 |
Changed in maas: | |
milestone: | 1.8.1 → 1.8.2 |
Changed in maas: | |
assignee: | nobody → Gavin Panella (allenap) |
status: | Triaged → In Progress |
Changed in maas: | |
milestone: | 1.8.2 → 1.9.0 |
Changed in maas: | |
status: | In Progress → Fix Committed |
Raising this to critical since this is a crash and we shouldn't tolerate them even if they seem inconsequential.