Bug 213892 - RPM database sometimes works only on normal accounts?
Summary: RPM database sometimes works only on normal accounts?
Keywords:
Status: CLOSED DUPLICATE of bug 206275
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 6
Hardware: i686
OS: Linux
medium
high
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-11-03 17:01 UTC by George Panagopoulos
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-07-17 19:57:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Normal user (55.77 KB, application/octet-stream)
2006-11-03 17:01 UTC, George Panagopoulos
no flags Details
Root (48.10 KB, application/octet-stream)
2006-11-03 17:02 UTC, George Panagopoulos
no flags Details

Description George Panagopoulos 2006-11-03 17:01:12 UTC
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 17:01:12 UTC
Created attachment 140276 [details]
Normal user

Comment 2 George Panagopoulos 2006-11-03 17:02:52 UTC
Created attachment 140278 [details]
Root

Comment 3 Jeff Johnson 2006-11-04 04:28:55 UTC
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 18:48:44 UTC
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 18:54:07 UTC
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 19:57:35 UTC

*** 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.