Bug 1955386

Summary: dnf creates massive files in /var/lib/rpm during system-upgrade from 33 to 34
Product: [Fedora] Fedora Reporter: Philippe Troin <phil>
Component: rpmAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 34CC: dmach, igor.raits, jmracek, jrohel, mblaha, mhatina, mjw, packaging-team-maint, pkratoch, pmatilai, pmoravco, rpm-software-management, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-08 00:25:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Philippe Troin 2021-04-30 02:32:50 UTC
Description of problem:
I updated a test system of Fedora 33 to Fedora 34 via the dnf method.
After the (successful) upgrade /var/lib/rpm was ~14 GiB.

Version-Release number of selected component (if applicable):
dnf-4.6.1-1.fc34.noarch

How reproducible:
Always (tried 3 times)

Steps to Reproduce:
1. Get a Fedora 33 system with a large amount of packages (~17k)
2. dnf system-upgrade download -y --best --setopt install_weak_deps=False --allowerasing --releasever=34
3. dnf system-upgrade reboot
4. Login as root into the new Fedora 34 system
5. ls -l /var/lib/rpm

Actual results:
total 14235392
-rw-r--r-- 1 root root  1557250048 Apr 28 19:35 rpmdb.sqlite
-rw-r--r-- 1 root root     3571712 Apr 29 19:19 rpmdb.sqlite-shm
-rw-r--r-- 1 root root 13015590912 Apr 28 17:50 rpmdb.sqlite-wal

Expected results:
rpmdb.sqlite-wal shouldn't be 13 GiB

Additional info:
The files can be trimmed by running `rpm --rebuilddb`.

Comment 1 Lukáš Hrázký 2021-05-03 11:43:46 UTC
Reassigning to rpm.

Comment 2 Panu Matilainen 2021-05-04 10:47:51 UTC
That's certainly not normal behavior, the WAL file is supposed to be zero-length after an rpm transaction completes and should never grow anywhere near that large to begin with. Most likely there's been another open database handle during the upgrade, which prevents the sqlite checkpoints from doing their work. I'm unable to reproduce with regular dnf upgrade so it's likely the bug is in, or related to, the system-upgrade dnf plugin.

Comment 3 Ben Cotton 2022-05-12 16:22:05 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '34'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 4 Ben Cotton 2022-06-08 00:25:39 UTC
Fedora Linux 34 entered end-of-life (EOL) status on 2022-06-07.

Fedora Linux 34 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release.

Thank you for reporting this bug and we are sorry it could not be fixed.