On Fedora 42 (did not test 41, which used dnf5 first) I noticed that dnf5 does not wait&retry to gain transaction lock. If akmod-* packages are involved, then un-/installation problems can occur in automated installations, because the akmod-* package builds kmod package and installs it. $ rpm -q dnf5 akmods dnf5-5.2.12.0-2.fc42.x86_64 akmods-0.6.0-9.fc42.noarch Upstream ticket discussion https://github.com/rpm-software-management/dnf5/issues/2186 proposed to add "--wait" option to dnf5. Afterwards use new option for kmod installation started by akmods. From my point of view: at https://src.fedoraproject.org/rpms/akmods/blob/rawhide/f/akmods#_357/ - add branch at top for "/usr/bin/dnf5" - copy dnf branch commands to dnf5 branch - add "--wait" to dnf5 branch I am creating this ticket ahead of "--wait" availability in case someone encounters problems too. Hence using 'Version=rawhide'. My workaround is to run `akmods` after packages that install akmod-* packages. Reproducible: Always Steps to Reproduce: 1. dnf install -y gstreamer* (installs akmod-intel-ipu6 and akmod-v4l2loopback; which build and try to install kmod) 2. dnf install -y libreoffice* # or other long-running installation Actual Results: depending on timing either none, one, or two kmods OR libreoffice* installation fails to start Expected Results: all kmods and libreoffice* installation succeeds for repeated tests: # dnf remove -y kmod-v4l2loopback-6.14.0-63.fc42.x86_64-0.14.0-1.fc42.x86_64 kmod-intel-ipu6-6.14.0-63.fc42.x86_64-0.0-20.20250115git13c466e.fc42.x86_64 # for P in $(dnf repoquery gstreamer* --qf "%{NAME}.%{ARCH} %{repoid}\n" | grep -vE '-devel'|i686| awk '{print $1}'); do echo _ $P; dnf remove -yq $P; done # reboot # to purge built kmod RPM files # dnf install -y gstreamer* # dnf install -y libreoffice*
Another scenario, which could be more common: If you run a dnf upgrade with a lot of pending updates, the file triggers are all run after the post-transactions which started the akmods build process. When akmods try to install the new akmod module, the file triggers are still running and therefore the database is still locked. Unfortunately, people who run into that problem rarely provide the log file which could prove this scenario.
Hi, I tried updating to kernel-6.15.10-200 with dnf update --offline (NVIDIA driver was already installed). The update included a new kernel, which required akmods to build the NVIDIA driver. The offline transaction got stuck, and I had to power off the system manually. The logs show that dnf5-offline-transaction.service failed with AccessDenied due to an active block inhibitor from akmods. In the end, the driver and other updates were installed correctly. ``` [ OK ] Created slice system-akmods\x2dkey...lice - Slice /system/akmods-keygen. [ OK ] Created slice system-akmods.slice - Slice /system/akmods. [ OK ] Reached target akmods-keygen.target. Starting akmods.10-200.fc42.x...ds from akmod for a given kernel... [ OK ] Started run-p35972-i35973.service ...ystemctl start man-db-cache-update. Starting man-db-cache-update.service... [ OK ] Started run-p36227-i136228.service ..ystemctl start man-db-cache-update. [ 141.928938] dnf5[1313]: [37/37] Removing git-delta-0:0.18.2-8.f 100% | 2.8 Bis | 14.0 B | 00m46s [ 141.929288] dnf5[1313]: Warning: skipped OpenPGP checks for 17 packages from repository: updates [ 141.929288] dnf5[1313]: [org.freedesktop.DBus.Error.AccessDenied] Access denied due to active block inhibitor [FAILED] Failed to start dnf5-offline-trans... upgrade/transaction using DNF 5. See 'systemctl status dnf5-offline-transaction.service' for details. [ OK ] Reached target system-update.target - Offline System Update. Starting dnf5-offline-transaction-...e/transaction using DNF5 failed... [ FAILED ] Failed to start dnf5-offline-trans...ade/transaction using DNF 5 failed. See ‘systemctl status dnf5-offline-transaction-cleanup.service' for details. [ OK ] Finished man-db-cache-update.service. DURING updates: [ .. ] Job akmods.10-200.fc42.x86_64....ice/start running (44s / no limit) AFTER updates: [ 0K ] Finished akmods.10-200.fc42.x...mods from akmod for a given kernel. ``` The same issue happened again when updating to kernel-6.16.3-200 with --offline option. I removed the rhgb kernel argument so the logs provide more detail. The issue occurs right after “Transaction complete! Cleaning up and rebooting…”. ``` Running %posttrans scriptlet: kernel-modules-core-0:6.16.3-200.fc42.x86_64... Running %posttrans scriptlet: kernel-core-0:6.16.3-200.fc42.x86_64... [ OK ] Created slice system-akmods\x2dkeygen.slice - Slice /system/akmods-keygen. [ OK ] Created slice system-akmods.slice - Slice /system/akmods. [ OK ] Reached target akmods-keygen.target. Starting akmods.3-200.fc42_x86_64.service - Builds and install new kmods from akmod for a given kernel... Running %posttrans scriptlet: kernel-modules-0:6.16.3-200.fc42.x86_64... [ OK ] Started run-p35729-i35730.service - [systemd-run] /usr/bin/systemctl start man-db-cache-update. Starting man-db-cache-update.service... [ OK ] Started run-p35745-i35746.service - [systemd-run] /usr/bin/systemctl start man-db-cache-update. [ 91.330313] dnf5[1345]: [31/31] Removing python3-perf-0:6.15.10 100% | 0.0 B/s | 6.0 B | 00m33s [ 91.330454] dnf5[1345]: Warning: skipped OpenPGP checks for 14 packages from repository: updates Transaction complete! Cleaning up and rebooting... [ 91.359126] dnf5[1345]: [org.freedesktop.DBus.Error.AccessDenied] Access denied due to active block inhibitor [FAILED] Failed to start dnf5-offline-transaction.service - Offline upgrades/transactions using DNF 5. See 'systemctl status dnf5-offline-transaction.service' for details. [ OK ] Reached target system-update.target - Offline System Update. Starting dnf5-offline-transaction-cleanup.service - Offline upgrade/transaction using DNF 5 failed... [FAILED] Failed to start dnf5-offline-transaction-cleanup.service - Offline upgrade/transaction using DNF 5 failed. See 'systemctl status dnf5-offline-transaction-cleanup.service' for details. [ OK ] Finished man-db-cache-update.service [ OK ] Finished akmods.3-200.fc42.x86_64.service - Builds and install new kmods from akmod for a given kernel. ``` After that, the update got stuck again, just like before.
Thanks for having worded the initial proposal. I think the way forward is more likely to implement libdnf5-actions instead. *** This bug has been marked as a duplicate of bug 2397307 ***