Description of problem:
Actions::Pulp3::CapsuleContent::Sync failed with:
—
smart_proxy_history_id: 58884
pulp_tasks:
- pulp_href: "/pulp/api/v3/tasks/0191dbe1-4b63-7bbd-9269-627a9d25ec83/"
pulp_created: '2024-09-10T12:21:00.900+00:00'
state: failed
name: pulp_ansible.app.tasks.collections.sync
...
traceback: |2
File "/usr/lib/python3.11/site-packages/pulpcore/tasking/tasks.py", line 61, in _execute_task
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pulp_ansible/app/tasks/collections.py", line 191, in sync
repo_version = d_version.create()
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pulpcore/plugin/stages/declarative_version.py", line 161, in create
loop.run_until_complete(pipeline)
File "/usr/lib64/python3.11/asyncio/base_events.py", line 654, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pulpcore/plugin/stages/api.py", line 220, in create_pipeline
await asyncio.gather(*futures)
File "/usr/lib/python3.11/site-packages/pulpcore/plugin/stages/api.py", line 41, in _call_
await self.run()
File "/usr/lib/python3.11/site-packages/pulpcore/plugin/stages/content_stages.py", line 55, in run
await sync_to_async(model_type.objects.filter(content_q).touch)()
File "/usr/lib/python3.11/site-packages/asgiref/sync.py", line 448, in _call_
ret = await asyncio.wait_for(future, timeout=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/asyncio/tasks.py", line 452, in wait_for
return await fut
^^^^^^^^^
File "/usr/lib64/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/asgiref/sync.py", line 490, in thread_handler
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pulpcore/app/models/content.py", line 117, in touch
return self.filter(pk__in=sub_q).update(timestamp_of_interest=now())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1206, in update
rows = query.get_compiler(self.db).execute_sql(CURSOR)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1992, in execute_sql
aux_rows = query.get_compiler(self.using).execute_sql(result_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1984, in execute_sql
cursor = super().execute_sql(result_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1562, in execute_sql
cursor.execute(sql, params)
File "/usr/lib/python3.11/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/django/db/backends/utils.py", line 84, in _execute
with self.db.wrap_database_errors:
File "/usr/lib/python3.11/site-packages/django/db/utils.py", line 91, in _exit_
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/lib/python3.11/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/psycopg/cursor.py", line 723, in execute
raise ex.with_traceback(None)
description: |-
deadlock detected
DETAIL: Process 3568682 waits for ShareLock on transaction 44696261; blocked by process 3568460.
Process 3568460 waits for ShareLock on transaction 44696265; blocked by process 3568682.
HINT: See server log for query details.
CONTEXT: while updating tuple (70,31) in relation "core_content"
How reproducible:
Hard
Is this issue a regression from an earlier version:
Not sure
Steps to Reproduce:
1. Create a new repository for ansible collection
2. create a content view with the ansible collection repo + other RHEL8 repositories
3. publish and promote to a LE associated with the Capsule
4. Trigger a complete capsule sync
Actual behavior:
Hit the deadlock error
Expected behavior:
No deadlock error
Business Impact / Additional info: