Bug 75887

Summary: Strange error after rebuilddb
Product: [Retired] Red Hat Linux Reporter: Need Real Name <jswillms>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-10-14 18:30:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2002-10-14 16:28:09 UTC
Description of Problem:

Strange error output after rebuild of db

Version-Release number of selected component (if applicable):
8.0 Psyche

How Reproducible:

Always


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
ID db42a60e


Tried rpm-4.1-9 test package, will not install, segmentation fault.


Additional Information:

Comment 1 Jeff Johnson 2002-10-14 16:38:20 UTC
What version of rpm is currently installed?


Comment 2 Need Real Name 2002-10-14 17:33:53 UTC
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.



Comment 3 Jeff Johnson 2002-10-14 18:15:27 UTC
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
than rpm.

So what caused the problem in the 1st place?

Comment 4 Need Real Name 2002-10-14 18:25:08 UTC
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?

Comment 5 Need Real Name 2002-10-14 18:30:27 UTC
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...



Comment 6 Jeff Johnson 2002-10-14 18:46:15 UTC
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.