Bug 1955386 - dnf creates massive files in /var/lib/rpm during system-upgrade from 33 to 34
Summary: dnf creates massive files in /var/lib/rpm during system-upgrade from 33 to 34
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 34
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2021-04-30 02:32 UTC by Philippe Troin
Modified: 2021-05-04 10:47 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:
Type: Bug

Attachments (Terms of Use)

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):

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.

Note You need to log in before you can comment on or make changes to this bug.