Bug 430108

Summary: exception when trying to run software updater
Product: Red Hat Enterprise Linux 5 Reporter: Neil Lawton <lawtonn>
Component: rpmAssignee: packaging-team-maint
Status: CLOSED NEXTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: low    
Version: 5.1CC: axismario, azaryahyisrael, cwickert, darren.isen, james.antill, pmatilai, richpk21
Target Milestone: rc   
Target Release: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-15 06:57:15 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Dump File
none
The log of all the programs none

Description Neil Lawton 2008-01-24 10:56:11 EST
Description of problem:


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


How reproducible:
software updater

Steps to Reproduce:
1. run software updater
2.
3.
  
Actual results:
exception occurred
Component: Software Updater
Summary: TBf4e8d30c config.py:657:_getsysver:TypeError: rpmdb open failed

Traceback (most recent call last):
  File "/usr/sbin/pup", line 668, in ?
    main()
  File "/usr/sbin/pup", line 661, in main
    pup = PackageUpdater()
  File "/usr/sbin/pup", line 90, in __init__
    GraphicalYumBase.__init__(self, False)
  File "/usr/lib/python2.4/site-packages/pirut/__init__.py", line 122, in __init__
    plugin_types=(yum.plugins.TYPE_CORE,))
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 125, in
doConfigSetup
    self.conf = config.readMainConfig(startupconf)
  File "/usr/lib/python2.4/site-packages/yum/config.py", line 598, in readMainConfig
    yumvars['releasever'] = _getsysver(startupconf.installroot,
startupconf.distroverpkg)
  File "/usr/lib/python2.4/site-packages/yum/config.py", line 657, in _getsysver
    idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed

Local variables in innermost frame:
installroot: /
ts: <rpmUtils.transaction.TransactionWrapper instance at 0x8578e0c>
distroverpkg: redhat-release

Expected results:


Additional info:
Comment 1 Neil Lawton 2008-01-24 10:56:11 EST
Created attachment 292802 [details]
Dump File
Comment 2 Neil Lawton 2008-01-24 11:22:42 EST
I was able to get the software update to run by doing the following:
cd /var/lib/rpm
rm *db.00*

then I was able to run the software updater.
rhn.redhat.com/rhn/systems  reports this server as pending actions required.
Comment 3 Neil Lawton 2008-01-24 12:16:17 EST
uname -r still reports the kernel as 2.6.18-53.el5
and the system still thinks that there is an update to install
Comment 4 Emanuele Bellini 2009-02-28 13:21:58 EST
I have the same problem: all the packet managing programs give the log I'm going to attach. I'm stuck.
I think this is a clone, but I don't know how to merge it with this one; it's also very old:

https://bugzilla.redhat.com/show_bug.cgi?id=219579
Comment 5 Emanuele Bellini 2009-02-28 13:27:21 EST
I forgot: I have Fedora 10. I don't know which versions I have to look for, I have:

yum-3.2.21-2.fc10.noarch

Another detail: I was looking for a packet in the "Add/Remove software" window when I stopped the search and a message box appeared saying that all the packages weren't modified. Who asked it? I don't know. The bug started there.
Comment 6 Emanuele Bellini 2009-02-28 13:32:08 EST
What, this thread is open since a year ago? And on a RHEL distro? I hope someone answers me, otherwise... I hope!
Comment 7 Emanuele Bellini 2009-02-28 13:34:53 EST
Created attachment 333616 [details]
The log of all the programs
Comment 8 Emanuele Bellini 2009-03-01 09:05:45 EST
I know how to reproduce the issue, but it's a gnome-packagekit one, yum's got nothing to do with that in my case. This is the new bug trace:

https://bugzilla.redhat.com/show_bug.cgi?id=487924
Comment 9 richpk21 2009-03-11 09:52:17 EDT
when trying to add software from repository in fedora 10:

Error Type: <type 'exceptions.TypeError'>
Error Value: rpmdb open failed
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 2314, in <module>
    main()
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 2310, in main
    backend = PackageKitYumBackend('', lock=True)
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 182, in __init__
    self.yumbase = PackageKitYumBase(self)
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 2253, in __init__
    self.repos.confirm_func = self._repo_gpg_confirm
  File : /usr/lib/python2.5/site-packages/yum/__init__.py, line 589, in <lambda>
    repos = property(fget=lambda self: self._getRepos(),
  File : /usr/lib/python2.5/site-packages/yum/__init__.py, line 395, in _getRepos
    self._getConfig() # touch the config class first
  File : /usr/lib/python2.5/site-packages/yum/__init__.py, line 192, in _getConfig
    self._conf = config.readMainConfig(startupconf)
  File : /usr/lib/python2.5/site-packages/yum/config.py, line 774, in readMainConfig
    yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
  File : /usr/lib/python2.5/site-packages/yum/config.py, line 844, in _getsysver
    idx = ts.dbMatch('provides', distroverpkg)
Comment 10 richpk21 2009-03-11 09:53:37 EDT
When trying to update system:

Error Type: &lt;type &apos;exceptions.TypeError&apos;&gt;
Error Value: rpmdb open failed
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 2314, in &lt;module&gt;
    main()
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 2310, in main
    backend = PackageKitYumBackend(&apos;&apos;, lock=True)
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 182, in __init__
    self.yumbase = PackageKitYumBase(self)
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 2253, in __init__
    self.repos.confirm_func = self._repo_gpg_confirm
  File : /usr/lib/python2.5/site-packages/yum/__init__.py, line 589, in &lt;lambda&gt;
    repos = property(fget=lambda self: self._getRepos(),
  File : /usr/lib/python2.5/site-packages/yum/__init__.py, line 395, in _getRepos
    self._getConfig() # touch the config class first
  File : /usr/lib/python2.5/site-packages/yum/__init__.py, line 192, in _getConfig
    self._conf = config.readMainConfig(startupconf)
  File : /usr/lib/python2.5/site-packages/yum/config.py, line 774, in readMainConfig
    yumvars[&apos;releasever&apos;] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
  File : /usr/lib/python2.5/site-packages/yum/config.py, line 844, in _getsysver
    idx = ts.dbMatch(&apos;provides&apos;, distroverpkg)
Comment 11 richpk21 2009-03-11 09:56:29 EDT
When refresh button is clicked: ( same result shown in comment #9 )
Comment 12 James Antill 2009-03-25 01:38:02 EDT
This means the rpmdb is locked by something else ... but we can't reproduce this. Can someone run:

# cd /var/lib/rpm
# /usr/lib/rpm/rpmdb_stat -c

...as I've seen bugs where rpm runs out of locks.
Comment 13 Emanuele Bellini 2009-03-25 17:24:38 EDT
I forgot to say that my issue is different, I've posted my bug here:

https://bugzilla.redhat.com/show_bug.cgi?id=487924

and when I reboot the system I can use the various package managers.
Sorry for being grumpy, but I was worried when I couldn't install a program I was needing...!
Comment 14 Christoph Wickert 2009-05-12 17:47:09 EDT
(In reply to comment #12)
> This means the rpmdb is locked by something else ... but we can't reproduce
> this. Can someone run:
> 
> # cd /var/lib/rpm
> # /usr/lib/rpm/rpmdb_stat -c

Sure:

# /usr/lib/rpm/rpmdb_stat -c
31	Last allocated locker ID
0x7fffffff	Current maximum unused locker ID
5	Number of lock modes
1000	Maximum number of locks possible
1000	Maximum number of lockers possible
1000	Maximum number of lock objects possible
3	Number of current locks
4	Maximum number of locks at any one time
3	Number of current lockers
4	Maximum number of lockers at any one time
3	Number of current lock objects
4	Maximum number of lock objects at any one time
2156	Total number of locks requested
2152	Total number of locks released
0	Total number of locks upgraded
22	Total number of locks downgraded
0	Lock requests not available due to conflicts, for which we waited
0	Lock requests not available due to conflicts, for which we did not wait
0	Number of deadlocks
0	Lock timeout value
0	Number of locks that have timed out
0	Transaction timeout value
0	Number of transactions that have timed out
344KB	The size of the lock region
0	The number of region locks that required waiting (0%)
Comment 15 Richard Hughes 2009-06-03 05:31:15 EDT
*** Bug 498328 has been marked as a duplicate of this bug. ***
Comment 16 axismario 2009-11-17 19:00:16 EST
Error Type: <class 'yum.Errors.ConfigError'>
Error Value: Error accessing file for config file:///etc/yum.conf
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 2828, in <module>
    main()
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 2824, in main
    backend = PackageKitYumBackend('', lock=True)
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 196, in __init__
    self.yumbase = PackageKitYumBase(self)
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 2767, in __init__
    self.repos.confirm_func = self._repo_gpg_confirm
  File : /usr/lib/python2.6/site-packages/yum/__init__.py, line 643, in <lambda>
    repos = property(fget=lambda self: self._getRepos(),
  File : /usr/lib/python2.6/site-packages/yum/__init__.py, line 448, in _getRepos
    self.conf # touch the config class first
  File : /usr/lib/python2.6/site-packages/yum/__init__.py, line 649, in <lambda>
    conf = property(fget=lambda self: self._getConfig(),
  File : /usr/lib/python2.6/site-packages/yum/__init__.py, line 217, in _getConfig
    startupconf = config.readStartupConfig(fn, root)
  File : /usr/lib/python2.6/site-packages/yum/config.py, line 763, in readStartupConfig
    confpp_obj = ConfigPreProcessor(configfile)
  File : /usr/lib/python2.6/site-packages/yum/parser.py, line 86, in __init__
    fo = self._pushfile( url )
  File : /usr/lib/python2.6/site-packages/yum/parser.py, line 195, in _pushfile
    'Error accessing file for config $s' $ (absurl)

I HAVE NO IDEA FOR WHAT THIS IS, IT COMES EVERYTIME I TRY TO USE THE ADD/REMOVE SOFTWARE TOOL ON THE ADMINISTRATOR IN FEDORA 10
Comment 17 Panu Matilainen 2013-03-15 06:57:15 EDT
Ignoring all the Fedora related comments which dont belong to this bug at all...

Rebasing rpm to a newer Berkeley DB version which would allow automatic stale lock cleanup is not something we can do in RHEL-5, manually clearing the environment is required if it gets stuck eg due to running out of locks. In RHEL-6 stale locks are automatically cleaned so rpmdb open failures are rarer. Also yum shouldn't expect rpmdb open always succeeds, but IIRC this too is fixed in newer versions.