Bug 444241 - when RPM database is locked, Yum Traceback
when RPM database is locked, Yum Traceback
Status: CLOSED DUPLICATE of bug 495087
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
9
All Linux
low Severity low
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
: 443277 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-25 18:44 EDT by Martin Jürgens
Modified: 2014-01-21 18:02 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-22 14:00:41 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 Martin Jürgens 2008-04-25 18:44:08 EDT
Description of problem:
When the RPM database is locked, Yum prints an error and does some traceback:

$ LC_ALL=C yum search libcurl
Loaded plugins: refresh-packagekit
error: cannot get shared lock on /var/lib/rpm/Packages
error: cannot open Packages index using db3 - Operation not permitted (1)
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 241, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 96, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 182, in getOptionsConfig
    disabled_plugins=self.optparser._splitArg(opts.disableplugins))
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 180, in _getConfig
    self._conf = config.readMainConfig(startupconf)
  File "/usr/lib/python2.5/site-packages/yum/config.py", line 735, in readMainConfig
    yumvars['releasever'] = _getsysver(startupconf.installroot,
startupconf.distroverpkg)
  File "/usr/lib/python2.5/site-packages/yum/config.py", line 802, in _getsysver
    idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed


Should probably exit gracefully.
Comment 1 Bug Zapper 2008-05-14 06:11:32 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 2 Martin Jürgens 2008-05-27 12:47:07 EDT
Hm I am currently not able to reproduce it. Has this been fixed?
Comment 3 Jan Hutař 2008-08-06 09:26:45 EDT
Hello,
I have tried to install some packages and on another terminal ran `yum search libcurl` and AFAICT it works.

yum-3.2.17-2.fc9.noarch

I think this was fixed and could be closed - or better: is there a way how to lock rpmdb for a longer time so I can test more?
Comment 4 James Antill 2008-08-06 09:49:45 EDT
 I don't think yum search is a good test, as that gets a read-only lock on the rpmdb.

 You probably want to do what initActionTs() does in yum.depsolver, and then run a package install in another window. But I'm not 100% sure.
Comment 5 James Antill 2008-08-06 09:51:27 EDT
 Of course now I see the original problem was with search, so ignore that part of my comment :).
Comment 6 Jan Hutař 2008-08-06 11:46:08 EDT
Hmm,
when I do:

>>> import yum, os, sys
>>> my = yum.YumBase()
>>> my.initActionTs()

I'm still able to install/remove package (on another terminal), so it seems to me the lock is not "hard". Or have I done something incorrect?
Comment 7 James Antill 2008-08-07 17:26:32 EDT
*** Bug 443277 has been marked as a duplicate of this bug. ***
Comment 8 Christopher Beland 2009-04-22 14:00:41 EDT
Efforts to diagnose and fix this problem are ongoing at bug 495087, which has more detailed information you may find to be of use.  Thanks for the report!

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

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