Description of Problem:
Strange error output after rebuild of db
Version-Release number of selected component (if applicable):
Steps to Reproduce:
For some reason, DB became corrupt.
0. Follow instructions at rpm.org to recover corrupt DB
1. Install db4-utils with nodeps on default Psyche
2. db_verify Packages results in 2 errors:
db_verify: Bucket 2 has impossible first page 2042
db_verify: Hash bucket 3 maps to non-hash page 2043
db_verify: DB->verify: Packages: DB_VERIFY_BAD: Database verification failed
3. mv Packages Packages.org
4. db_dump Packages.org | db_load Packages
5. rpm -qa runs ok
6. rpm --rebuilddb runs ok
7. rpm -qa shows following strange output for many entries:
error: rpmdbNextIterator: skipping h# 393 Header V3 DSA signature: BAD, key
Tried rpm-4.1-9 test package, will not install, segmentation fault.
What version of rpm is currently installed?
Psyche GM version of rpm... 4.1-1.06.
Also, how can I re-install this version. Suspect install of test version messed
things up. Ran for a while and then hung. Had to kill the install.
Your "suspect" is incorrect, there's only
a handful of changes.
The messages come from signature/digest
verifcation failures on headers retrieved.
If there's lots of those failures, then
there's some problem with the data in the
files, probably caused by something other
So what caused the problem in the 1st place?
That makes sense. Corruption occured when running Synaptic on top of apt. Not
sure exactly what happened. This has been running quite well for over a week. Is
there any way to clear things up (freshen, etc) or is it re-install time?
Another thought...is it possible that Synaptic or apt is gorping the headers and
this was not discovered until a rebuild was necessary (maybe due to 4.1
incompatibilities)? The corruption that occured was with the Packages db file.
The db_dump/db_load clears that up just fine...
Dunno Synaptic/apt. rpm-4.1 has an incompatible
API, but packages/database are known to be
"compatible" with rpm-4.0.4. In fact, rpm-4.0.4
is what's used by the anaconda installer.
You have several options:
1) (easy) reinstall
2) (quick) steal /var/lib/rpm from a
similarly configured machine, do a spot
check on important directories (rpm -Vf /bin/* ...)
and fix (by reinstalling a known copy of packages)
3) (doable) There should be a list of installed
packages in /var/log/rpmpkgs. Find those packages
(the hard part) and reinstall with --justdb to
recreate the database.