Bug 528233 - yum tracebacks on sys check in config.py, when rpmdb can't be opened
Summary: yum tracebacks on sys check in config.py, when rpmdb can't be opened
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 529038 530174 532214 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-09 21:42 UTC by Clemens Eisserer
Modified: 2014-01-21 23:11 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-10-12 21:55:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Clemens Eisserer 2009-10-09 21:42:28 UTC
Description of problem:
My laptop died twice, one time during "yum update" and the second time during executing yum-complete-transaction.

When I now try to execute yum-complete-transaction, I get the following stack-trace:

[root@localhost ce]# yum-complete-transaction
rpmdb: Thread/process 1789/3086182080 failed: Thread died in Berkeley DB library
error: db4 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 -  (-30974)
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
  File "/usr/sbin/yum-complete-transaction", line 211, in <module>
    util = YumCompleteTransaction()
  File "/usr/sbin/yum-complete-transaction", line 118, in __init__
    self.main()
  File "/usr/sbin/yum-complete-transaction", line 137, in main
    opts = self.doUtilConfigSetup()
  File "/usr/share/yum-cli/utils.py", line 99, in doUtilConfigSetup
    self.conf
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 723, in <lambda>
    conf = property(fget=lambda self: self._getConfig(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 249, in _getConfig
    startupconf = config.readStartupConfig(fn, root)
  File "/usr/lib/python2.6/site-packages/yum/config.py", line 805, in readStartupConfig
    startupconf.releasever = _getsysver(startupconf.installroot, startupconf.distroverpkg)
  File "/usr/lib/python2.6/site-packages/yum/config.py", line 916, in _getsysver
    if sys.hexversion < 0x02050000:
NameError: global name 'sys' is not defined


Also kpackage-kit refuses to do any work, reporting:
Traceback (most recent call last): File "/usr/share/PackageKit/helpers/yum/yumBackend.py", line 2957, in __init__ self.repos.confirm_func = self._repo_gpg_confirm File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 717, in repos = property(fget=lambda self: self._getRepos(), File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 496, in _getRepos self.conf # touch the config class first File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 723, in conf = property(fget=lambda self: self._getConfig(), File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 249, in _getConfig startupconf = config.readStartupConfig(fn, root) File "/usr/lib/python2.6/site-packages/yum/config.py", line 805, in readStartupConfig startupconf.releasever = _getsysver(startupconf.installroot, startupconf.distroverpkg) File "/usr/lib/python2.6/site-packages/yum/config.py", line 916, in _getsysver if sys.hexversion 


Version-Release number of selected component (if applicable):
Rawhide, about ~1.10.09

How reproducible:
Only on my system, probably due to corrupted RPM database.

Comment 1 seth vidal 2009-10-09 21:48:28 UTC
your python install is so badly damaged that yum cannot even find 'sys'

So it cannot output the error that it can't open your rpmdb.

That's REALLY bad.

I don't think there's much we can do that but maybe tell you that you have to reinstall.

Comment 2 Clemens Eisserer 2009-10-10 10:52:37 UTC
Hmm, thats sad news :-/

I planned to switch from rawhide/i686 -> F12/amd64 anyway, so it could be worse.
Everything else still seems to work, I'll simply way until F12 is released and do a fresh install.

Thanks for your analysis, Clemens

Comment 3 James Antill 2009-10-10 14:13:56 UTC
No, it's (probably) not that bad ... config.py doesn't import sys. Copy and paste bug.

Comment 4 Clemens Eisserer 2009-10-10 16:56:39 UTC
Wonderful :)

After --rebuilddb and a restart, "yum update" works again without any problems.

Thanks, Clemens

Comment 5 seth vidal 2009-10-14 18:16:29 UTC
*** Bug 529038 has been marked as a duplicate of this bug. ***

Comment 6 seth vidal 2009-10-21 20:22:07 UTC
*** Bug 530174 has been marked as a duplicate of this bug. ***

Comment 7 John Mellor 2009-11-03 00:33:55 UTC
530174 is an lvm creation error, not a yum error.  It has probably been closed as a duplicate of this problem in error.

Comment 8 seth vidal 2009-11-05 20:07:43 UTC
*** Bug 532214 has been marked as a duplicate of this bug. ***


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