Bug 614023 - rpmdb open failed exception changed (rpm.error vs. TypeError)
Summary: rpmdb open failed exception changed (rpm.error vs. TypeError)
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum
Version: 6.0
Hardware: ppc64
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact: Karel Srot
URL:
Whiteboard: abrt_hash:00753157
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-13 14:15 UTC by Michal Nowak
Modified: 2014-01-21 06:18 UTC (History)
2 users (show)

(edit)
Cause: rpm changed the API for error notification
Consequence: yum didn't catch the new error and crashed instead of displaying a message
Fix: change to new API
Result: displays error message, instead of crashing
Clone Of:
(edit)
Last Closed: 2011-05-19 13:33:34 UTC


Attachments (Terms of Use)
File: backtrace (1.17 KB, text/plain)
2010-07-13 14:15 UTC, Michal Nowak
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0602 normal SHIPPED_LIVE yum bug fix and enhancement update 2011-05-19 09:37:29 UTC

Description Michal Nowak 2010-07-13 14:15:24 UTC
abrt version: 1.1.8
architecture: ppc64
cmdline: /usr/bin/python /usr/bin/yum upgrade gcc -y
component: yum
executable: /usr/bin/yum
kernel: 2.6.32-44.el6.ppc64
package: yum-3.2.27-12.el6
rating: 4
reason: config.py:968:_getsysver:error: rpmdb open failed
release: Red Hat Enterprise Linux Server release 6.0 Beta (Santiago)
time: 1279030314
uid: 0

backtrace
-----
config.py:968:_getsysver:error: rpmdb open failed

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 254, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 88, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 192, in getOptionsConfig
    self.conf
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 778, in <lambda>
    conf = property(fget=lambda self: self._getConfig(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 256, in _getConfig
    startupconf = config.readStartupConfig(fn, root)
  File "/usr/lib/python2.6/site-packages/yum/config.py", line 835, in readStartupConfig
    startupconf.releasever = _getsysver(startupconf.installroot, startupconf.distroverpkg)
  File "/usr/lib/python2.6/site-packages/yum/config.py", line 968, in _getsysver
    idx = ts.dbMatch('provides', distroverpkg)
error: rpmdb open failed

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

comment
-----
Run `yum upgrade` canceled the command while it was downloading bits. Then started `yum upgrade gcc` -> got that trace back.
It starts with

rpmdb: Thread/process 9354/549795947872 failed: Thread died in Berkeley DB library
error: db3 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

so I guess rpmdb got broken, however yum should handle that situation in some way and not to spit bt.

How to reproduce
-----
1. 
2. 
3.

Comment 1 Michal Nowak 2010-07-13 14:15:26 UTC
Created attachment 431476 [details]
File: backtrace

Comment 3 RHEL Product and Program Management 2010-07-15 14:47:28 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 4 James Antill 2010-09-20 20:16:52 UTC
This is already fixed upstream, with:


    except rpm.error, e:
        # This is the "new" code for "cannot open rpmdb", 4.8.0 ish
        raise Errors.YumBaseError("Error: " + str(e))

...we should get to it with the 6.1 rebase.

Comment 9 James Antill 2011-05-12 19:10:37 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: rpm changed the API for error notification
Consequence: yum didn't catch the new error and crashed instead of displaying a message
Fix: change to new API
Result: displays error message, instead of crashing

Comment 10 errata-xmlrpc 2011-05-19 13:33:34 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0602.html


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