Description of problem: When two 'dnf' instances are running in parallel, the cache is unprotected leading the second instance waiting to fail. shell #1 # dnf install vim-enhanced shell #2 # dnf install vim-enhanced shell #1 - downloads the dependencies, installs and verifies the deps. shell #2 - notices the downloads are there, waits shell #1 to complete, then fails. Version-Release number of selected component (if applicable): dnf-4.2.23-4.el8.noarch How reproducible: Always Steps to Reproduce: 1. Just install the same package using two dnf in parallel Actual results: [SKIPPED] pkgconf-1.4.2-1.el8.x86_64.rpm: Already downloaded [SKIPPED] pkgconf-m4-1.4.2-1.el8.noarch.rpm: Already downloaded [SKIPPED] pkgconf-pkg-config-1.4.2-1.el8.x86_64.rpm: Already downloaded [SKIPPED] xml-common-0.6.3-50.el8.noarch.rpm: Already downloaded Running transaction check Waiting for process with pid 27640 to finish. Transaction check succeeded. Running transaction test Error: Cannot open file /var/cache/dnf/beaker-AppStream-822659b7f413e82c/packages/pixman-0.38.4-1.el8.x86_6 4.rpm: [Errno 2] No such file or directory: '/var/cache/dnf/beaker-AppStream-822659b7f413e82c/packages/pixm an-0.38.4-1.el8.x86_64.rpm' TypeError: an integer is required (got type NoneType) FATAL ERROR: python callback ??? failed, aborting! Expected results: To proper synchronize the threads. Additional info: The example above is a simplified case to make an easy reproducer. The real use-case is that there is a daemon installed by Beaker that install packages (rstrnt-package) and that happens while the CI is accessing the server to deploy all the dependencies. That problem always happen when the dependencies coincides. I can imagine another use case that the user could install something using CLI while the package updater is upgrading as well.
I am really sorry but the issue is very difficult to resolve it in current code base. But we would like to address the issue in the next major packager update that is planned for RHEL10.