Bug 110108

Summary: Latest glibc update still breaks rpm w/ Fedora kernel
Product: [Retired] Red Hat Linux Reporter: suson
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED CURRENTRELEASE QA Contact: Mike McLean <mikem>
Severity: high Docs Contact:
Priority: high    
Version: 9CC: drepper, mitr
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: 2003-11-19 14:44:40 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 suson 2003-11-14 21:06:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031023

Description of problem:
The specified version of glibc still breaks ANY use of the rpm command
with the following error:
rpmdb: unable to join the environment
rpmdb: write: 0xbfffc590, 8192: Invalid argument
error: db4 error(22) from dbenv->open: Invalid argument
error: cannot open Packages index using db3 - Invalid argument (22)
error: cannot open Packages database in /var/lib/rpm

I've read all of the comments on bug 109904, and I believe that based
on comment #19 on this bug, the new glibc SHOULD work w/ Fedora's
kernel (kernel-smp-2.4.22-1.2115.nptl).

Any and all information you might need, please just ask, and I will
provide ASAP. Am very willing to work to solve this problem.

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

How reproducible:
Always

Steps to Reproduce:
1. Install and boot a current Fedora kernel (e.g.
kernel-smp-2.4.22-1.2115.nptl)
2. Install the latest glibc update
3. Execute rpm -qa
    

Actual Results:  rpmdb: unable to join the environment
rpmdb: write: 0xbfffc590, 8192: Invalid argument
error: db4 error(22) from dbenv->open: Invalid argument
error: cannot open Packages index using db3 - Invalid argument (22)
error: cannot open Packages database in /var/lib/rpm
no packages


Expected Results:  A list of all installed packages should have been
provided

Additional info:

Comment 1 Ulrich Drepper 2003-11-18 06:59:17 UTC
Run

  ldd /bin/rpm

or basically every other binary.  You should see that it is not the
NPTL libc (in /lib/tls) which is used, but the one in /lib/i686.  This
uses LinuxThreads.  But rpm requires, I think, NPTL all the time due
to t he synchronization primitives it is using.  First, show the ldd
output.


Comment 2 suson 2003-11-18 20:25:32 UTC
ldd output follows:

[root@mysys root]# ldd /bin/rpm
        librpm-4.2.so => /usr/lib/librpm-4.2.so (0x40031000)
        librpmdb-4.2.so => /usr/lib/librpmdb-4.2.so (0x40085000)
        librpmio-4.2.so => /usr/lib/librpmio-4.2.so (0x40164000)
        libpopt.so.0 => /usr/lib/libpopt.so.0 (0x401c3000)
        libelf.so.1 => /usr/lib/libelf.so.1 (0x401cb000)
        libpthread.so.0 => /lib/i686/libpthread.so.0 (0x401db000)
        librt.so.1 => /lib/i686/librt.so.1 (0x4022b000)
        libbz2.so.1 => /usr/lib/libbz2.so.1 (0x4023d000)
        libc.so.6 => /lib/i686/libc.so.6 (0x4024c000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Note however that RPM works under these cirumstances. This is w/
Fedora kernel and glibc-2.3.2-27.9.

Following is w/ Fedora kernel and glibc-2.3.2-27.9.7 :

[root@mysys root]# ldd /bin/rpm
        librpm-4.2.so => /usr/lib/librpm-4.2.so (0x40030000)
        librpmdb-4.2.so => /usr/lib/librpmdb-4.2.so (0x40085000)
        librpmio-4.2.so => /usr/lib/librpmio-4.2.so (0x40164000)
        libpopt.so.0 => /usr/lib/libpopt.so.0 (0x401c2000)
        libelf.so.1 => /usr/lib/libelf.so.1 (0x401ca000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0x401da000)
        librt.so.1 => /lib/tls/librt.so.1 (0x401e8000)
        libbz2.so.1 => /usr/lib/libbz2.so.1 (0x401fb000)
        libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Note the change! W/ the 2nd ldd output, rpm no longer works...

Comment 3 Ulrich Drepper 2003-11-18 21:28:57 UTC
Well, this is in any case something for RPM.  I'm reassigning.  I'll
let the RPM maintainer decide whether this is supported or not.

Comment 4 Arjan van de Ven 2003-11-18 21:37:33 UTC
smells like the rpm O_DIRECT bug....


Comment 5 suson 2003-11-18 21:43:49 UTC
While I certainly don't have information to say that you are incorrect
Mr. Drepper, I find it puzzling that doing nothing but updating my
glibc broke RPM. Was there some bug fixed that RPM was depending on,
or something similiar?

And is there some known bug (O_DIRECT) in the distros RPM?

Comment 6 suson 2003-11-18 21:50:43 UTC
Am still very anxious/willing to help solve this problem!

Comment 7 Ulrich Drepper 2003-11-18 21:54:00 UTC
There probably is nothing to do but use a different rpm or get the
current glibc from FC1.  Wait for jbj to reply.

Comment 8 Jeff Johnson 2003-11-19 14:44:40 UTC
Yes, EINVAL during dbenv open is the O_DIRECT change in the kernel.

Fix by installing rpm-4.2-1 or later, available in Raw Hide, or
at ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.2.x.

Comment 9 suson 2003-11-19 18:23:56 UTC
It worked great! Many thanks to all.