Bug 59102

Summary: rpm returns: DB_VERIFY_BAD: Database verification failed
Product: [Retired] Red Hat Raw Hide Reporter: John Eckerdal <john.eckerdal>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: high    
Version: 1.0CC: billc, reuben-redhatbugzilla
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-02-02 16:42:04 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:
Attachments:
Description Flags
Log of actions to reproduce the error we are encountering (the ls at the end shows packages from rawhide-20020201 which trigger the problem) none

Description John Eckerdal 2002-01-31 00:36:12 UTC
Description of Problem:

I was trying to upgrade to XFree86 4.2.0 to try to pinpoint an error that
exists with my graphics card and X. So I grabbed XFree86 from Rawhide along
with gcc-3.1, libstdc++, cpp and rpm (and DB4 for RPM).

All packages except Glide and XFree86-4.2.0-3.2-i386.rpm installed correctly
(this includes XFree86-devel, libs, tools, xfs and so one).

However Glide and XFree86 returned errors similiar to these:

# rpm -Uvh Glide3-20010520-10.i386.rpm --nodeps
Preparing...                ########################################### 
[100%]
   1:Glide3                 ########################################### 
[100%]
rpmdb: Suspiciously high nelem of 4294967294 on page 0
error: db4 error(-30979) from db->verify: DB_VERIFY_BAD: Database 
verification failed

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

RPM version 4.0.4-0.22
XFree86 version 4.2.0
Glide version 20010520-10-3.2

How Reproducible:

Every time

Steps to Reproduce:
1. Install the RPM
2. 
3. 

Actual Results:

An error code from RPM

Expected Results:

No error code

Additional Information:
	
I marked this as high since the verification fails meaning that the database
might be corrupted. An rpm -V XFree86 returns som .......T errors but nothing
else.

Comment 1 Reuben Farrelly 2002-01-31 12:27:24 UTC
I have also been observing this behaviour lately, however have not installed 
the packages that you described above.  This leads me to believe it's not an 
issue with those particular packages, but with rpm itself.  For me it has 
happened with a seemingly random selection of installs - when it breaks it 
breaks for every package until I do the workaround as listed below.

A workaround, albeit temporary, is to do an rpm --rebuilddb   This seems to get 
rid of the errors for a while however they eventually return.
This problem was observed with a handful of releases prior to 4.0.4-20 as well, 
so I'm guessing it is an unresolved bug...


Comment 2 Jeff Johnson 2002-02-01 22:26:02 UTC
Yup, an unresolved bug that cannot be reproduced ATM, but
may be related to locking on SMP as well as ^C handling.

Reopen this bug if you have a reproducible test case; otherwise
the fix is do "rpm --rebuilddb" until I can reprodcue the problem.

Comment 3 Bill Crawford 2002-02-02 13:55:37 UTC
I've actually logged a new bug for what may be the same problem; feel free to
mark it as a duplicate.


Comment 4 Bill Crawford 2002-02-02 14:03:58 UTC
Search can't find it, maybe I didn't log it.

Anyway, more info: it seems to be the "Conflictnames" file, and I'm attaching a
db_dump of mine (it's not too big).

Looks like a db bug (element count being reduced too many times when elements
removed) ?


Comment 5 Bill Crawford 2002-02-02 14:17:08 UTC
Quick and dirty fix:

db_dump Conflictname >/tmp/Conflictname.db_dump
[edit latter file, changing h_nelem to 1]
db_load Conflictname <!$

A subsequent db_dump shows that the element count has been corrected (to 59)
when loading it.

However it breaks again if I install and then remove the same packages I was
working with when the fault showed up.  Log attached in a mo.


Comment 6 Bill Crawford 2002-02-02 14:19:16 UTC
Created attachment 44358 [details]
Log of actions to reproduce the error we are encountering (the ls at the end shows packages from rawhide-20020201 which trigger the problem)

Comment 7 Jeff Johnson 2002-02-02 16:06:11 UTC
Hmmm I have a patch in rpm-4.0.3 for a page refcount
problem on DB_HASH's, will have to check to see that the patch made
it into db-4.0.14.

Comment 8 Bill Crawford 2002-02-02 16:32:19 UTC
Let me know if I can provide any more info (the Conflictname table is quite
small so I could attach a copy of the db_dump, for example).


Comment 9 Bill Crawford 2002-02-02 16:40:53 UTC
Another package that triggered the problem, if it's any help:
[root@pikachu tmp]# rpm -e nautilus-mozilla
rpmdb: Suspiciously high nelem of 4294967295 on page 0
error: db4 error(-30979) from db->verify: DB_VERIFY_BAD: Database verification
failed
rpmdb: Suspiciously high nelem of 4294967295 on page 0
error: db4 error(-30979) from db->verify: DB_VERIFY_BAD: Database verification
failed


Comment 10 Bill Crawford 2002-02-02 16:41:59 UTC
(that last one screwed up the Name table as well :o(


Comment 11 Jeff Johnson 2002-02-02 16:45:03 UTC

*** This bug has been marked as a duplicate of 50679 ***