Bug 89662 - rpm always fails under recent 2.5 kernels
rpm always fails under recent 2.5 kernels
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
9
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-04-25 13:38 EDT by Bryan O'Sullivan
Modified: 2007-04-18 12:53 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-04-30 09:37:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 15:36 EDT, Bryan O'Sullivan
no flags Details
strace output from "strace -f -o /tmp/xxx rpm -qavv" (32.56 KB, text/plain)
2003-04-29 15:36 EDT, Bryan O'Sullivan
no flags Details

  None (edit)
Description Bryan O'Sullivan 2003-04-25 13:38:03 EDT
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):

rpm-4.2-0.69

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 14:34:57 EDT
I suspect that this is the new-fangled (and incompatible!)
semantics for O_DIRECT.

Try rpm-4.2-1 packages at
    ftp://ftp.rpm.org/pub/rpm/test-4.2

Does that work with kernel-2.5? If so, then it's O_DIRECT.
Comment 2 Bryan O'Sullivan 2003-04-29 14:43:13 EDT
The new package doesn't help.  The error is the same as under the RH9 rpm.
Comment 3 Jeff Johnson 2003-04-29 14:55:00 EDT
Hmmm, can you attach strace output here?

    strace -f -o /tmp/xxx rpm -qavv
Comment 4 Bryan O'Sullivan 2003-04-29 15:36:21 EDT
Created attachment 91399 [details]
Output from "strace -f -o /tmp/xxx rpm -qavv"
Comment 5 Bryan O'Sullivan 2003-04-29 15:36:59 EDT
Created attachment 91400 [details]
strace output from "strace -f -o /tmp/xxx rpm -qavv"
Comment 6 Bryan O'Sullivan 2003-04-29 15:41:56 EDT
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 15:50:23 EDT
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 15:56:58 EDT
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 16:00:46 EDT
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 18:02:12 EDT
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.