Bug 89662 - rpm always fails under recent 2.5 kernels
Summary: rpm always fails under recent 2.5 kernels
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm   
(Show other bugs)
Version: 9
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
Depends On:
TreeView+ depends on / blocked
Reported: 2003-04-25 17:38 UTC by Bryan O'Sullivan
Modified: 2007-04-18 16:53 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-04-30 13:37:00 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Output from "strace -f -o /tmp/xxx rpm -qavv" (381 bytes, text/plain)
2003-04-29 19:36 UTC, Bryan O'Sullivan
no flags Details
strace output from "strace -f -o /tmp/xxx rpm -qavv" (32.56 KB, text/plain)
2003-04-29 19:36 UTC, Bryan O'Sullivan
no flags Details

Description Bryan O'Sullivan 2003-04-25 17:38:03 UTC
Description of problem:

I'm running vanilla Red Hat 9, with the 2.5.68-mm2 kernel.  All rpm commands run
under this kernel fail with the following error:

~ # time rpm -q autofs
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm
package autofs is not installed
real    0m18.035s
user    0m0.010s
sys     0m0.006s

As you can see, it takes a while for RPM to give up, but it does indeed give up.

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


How reproducible:

Every time.

Steps to Reproduce:

1. Install RH9.
2. Build and install a recent 2.5 kernel.
3. Run any rpm command, such as "rpm -q rpm".
Actual results:

See the error message above.

Expected results:

It should "just work".

Additional info:

I already knew about this problem, but there's no bugzilla bug tracking it.  The
workaround is to set the LD_ASSUME_KERNEL environment variable to 2.2.5 before
running rpm.

Comment 1 Jeff Johnson 2003-04-29 18:34:57 UTC
I suspect that this is the new-fangled (and incompatible!)
semantics for O_DIRECT.

Try rpm-4.2-1 packages at

Does that work with kernel-2.5? If so, then it's O_DIRECT.

Comment 2 Bryan O'Sullivan 2003-04-29 18:43:13 UTC
The new package doesn't help.  The error is the same as under the RH9 rpm.

Comment 3 Jeff Johnson 2003-04-29 18:55:00 UTC
Hmmm, can you attach strace output here?

    strace -f -o /tmp/xxx rpm -qavv

Comment 4 Bryan O'Sullivan 2003-04-29 19:36:21 UTC
Created attachment 91399 [details]
Output from "strace -f -o /tmp/xxx rpm -qavv"

Comment 5 Bryan O'Sullivan 2003-04-29 19:36:59 UTC
Created attachment 91400 [details]
strace output from "strace -f -o /tmp/xxx rpm -qavv"

Comment 6 Bryan O'Sullivan 2003-04-29 19:41:56 UTC
In case it wasn't clear, both attachments are from the rpm-4.2-1 package that
Jeff referred to, not the regular Red Hat RPM package.

The specific kernel I'm running is 2.5.68-mm2.  For glibc, it's
glibc-2.3.2-27.9, and for db4, it's db4-4.0.14-20.

Comment 7 Jeff Johnson 2003-04-29 19:50:23 UTC
Odd. I don't see any attempt to open __db.001.

23174 stat64("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
23174 stat64("/var/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
23174 stat64("/var/lib/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
23174 stat64("/var/lib/rpm", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
23174 access("/var/lib/rpm", W_OK)      = 0
23174 access("/var/lib/rpm/__db.001", F_OK) = 0
23174 access("/var/lib/rpm/Packages", F_OK) = 0
23174 open("/usr/share/locale/locale.alias", O_RDONLY) = 3
23174 fstat64(3, {st_mode=S_IFREG|0644, st_size=2601, ...}) = 0
... error message here ...

What happens if you do
    rm -f /var/lib/rpm/__db*

Comment 8 Bryan O'Sullivan 2003-04-29 19:56:58 UTC
Is that a safe operation?  This is my work desktop machine, and I don't want to
destroy anything important.

Comment 9 Jeff Johnson 2003-04-29 20:00:46 UTC
Removing /var/lib/rpm/__db* safe? Yes, safe on quiescent
machine. The files contain lock names, and supply a lookaside
readonly cache.

If you're worried, save a copy of /var/lib/rpm/Packages
right now. As long as you have that, I can fix anything.

Comment 10 Bryan O'Sullivan 2003-04-29 22:02:12 UTC
The __db.001 file was empty.  With it gone, rpm -qa works fine for me.

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