Bug 249990 - setroubleshoot keeps locking the rpm database
Summary: setroubleshoot keeps locking the rpm database
Status: CLOSED DUPLICATE of bug 246564
Alias: None
Product: Fedora
Classification: Fedora
Component: setroubleshoot
Version: 7
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: John Dennis
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2007-07-29 02:11 UTC by Edward Rudd
Modified: 2007-11-30 22:12 UTC (History)
0 users

Clone Of:
Last Closed: 2007-08-23 16:27:54 UTC

Attachments (Terms of Use)

Description Edward Rudd 2007-07-29 02:11:41 UTC
Description of problem:
periodically when I try to install an RPM package, or work with RPM, rpm will
fail with errors like this

rpmdb: Lock table is out of available locker entries
rpmdb: Unknown locker ID: ae8
error: db4 error(22) from db->close: Invalid argument
error: cannot open Packages index using db3 - Cannot allocate memory (12)
error: cannot open Packages database in /var/lib/rpm

when I try to look at who's locked the RPM database using fuser I receive
/var/lib/rpm/Basenames:  5799
/var/lib/rpm/__db.001:  5799m
/var/lib/rpm/__db.002:  5799m
/var/lib/rpm/__db.003:  5799m
/var/lib/rpm/Name:    5799
/var/lib/rpm/Packages:  5799
/var/lib/rpm/Pubkeys:  5799

which, in this case 5799 is owned by setroubleshoot (python)

running lsof -p 5799 shows LOTS of access by setroubleshoot to the rpm db,
including around 32 entries each for Packages,Basenames, Pubkeys, Name, as well
as the DB transaction files __db.00[1-3]

-- lsof output --
setrouble 5799 root  mem    REG      253,0   115056 1026433
setrouble 5799 root  mem    REG      253,0   450560  786481 /var/lib/rpm/__db.003
setrouble 5799 root  mem    REG      253,0  1318912  786444 /var/lib/rpm/__db.002
setrouble 5799 root  mem    REG      253,0    24576  786440 /var/lib/rpm/__db.001
setrouble 5799 root    9r   REG      253,0 49958912  819258 /var/lib/rpm/Packages
setrouble 5799 root   11r   REG      253,0 10629120  819645 /var/lib/rpm/Basenames
setrouble 5799 root   12r   REG      253,0    12288  820384 /var/lib/rpm/Pubkeys
setrouble 5799 root   17r   REG      253,0    86016  819644 /var/lib/rpm/Name

In order to get my system sane again I have to stop setroubleshoot, and then
remove the __db.* transaction files and rebuild the rpmdb for good measure.:)

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

How reproducible:
frequently (not sure WHAT is causing it)

So much so that I had to disable setroubleshoot on my systems to stop it from

Comment 1 John Dennis 2007-08-23 16:27:54 UTC

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

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