From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020205
Description of problem:
Some kind of database corruption happened after a couple of rpm -Us. rpm -q
appears to work. rpm -q -a works, rpm -q -l -vv works, but any
install/update/remove now reports the following error:
rpmdb: Suspiciously high nelem of 4294967295 on page 0
error: db4 error(-30979) from db->verify: DB_VERIFY_BAD: Database verification
The error is usually reported at the end of the install/removal, and it looks
like the package install/remove actually went through, except for this error.
However it does not appear to be possible to fix the corruption: rpm --rebuilddb
now does some work, for a while, then strace shows it spinning in an infinite
mmap/munmap loop. There is no apparent way to recover the database completely.
Steps to Reproduce:
1. Download http://www.email-scan.com/rpm.bad.tar.gz (8MB) into /var/lib/rpm
2. Run rpm --rebuilddb
Actual Results: rpm runs for a while, rebuilds about half the packages, then
starts spinning in an infinite loop.
Expected Results: The RPM database should be rebuilt as much as possible.
This isn't exactly damaged "beyond all repair"
There's a Berkeley db patch that was not included
in db-4.0.14, now reapplied in rpm-4.0.4 final.
If that doesn't fix your problem, attach a pointer
(bugzilla attachments won't work) to a tarball
of your database
tar czvf /tmp/rpmdb-60152.tar.gz rpm
and I'll take a look.
I already tried rebuilddb after manually dropping __db files. It doesn't work.
Your database rebuilds fine here.
Add -vv and watch the progress.
Yes, there's a *lot* of entries in
the dev package, patience will out.