Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Cause: run 'yum list' as a non-privileged user when /var/lib/yum/yumdb is not writable
Consequence: yum crashes
Fix: handle this situation gracefully
Result: no crash
DescriptionRichard W.M. Jones
2012-12-04 16:38:08 UTC
I hit the following stack trace on RHEL 6.4:
Traceback (most recent call last):
File "<string>", line 39, in <module>
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 3173, in _bestPackageFromList
bestlist = self._compare_providers(pkglist, None)
File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 1219, in _compare_providers
rpmdbpkgs = self.rpmdb.searchNevra(name=pkg.name)
File "/usr/lib/python2.6/site-packages/yum/rpmsack.py", line 1197, in searchNevra
return self._search(name, epoch, ver, rel, arch)
File "/usr/lib/python2.6/site-packages/yum/rpmsack.py", line 1282, in _search
po = self._makePackageObject(hdr, mi.instance())
File "/usr/lib/python2.6/site-packages/yum/rpmsack.py", line 1305, in _makePackageObject
po = RPMInstalledPackage(hdr, index, self)
File "/usr/lib/python2.6/site-packages/yum/rpmsack.py", line 44, in __init__
YumInstalledPackage.__init__(self, rpmhdr, yumdb=rpmdb.yumdb)
File "/usr/lib/python2.6/site-packages/yum/packages.py", line 1709, in __init__
self.yumdb_info = yumdb.get_package(self)
File "/usr/lib/python2.6/site-packages/yum/rpmsack.py", line 1644, in get_package
yumdb_cache=self.yumdb_cache)
AttributeError: 'RPMDBAdditionalData' object has no attribute 'yumdb_cache'
If I'm not mistaken, this appears to be a variant of bug 730793.
The fix for this seems very simple and self-contained, and is already
part of the yum 3.2 branch.
+++ This bug was initially created as a clone of Bug #730793 +++
abrt version: 2.0.5
cmdline: /usr/bin/python /usr/bin/yum list db4*
comment: Trying to run a yum list as an ordinary user
executable: /usr/bin/yum
kernel: 3.0.1-3.fc16.x86_64
reason: rpmsack.py:1618:get_package:AttributeError: 'RPMDBAdditionalData' object has no attribute 'yumdb_cache'
smolt_data: Unable to save UUID to /etc/smolt/hw-uuid. Please run once as root.
time: Mon Aug 15 19:24:03 2011
uid: 1000
username: liveuser
backtrace:
:rpmsack.py:1618:get_package:AttributeError: 'RPMDBAdditionalData' object has no attribute 'yumdb_cache'
:
: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 309, in user_main
: errcode = main(args)
: File "/usr/share/yum-cli/yummain.py", line 140, in main
: result, resultmsgs = base.doCommands()
: File "/usr/share/yum-cli/cli.py", line 462, in doCommands
: return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
: File "/usr/share/yum-cli/yumcommands.py", line 537, in doCommand
: ypl = base.returnPkgLists(extcmds, installed_available=highlight)
: File "/usr/share/yum-cli/cli.py", line 1125, in returnPkgLists
: ignore_case=True)
: File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 2299, in doPackageLists
: ignore_case=ic):
: File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 630, in returnPackages
: self._makePackageObject(hdr, idx)
: File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 1279, in _makePackageObject
: po = RPMInstalledPackage(hdr, index, self)
: File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 75, in __init__
: YumInstalledPackage.__init__(self, rpmhdr, yumdb=rpmdb.yumdb)
: File "/usr/lib/python2.7/site-packages/yum/packages.py", line 1763, in __init__
: self.yumdb_info = yumdb.get_package(self)
: File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 1618, in get_package
: yumdb_cache=self.yumdb_cache)
:AttributeError: 'RPMDBAdditionalData' object has no attribute 'yumdb_cache'
:
:Local variables in innermost frame:
:pkgid: None
:self: <yum.rpmsack.RPMDBAdditionalData object at 0x28b9fd0>
:pkgtup: None
:po: <RPMInstalledPackage : db4-4.8.30-3.fc15.x86_64 (0x7f792df475d0)>
:thisdir: '/var/lib/yum/yumdb/d/410f98e91ac24da8556e19f9d2c7ce62ab1bd767-db4-4.8.30-3.fc15-x86_64'
--- Additional comment from Mads Kiilerich on 2011-08-15 15:37:02 EDT ---
This happened while /var/lib/rpm needed recovery. Yum should however not fail this bad. Ordinary yum commands run by root failed nicely.
--- Additional comment from Zdeněk Pavlas on 2011-08-17 02:44:27 EDT ---
Fixed in upstream, closing.
--- Additional comment from Richard W.M. Jones on 2012-12-04 11:32:52 EST ---
The fix for this bug was:
commit 2f480e8dd6757cbe48037a5507c0c19cc97b2e71
Author: Zdeněk Pavlas <zpavlas>
Date: Tue Aug 16 13:13:12 2011 +0200
Small fix in RPMDBAdditionalData init. BZ 730793
Initialize RPMDBAdditionalData object even when makedirs /var/lib/yum/yumdb
Comment 1Richard W.M. Jones
2012-12-04 18:50:52 UTC
OK I have now verified that this really is a bug which
affects libguestfs builds in RHEL 6.4.
Comment 2RHEL Program Management
2012-12-14 08:11:48 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Simplish backport for 6.5, to repeat:
commit 2f480e8dd6757cbe48037a5507c0c19cc97b2e71
Author: Zdeněk Pavlas <zpavlas>
Date: Tue Aug 16 13:13:12 2011 +0200
Comment 6RHEL Program Management
2013-10-14 00:11:58 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.
Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHBA-2014-1410.html
I hit the following stack trace on RHEL 6.4: Traceback (most recent call last): File "<string>", line 39, in <module> File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 3173, in _bestPackageFromList bestlist = self._compare_providers(pkglist, None) File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 1219, in _compare_providers rpmdbpkgs = self.rpmdb.searchNevra(name=pkg.name) File "/usr/lib/python2.6/site-packages/yum/rpmsack.py", line 1197, in searchNevra return self._search(name, epoch, ver, rel, arch) File "/usr/lib/python2.6/site-packages/yum/rpmsack.py", line 1282, in _search po = self._makePackageObject(hdr, mi.instance()) File "/usr/lib/python2.6/site-packages/yum/rpmsack.py", line 1305, in _makePackageObject po = RPMInstalledPackage(hdr, index, self) File "/usr/lib/python2.6/site-packages/yum/rpmsack.py", line 44, in __init__ YumInstalledPackage.__init__(self, rpmhdr, yumdb=rpmdb.yumdb) File "/usr/lib/python2.6/site-packages/yum/packages.py", line 1709, in __init__ self.yumdb_info = yumdb.get_package(self) File "/usr/lib/python2.6/site-packages/yum/rpmsack.py", line 1644, in get_package yumdb_cache=self.yumdb_cache) AttributeError: 'RPMDBAdditionalData' object has no attribute 'yumdb_cache' If I'm not mistaken, this appears to be a variant of bug 730793. The fix for this seems very simple and self-contained, and is already part of the yum 3.2 branch. +++ This bug was initially created as a clone of Bug #730793 +++ abrt version: 2.0.5 cmdline: /usr/bin/python /usr/bin/yum list db4* comment: Trying to run a yum list as an ordinary user executable: /usr/bin/yum kernel: 3.0.1-3.fc16.x86_64 reason: rpmsack.py:1618:get_package:AttributeError: 'RPMDBAdditionalData' object has no attribute 'yumdb_cache' smolt_data: Unable to save UUID to /etc/smolt/hw-uuid. Please run once as root. time: Mon Aug 15 19:24:03 2011 uid: 1000 username: liveuser backtrace: :rpmsack.py:1618:get_package:AttributeError: 'RPMDBAdditionalData' object has no attribute 'yumdb_cache' : :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 309, in user_main : errcode = main(args) : File "/usr/share/yum-cli/yummain.py", line 140, in main : result, resultmsgs = base.doCommands() : File "/usr/share/yum-cli/cli.py", line 462, in doCommands : return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds) : File "/usr/share/yum-cli/yumcommands.py", line 537, in doCommand : ypl = base.returnPkgLists(extcmds, installed_available=highlight) : File "/usr/share/yum-cli/cli.py", line 1125, in returnPkgLists : ignore_case=True) : File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 2299, in doPackageLists : ignore_case=ic): : File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 630, in returnPackages : self._makePackageObject(hdr, idx) : File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 1279, in _makePackageObject : po = RPMInstalledPackage(hdr, index, self) : File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 75, in __init__ : YumInstalledPackage.__init__(self, rpmhdr, yumdb=rpmdb.yumdb) : File "/usr/lib/python2.7/site-packages/yum/packages.py", line 1763, in __init__ : self.yumdb_info = yumdb.get_package(self) : File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 1618, in get_package : yumdb_cache=self.yumdb_cache) :AttributeError: 'RPMDBAdditionalData' object has no attribute 'yumdb_cache' : :Local variables in innermost frame: :pkgid: None :self: <yum.rpmsack.RPMDBAdditionalData object at 0x28b9fd0> :pkgtup: None :po: <RPMInstalledPackage : db4-4.8.30-3.fc15.x86_64 (0x7f792df475d0)> :thisdir: '/var/lib/yum/yumdb/d/410f98e91ac24da8556e19f9d2c7ce62ab1bd767-db4-4.8.30-3.fc15-x86_64' --- Additional comment from Mads Kiilerich on 2011-08-15 15:37:02 EDT --- This happened while /var/lib/rpm needed recovery. Yum should however not fail this bad. Ordinary yum commands run by root failed nicely. --- Additional comment from Zdeněk Pavlas on 2011-08-17 02:44:27 EDT --- Fixed in upstream, closing. --- Additional comment from Richard W.M. Jones on 2012-12-04 11:32:52 EST --- The fix for this bug was: commit 2f480e8dd6757cbe48037a5507c0c19cc97b2e71 Author: Zdeněk Pavlas <zpavlas> Date: Tue Aug 16 13:13:12 2011 +0200 Small fix in RPMDBAdditionalData init. BZ 730793 Initialize RPMDBAdditionalData object even when makedirs /var/lib/yum/yumdb