Bug 50679 - DB_VERIFY_BAD error
Summary: DB_VERIFY_BAD error
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 7.3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: David Lawrence
URL:
Whiteboard:
: 59102 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-08-02 00:48 UTC by Enrico Scholz
Modified: 2007-04-18 16:35 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-02-02 16:45:02 UTC
Embargoed:


Attachments (Terms of Use)
sample src.rpm (1.45 KB, application/octet-stream)
2001-08-02 00:49 UTC, Enrico Scholz
no flags Details

Description Enrico Scholz 2001-08-02 00:48:46 UTC
Description of Problem:

When executing

$ rpm -U dummy-0.0.1-1.i386.rpm
$ rpm -U dummy-0.0.1-1.i386.rpm --force
$ rpm -e dummy

I get the error message

error: db3 error(-30985) from db->verify: DB_VERIFY_BAD: Database
verification failed


at any any modifying operation. Rebuilding the packages and removing the
hash-files does not help.


How Reproducible:

everytime


Additional Information:

rpm-4.0.3-0.84
If not reproducible, I can provide the rpm-database.

Comment 1 Enrico Scholz 2001-08-02 00:49:26 UTC
Created attachment 25931 [details]
sample src.rpm

Comment 2 Jeff Johnson 2001-08-02 15:57:41 UTC
Does
	rm -f /var/lib/rpm/__db*
	rpm --rebuilddb
fix your problem?

Comment 3 Enrico Scholz 2001-08-02 16:53:25 UTC
No. 

After rebuilding the db it seems that single operations (e.g. rpm -e <one
package>) don't produce the warning anymore. But when executing a more complex
one (e.g. rpm -e <package1> <package2>, where p1 requires p2), it is back.

I have a reference machine where the dummy-package was not installed. There the
message does not appears.

Comment 4 Jeff Johnson 2001-08-02 17:00:45 UTC
A pointer (i.e. URL, not a bugzilla attachment) to a tarball of your database,
please
	cd /var/lib
	tar czvf /tmp/rpmdb3-50679.tar.gz rpm

So, if I understand what you're saying, the problem reproduces itself
soley because the package is installed? Can you verify that the
problem goes away when package is removed, reappears when
package is installed?

Comment 5 Jeff Johnson 2001-08-02 19:29:41 UTC
Here's most of the problem
	%files
	%defattr(-,root,root)
	/tmp/*
as that's gonna pick up all sorts of crap like named pipes and sockets
and other bizarre file types and put them in your package. I have
no clue whether the right thing happens, when, for example, a
socket is included in a package.

Off to see what crap has been picked up from /tmp by examining
your database ...


Comment 6 Enrico Scholz 2001-08-02 19:33:42 UTC
No; dummy has a buildroot and contains only an ordinary /tmp/XXX file.

Comment 7 Jeff Johnson 2001-08-02 19:47:36 UTC
Ooops, yes. Sorry for the FUD. Back to debugging ...

Comment 8 Jeff Johnson 2001-08-02 20:15:44 UTC
Problem reproduced, verify is failing on the Group index.

Changing the spec file to have, for example,
	Group:          User Interface/X
causes the problem to disappear (but make sure you do
a rpm --rebuilddb before trying to reproduce).

So there appears to be a problem with verifying of an
index that has duplicated entries (from the --force)
when the last element is removed.
	

Comment 9 Glen Foster 2001-08-02 21:45:40 UTC
This defect is considered SHOULD-FIX for Fairfax.

Comment 10 Jeff Johnson 2001-08-03 14:00:50 UTC
Problem does not happen if the --force install is not performed.

Tracing the database operations indicates that the operation is
a delete followed by an add for the same hash key not verifying.
Feels like a db3 problem, dunno whether it's with the del/put or
the verify.

I say the impact of this is minor (read: don't use --force) and the
workaround with --rebuilddb is acceptable, and the likelihood
of a delete of the last key followed by an add is small.


Comment 11 Jeff Johnson 2001-08-03 14:37:12 UTC
Ouch, this problem is much more severe than I thought.

Try doing rpm --rebuilddb three times ...

Comment 12 Jeff Johnson 2001-08-03 14:59:17 UTC
... and my database is truncated severely. Appears to be
a problem with my local build, not the distributed pron package. Grrr...

Comment 13 Jeff Johnson 2001-08-13 17:02:25 UTC
Fixed (by disabling the verify error message) in rpm-4.0.3-0.91.

Comment 14 Jeff Johnson 2002-02-02 16:44:57 UTC
*** Bug 59102 has been marked as a duplicate of this bug. ***

Comment 15 Jeff Johnson 2002-02-24 18:25:47 UTC
Fixed (again) by reapplying a sleepycat patch to db-4.0.14
in rpm-4.0.4.

Comment 16 Bill Crawford 2002-03-07 14:19:13 UTC
The bug is back ...

[root@pikachu tmp]# rpm -Fvh hwdata-0.5-1.noarch.rpm gtkam-*
rawhide-release-20020307-1.noarch.rpm 
Preparing...                ########################################### [100%]
   1:gtkam                  ########################################### [ 25%]
   2:hwdata                 ########################################### [ 50%]
   3:gtkam-gimp             ########################################### [ 75%]
   4:rawhide-release        ########################################### [100%]
rpmdb: Suspiciously high nelem of 4294967295 on page 0
error: db4 error(-30979) from db->verify: DB_VERIFY_BAD: Database verification
failed
[root@pikachu tmp]# rpm -q rpm db4
rpm-4.0.4-7x.4
db4-4.0.14-4


Comment 17 Bill Crawford 2002-03-07 14:22:00 UTC
A note: avoiding --force isn't really an option when working with Raw Hide ;o)

The latest culprit is the "automake15" package ...



Note You need to log in before you can comment on or make changes to this bug.