Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate deadlock on the delete path #4834

Closed
Hugo-Inmanta opened this issue Sep 14, 2022 · 0 comments
Closed

Investigate deadlock on the delete path #4834

Hugo-Inmanta opened this issue Sep 14, 2022 · 0 comments
Assignees
Labels
build master task A ticket created by the build master meant to be picked up by any developer when it suits them.

Comments

@Hugo-Inmanta
Copy link
Contributor

This build failed because of a deadlock on the delete path.

Trace:

Traceback (most recent call last):
  File "/home/jenkins/workspace/_core-postgresql-versions_master/project/inmanta-core/.tox/py39/lib/python3.9/site-packages/inmanta/protocol/rest/__init__.py", line 495, in _execute_call
    result = await config.handler(**arguments.call_args)
  File "/home/jenkins/workspace/_core-postgresql-versions_master/project/inmanta-core/.tox/py39/lib/python3.9/site-packages/inmanta/server/services/orchestrationservice.py", line 472, in delete_version
    await version.delete_cascade()
  File "/home/jenkins/workspace/_core-postgresql-versions_master/project/inmanta-core/.tox/py39/lib/python3.9/site-packages/inmanta/data/__init__.py", line 5592, in delete_cascade
    await self.delete(connection=con)
  File "/home/jenkins/workspace/_core-postgresql-versions_master/project/inmanta-core/.tox/py39/lib/python3.9/site-packages/inmanta/data/__init__.py", line 1965, in delete
    await self._execute_query(query, *values, connection=connection)
  File "/home/jenkins/workspace/_core-postgresql-versions_master/project/inmanta-core/.tox/py39/lib/python3.9/site-packages/inmanta/data/__init__.py", line 1319, in _execute_query
    return await con.execute(query, *values)
  File "/home/jenkins/workspace/_core-postgresql-versions_master/project/inmanta-core/.tox/py39/lib64/python3.9/site-packages/asyncpg/connection.py", line 320, in execute
    _, status, _ = await self._execute(
  File "/home/jenkins/workspace/_core-postgresql-versions_master/project/inmanta-core/.tox/py39/lib64/python3.9/site-packages/asyncpg/connection.py", line 1659, in _execute
    result, _ = await self.__execute(
  File "/home/jenkins/workspace/_core-postgresql-versions_master/project/inmanta-core/.tox/py39/lib64/python3.9/site-packages/asyncpg/connection.py", line 1684, in __execute
    return await self._do_execute(
  File "/home/jenkins/workspace/_core-postgresql-versions_master/project/inmanta-core/.tox/py39/lib64/python3.9/site-packages/asyncpg/connection.py", line 1731, in _do_execute
    result = await executor(stmt, None)
  File "asyncpg/protocol/protocol.pyx", line 201, in bind_execute
asyncpg.exceptions.DeadlockDetectedError: deadlock detected
@Hugo-Inmanta Hugo-Inmanta added the build master task A ticket created by the build master meant to be picked up by any developer when it suits them. label Sep 14, 2022
@arnaudsjs arnaudsjs self-assigned this Sep 19, 2022
inmantaci pushed a commit that referenced this issue Sep 20, 2022
…because it acquires a table-level lock on an incorrect database table. (Issue #4834, PR #4863)

# Description

Fix bug where lock is acquired on the ConfigurationModel table instead of the ResourceAction table. This bug causes deadlocks.

closes #4834

# Self Check:

- [x] Attached issue to pull request
- [x] Changelog entry
- [x] Type annotations are present
- [x] Code is clear and sufficiently documented
- [x] No (preventable) type errors (check using make mypy or make mypy-diff)
- [x] Sufficient test cases (reproduces the bug/tests the requested feature)
- [x] Correct, in line with design
- [ ] ~~End user documentation is included or an issue is created for end-user documentation~~

# Reviewer Checklist:

- [ ] Sufficient test cases (reproduces the bug/tests the requested feature)
- [ ] Code is clear and sufficiently documented
- [ ] Correct, in line with design
inmantaci pushed a commit that referenced this issue Sep 20, 2022
…because it acquires a table-level lock on an incorrect database table. (Issue #4834, PR #4863)

Pull request opened by the merge tool on behalf of #4863
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build master task A ticket created by the build master meant to be picked up by any developer when it suits them.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants