Bug 444241 - when RPM database is locked, Yum Traceback
Summary: when RPM database is locked, Yum Traceback
Status: CLOSED DUPLICATE of bug 495087
Alias: None
Product: Fedora
Classification: Fedora
Component: yum   
(Show other bugs)
Version: 9
Hardware: All Linux
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
: 443277 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2008-04-25 22:44 UTC by Martin Jürgens
Modified: 2014-01-21 23:02 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-04-22 18:00:41 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Martin Jürgens 2008-04-25 22:44:08 UTC
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
  File "/usr/share/yum-cli/cli.py", line 182, in getOptionsConfig
  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,
  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 10:11:32 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:

Comment 2 Martin Jürgens 2008-05-27 16:47:07 UTC
Hm I am currently not able to reproduce it. Has this been fixed?

Comment 3 Jan Hutař 2008-08-06 13:26:45 UTC
I have tried to install some packages and on another terminal ran `yum search libcurl` and AFAICT it works.


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 13:49:45 UTC
 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 13:51:27 UTC
 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 15:46:08 UTC
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 21:26:32 UTC
*** Bug 443277 has been marked as a duplicate of this bug. ***

Comment 8 Christopher Beland 2009-04-22 18:00:41 UTC
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.