Bug 253679 - setroubleshoot prevents RPM from running a --import
setroubleshoot prevents RPM from running a --import
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-08-21 02:53 EDT by Pete Graner
Modified: 2007-11-30 17:12 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-23 12:33:51 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 Pete Graner 2007-08-21 02:53:03 EDT
Description of problem: setroubleshootd is holding the RPM Packages DB open, not
allowing the use of the rpm command.


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

setroubleshoot-1.9.4-2.fc7

I noticed that setroubleshoot was preventing rpm from running when trying to
import a gpg key with rpm.

[root@zorak ~]# rpm --import http://freshrpms.net/RPM-GPG-KEY-freshrpms
warning: cannot get exclusive lock on /var/lib/rpm/Packages

What is holding the lock?

[root@zorak ~]# lsof /var/lib/rpm/Packages 
COMMAND    PID USER   FD   TYPE DEVICE     SIZE    NODE NAME
setrouble 2098 root   10rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   13rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   16rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   20rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   23rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   26rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   29rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   32rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   35rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   38rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   41rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   44rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   47rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   50rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   53rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   56rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   59rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   62rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   65rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   68rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   71rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   74rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   77rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   80rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   83rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   86rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   89rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   92rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   95rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root   98rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root  101rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root  104rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages
setrouble 2098 root  107rR  REG  253,0 48738304 6219850 /var/lib/rpm/Packages

So I kill it:

[root@zorak ~]# /etc/init.d/setroubleshoot stop
Stopping setroubleshootd:                                  [  OK  ]

Then retry the key import:

[root@zorak ~]# rpm --import http://freshrpms.net/RPM-GPG-KEY-freshrpms

It succeeds. 

I'm not sure how it got into that state, but however it got there is 100% wrong.
A troubleshooting daemon should never do that.

Starting the service back up works as expected.
Comment 1 John Dennis 2007-08-23 12:33:51 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.