Bug 249990 - setroubleshoot keeps locking the rpm database
setroubleshoot keeps locking the rpm database
Status: CLOSED DUPLICATE of bug 246564
Product: Fedora
Classification: Fedora
Component: setroubleshoot (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: John Dennis
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-28 22:11 EDT by Edward Rudd
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-23 12:27:54 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 Edward Rudd 2007-07-28 22:11:41 EDT
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
/usr/lib/python2.5/site-packages/rpm/_rpmmodule.so
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):
1.9.4-2.fc7

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
happening.
Comment 1 John Dennis 2007-08-23 12:27:54 EDT

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