Red Hat Bugzilla – Bug 41864
rpm-4.0.2-6x free list corrupt
Last modified: 2007-04-18 12:33:22 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (Windows NT 5.0; U)
Description of problem:
While installing a package I got the message:
error: free list corrupt (10514888)- please run "rpm --rebuilddb"
If I run "rpm --rebuilddb" I just get the same error message.
If I run "rpm -qa" a number of package names are listed, then the same error message.
I looked at mailing list archives and found many similar problems reported, but It seems that
the stock answer is to rebuild the db.
Steps to Reproduce:
1. run "rpm --rebuilddb"
Actual Results: Get error message "error: free list corrupt (10514888)- please run "rpm --rebuilddb" ...
Expected Results: db correctly rebuilt
What version of rpm?
If you've been using the Ximian installer, I supect I know the problem.
If so, please attach a pointer to a tarball of your database
tar czvf /tmp/rpmdb.tar.gz
and I'll take a look.
rpm version 4.0.2-6x
I have occasionally used the ximian installer.
Pointer to a tar ball of your database, please, and I'll send ya a fix ...
The tarball was attached using the bugzilla form.
Also, you can get it from http://www.tempori.com/files
It's called rpmdb.tar.gz.
Hmmm, yopu're still using db1, that means that the data corruption will be more
causing all packages after the break in the chain to be lost, ...
Here's what to do:
1) Get a copy of rpm-3.0.x installed manually using rpm2cpio
rpm2cpio rpm-3.0*.rpm | cpio -dim
2) Rebuild using rpm-3.0.5 to get rid of the freelist corruption
3) Rebuild using rpm-4.0.2 to convert from db1 -> db3
/bin/rpm --rebuilddb -vv
4) Verify that everything's OK by doing rpm -qa and whatever else ...
5) Check for orphaned files, i.e. files from packages whose header has
been lost. The technique is basically
for i in /bin /sbin /usr/bin /usr/sbin /usr/X11R6/bin ...
rpm -qf $i/* | grep 'not owned'
and then finding what package used to own the file (you need the rpmdb-redhat
rpm --redhatprovides --dbapi 1 <orphan_file_here>
Here's some more info about your rpmdb that might help.
The damage is at (or near) offset 13547416 decimal in packages.rpm. Since
bash$ ls -al /var/lib/rpm/packages.rpm
-rw-r--r-- 1 root root 13560328 May 21 12:39
you probably have lost very little information.
HTH. Reopen this bug if you need more.
Thanks for the help. I really appreciate it!
*** Bug 42283 has been marked as a duplicate of this bug. ***
I tried the steps above, and I'm getting segmentation fault performing the last step: /bin/rpm --rebuilddb -vv
D: +++ 254 dos2unix-3.1-3
D: adding "dos2unix" to Name index.
D: adding 6 entries to Basenames index.
D: adding "Applications/Text" to Group index.
D: adding 4 entries to Requirename index.
D: adding 1 entries to Providename index.
$ rpm --version
RPM version 4.0.2
to firstname.lastname@example.org: Yes, your problem is still unresolved. Working on it
Any news on the segmentation fault problem?
FIxed in rpm-4.0.3-0.38, you need to do a --rebuilddb. Thanks for your patience,
I'll make a copy available on ftp.rpm.org in the next couple days.
Does this problem occur on RH 7.1?
I searched the database, and it looks like it's only 6.2 that has this problem.
Can anyone confirm this?