Bug 91935 - rpm commands randomly fail, and keep failing then, wihen using NPTL.
rpm commands randomly fail, and keep failing then, wihen using NPTL.
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
9
athlon Linux
medium Severity high
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-05-29 20:32 EDT by Carlo Wood
Modified: 2007-04-18 12:54 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-06-24 17:34:52 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 of strace rpm. (559.33 KB, text/plain)
2003-06-04 06:06 EDT, Carlo Wood
no flags Details

  None (edit)
Description Carlo Wood 2003-05-29 20:32:38 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
Any rpm or rpmbuild command can suddenly give:

>rpm -q rpm
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

Running 'db_recover' in /var/lib/rpm
does not change this, running 'rpm --rebuilddb' (using
the trick below, thus successfully) does not fix this.

I had this once before, and it went away after a reboot and
possibly other things - I can't remember.  Just now it happened
again when I tried to install:
/usr/src/rawhide>rpm -ihv glibc-2.3.2-41.src.rpm
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
warning: glibc-2.3.2-41.src.rpm: V3 DSA signature: NOKEY, key ID 897da07a
   1:glibc                  ########################################### [100%]
/usr/src/rawhide>rpm -qa
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
no packages
/usr/src/rawhide>cd ../redhat/SPECS
/usr/src/redhat/SPECS>rpmbuild -bp glibc.spec
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

etc.

My trick to run 'rpm --rebuilddb', or any other rpm
command that I needed is to use LD_ASSUME_KERNEL=2.2.5.
Ie:

>LD_ASSUME_KERNEL=2.2.5 rpm -qa
fileutils-4.1.9-11
functions-4-2
automake-1.7.2-5
...etc

and

/var/lib/rpm>LD_ASSUME_KERNEL=2.2.5 rpm --rebuilddb
/var/lib/rpm>

The conclusing is that there is a problem
with rpm and the new threading library.





Version-Release number of selected component (if applicable):
rpm-4.2-0.69, glibc-2.3.2-27.9, db4-4.0.14-20

How reproducible:
Sometimes

Steps to Reproduce:
1. See description :/
2.
3.
    

Additional info:
Comment 1 Carlo Wood 2003-06-04 06:06:48 EDT
Created attachment 92133 [details]
Output of strace rpm.
Comment 2 Carlo Wood 2003-06-04 06:10:49 EDT
Was this reproduced yet?

I am currently having this problem ALWAYS.
rpm really needs fixing.

I attached an strace of:

/usr/src/RedHat>strace -ttT -ff -o rpmout rpm -i glibc-2.3.2-27.9.src.rpm
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
warning: glibc-2.3.2-27.9.src.rpm: V3 DSA signature: NOKEY, key ID db42a60e

Note that 'rpm' calls:

select(0, NULL, NULL, NULL, {6, 0})

which doesn't look right.
Comment 3 Jeff Johnson 2003-06-24 17:34:52 EDT
This problem is fixed in rpm-4.2 (for Red Hat 9 with NPTL)
or rpm-4.1.1 (for Red Hat 8.0 w/o NPTL) packages at
    ftp://ftp.rpm.org/pub/rpm/dist/rpm-x.y.z

Quick fix is to do
    rm -f /var/lib/rpm/__db*
to remove stale locks left from missed SIGPIPE.

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