Bug 102410 - rpm -qa as root fails
rpm -qa as root fails
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux Beta
Classification: Retired
Component: rpm (Show other bugs)
prebeta
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-08-14 17:25 EDT by Don Zickus
Modified: 2007-04-18 12:56 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-08-19 11:40:35 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)

  None (edit)
Description Don Zickus 2003-08-14 17:25:32 EDT
Description of problem:
I upgraded from RH9 to the beta version of linux-2.6 from
http://people.redhat.com/arjanv/2.5 using yum.  While playing around I noticed
when the command 'rpm -qa' is run as root it fails.  When run as a user it
succeeds.  

The failure message is :
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



Version-Release number of selected component (if applicable):
#rpm -qa|grep rpm
redhat-rpm-config-8.0.21-1
rpm-python-4.2-0.69
rpm-devel-4.2-0.69
rpm-build-4.2-0.69
rpm-4.2-0.69


How reproducible:
Very reproducible

Steps to Reproduce:
1. rpm -qa  (as root)
2.
3.
    
Actual results:
Fails with message listed above

Expected results:
list of all packages

Additional info:

I assumed the internal website for the 2.6 kernel had all the packages I needed
to run my system.  Perhaps I need to manually upgrade some other components?
Comment 1 Jeff Johnson 2003-08-19 08:50:52 EDT
Try doing
    rm -f /var/lib/rpm/__db*
Does that fix?
Comment 2 Don Zickus 2003-08-19 10:53:36 EDT
It doesn't fix the problem, but it does speed up the failure.  Instead of
waiting 18 seconds, it fails immediately.

>>>>>>>>>>>>>>>>>>>>>>>>>>
[root@studmuffin rpm]# time 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
 
real    0m18.019s
user    0m0.016s
sys     0m0.006s
[root@studmuffin rpm]# rm __db.001
rm: remove regular empty file `__db.001'? y
[root@studmuffin rpm]# time rpm -qa
rpmdb: write: 0xbfffc460, 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
 
real    0m0.045s
user    0m0.016s
sys     0m0.005s
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Comment 3 Jeff Johnson 2003-08-19 11:40:35 EDT
This is what I needed:
   rpmdb: write: 0xbfffc460, 8192: Invalid argument
The kernel folk have invented new semantics for O_DIRECT, breaking
rpm.

Fix is in rpm-4.2-1 packages at ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.2.x
Comment 4 Don Zickus 2003-08-19 12:38:11 EDT
Thanks a lot!! It seems to work fine now.  

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