RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 614023 - rpmdb open failed exception changed (rpm.error vs. TypeError)
Summary: rpmdb open failed exception changed (rpm.error vs. TypeError)
Keywords:
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
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)

Fixed In Version: yum-3.2.29-1.el6
Doc Type: Bug Fix
Doc Text:
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:
Environment:
Last Closed: 2011-05-19 13:33:34 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0602 0 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 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.