Bug 115907

Summary: Cannot open Packages index using db3
Product: [Retired] Red Hat Linux Reporter: Dave Johnson <johnsond>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED NOTABUG QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-02-17 16:09:52 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 Dave Johnson 2004-02-16 23:16:42 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)
Gecko/20031114

Description of problem:
When attempting to install, query, or otherwise interact with the RPM
database using RPM, we get the following errors:

#rpm -Uvh ...
rpmdb: /var/lib/rpm/Packages: unexpected file type or formaterror:
cannot open Packages index using db3 - Invalid argument (22)error:
cannot open Packages database in /var/lib/rpm

#rpm --rebuilddb
rpmdb: /var/lib/rpm/Packages: unexpected file type or formaterror:
cannot open Packages index

The permissions of /var/lib/rpm are identical to a working system. 
Removing the /var/lib/rpm/__db* lock files has no effect (as is
probably expected).  The 'file' utility reports that the Packages file
is "data".

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

How reproducible:
Didn't try

Steps to Reproduce:
We're not sure how the database got into this state, so we're not sure
how to reproduce.

Additional info:

Comment 1 Jeff Johnson 2004-02-17 16:09:52 UTC
EINVAL during open is usually the new fangled O_DIRECT
kernel interpretation that breaks rpm.

You need to boot an older, 2.4.x kernel, upgrade to
rpm-4.2-1 from ftp.rpm.org, then reboot the kernel that you
are running.

Reopen this bug if that does not fix.