Description of problem: rpm -qa and rpm --rebuilddb both segfault. Many messages output like: error: rpmdbNextIterator: skipping h# 601 Header V3 DSA signature: BAD, key ID db42a60e Version-Release number of selected component (if applicable): rpm-4.1.1-1.8x (Installed based on the advice found at www.rpm.org) How reproducible: Happens consistently. Steps to Reproduce: Unfortunately, I am unsure how the database corruption occurred, but it was working flawlessly until it stopped working. I attempted to fix the problem by installing the newer version of rpm from www.rpm.org, but to no avail.
You can get a copy of my /var/lib/rpm from http://www.isurfer.ca/~mfrisch/rpmdb.tar.gz
Happens here too [bcox@linux lib]$ sudo rpm --rebuilddb error: rpmdbNextIterator: skipping h# 900 Header V3 DSA signature: BAD, key ID 66534c2b ---repeated ~200 times --- Segmentation fault Vanilla RH8.0 system, updated via up2date and yum. No recent crashes until this. 100% reproducible.
Oh yes, this symptom is widely reported (google rpmdbNexIterator skipping). Suggested cause is DSA certificate expiration. Someone suggested rpm -i /usr/share/doc/redhat-release-8.0/RPM-GPG-KEY, but that doesn't work either. rpm barfs on non-key header text in that file.
Problem was fixed by rm /var/lib/rpm/PublicKeys rpmdb --rebuilddb No idea what caused it. Possibly used rpm -i /usr/share/whatever/it/was/*GPG* when rpm --import was intended.