Bug 213892 - RPM database sometimes works only on normal accounts?
RPM database sometimes works only on normal accounts?
Status: CLOSED DUPLICATE of bug 206275
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
6
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Paul Nasrat
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-03 12:01 EST by George Panagopoulos
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-07-17 15:57: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)
Normal user (55.77 KB, application/octet-stream)
2006-11-03 12:01 EST, George Panagopoulos
no flags Details
Root (48.10 KB, application/octet-stream)
2006-11-03 12:02 EST, George Panagopoulos
no flags Details

  None (edit)
Description George Panagopoulos 2006-11-03 12:01:12 EST
If I login to my normal account and I write the command rpm -qi gcc for example
I get what I should get. But when I login to root with su the same thing fails
if I first do something with yum. The command rpm -qivv gcc gives me the following:
D: opening  db environment /var/lib/rpm/Packages joinenv
D: opening  db index       /var/lib/rpm/Packages rdonly mode=0x0
D: locked   db index       /var/lib/rpm/Packages
D: opening  db index       /var/lib/rpm/Name rdonly mode=0x0

and gets stucked. It is very strange that rpm manages to open Packages but not
Name. Does anyone have an idea what is going on?

To fix this then I must restart my computer.

I've included two strace outputs. One for normal user and one for root user.
Comment 1 George Panagopoulos 2006-11-03 12:01:12 EST
Created attachment 140276 [details]
Normal user
Comment 2 George Panagopoulos 2006-11-03 12:02:52 EST
Created attachment 140278 [details]
Root
Comment 3 Jeff Johnson 2006-11-03 23:28:55 EST
You likely have stale locks. Fix by doing (also done during reboot):
    rm -f /var/lib/rpm/__db*

WORKSFORME
Comment 4 George Panagopoulos 2006-11-07 13:48:44 EST
Yes I think that fixes the problem. But what are these files and why do they
cause this problem?
Comment 5 Jeff Johnson 2006-12-03 13:54:07 EST
Segafualts and loss of data are likely due to removing an rpmdb environment
without correcting other problems in the rpmdb.

FYI: Most rpmdb "hangs" are now definitely fixed by purging stale read locks when opening
a database environment in rpm-4.4.8-0.4. There's more todo, but I'm quite sure that a
large class of problems with symptoms of "hang" are now corrected.

Detecting damage by verifying when needed is well automated in rpm-4.4.8-0.4. Automatically 
correcting all possible damage is going to take more work, but a large class of problems is likely
already fixed in rpm-4.4.8-0.4 as well.

UPSTREAM
Comment 6 Panu Matilainen 2007-07-17 15:57:35 EDT

*** This bug has been marked as a duplicate of 206275 ***

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