#4072 deadlocks in create_rpm_checksum
Closed: Fixed by tkopecek. Opened by mikem.

parallel calls to this function for the same rpm can result in a deadlock. E.g.

2024-04-03 13:29:44,206 [WARNING] m=getRPMChecksums u=None p=1284459 r=10.2.111.214:42082 koji.xmlrpc: Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/kojihub/kojixmlrpc.py", line 266, in _wrap_handler
    response = handler(environ)
  File "/usr/lib/python3.6/site-packages/kojihub/kojixmlrpc.py", line 293, in handle_rpc
    return self._dispatch(method, params)
  File "/usr/lib/python3.6/site-packages/kojihub/kojixmlrpc.py", line 330, in _dispatch
    ret = koji.util.call_with_argcheck(func, params, opts)
  File "/usr/lib/python3.6/site-packages/koji/util.py", line 271, in call_with_argcheck
    return func(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/kojihub/kojihub.py", line 12796, in getRPMChecksums
    create_rpm_checksum(rpm_id, sigkey, chsums_dict)
  File "/usr/lib/python3.6/site-packages/kojihub/kojihub.py", line 16063, in create_rpm_checksum
    insert.execute()
  File "/usr/lib/python3.6/site-packages/kojihub/db.py", line 1051, in execute
    self._one_insert(data)
  File "/usr/lib/python3.6/site-packages/kojihub/db.py", line 1055, in _one_insert
    _dml(query, params)
  File "/usr/lib/python3.6/site-packages/kojihub/db.py", line 219, in _dml
    c.execute(operation, values, log_errors=log_errors)
  File "/usr/lib/python3.6/site-packages/kojihub/db.py", line 148, in execute
    ret = self.cursor.execute(operation, parameters)
psycopg2.extensions.TransactionRollbackError: deadlock detected

Fix forthcoming


Metadata Update from @tkopecek:
- Custom field Size adjusted to None
- Issue set to the milestone: 1.35

Metadata Update from @tkopecek:
- Issue tagged with: testing-ready

Metadata Update from @mfilip:
- Issue tagged with: testing-done

Commit d0de5852 fixes this issue

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/koji/issues/4072

Please continue any further discussion there.

Metadata
Related Pull Requests