Bug 996027

Summary: [abrt] yum-utils-1.1.31-16.fc19: config.py:1187:_getsysver:YumBaseError: Error: rpmdb open failed
Product: [Fedora] Fedora Reporter: Martin Bříza <mbriza>
Component: yum-utilsAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: admiller, packaging-team-maint, tim.lauridsen, zpavlas
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:86506b4195ebca86a90a629882e1cf395202c891
Fixed In Version: yum-utils-1.1.31-19.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-29 01:46:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: core_backtrace
none
File: environ
none
build.log
none
root.log
none
state.log none

Description Martin Bříza 2013-08-12 09:05:14 UTC
Description of problem:
I was building a new package (kcron) in mock. Crashed during the rpmbuild -bb || list of installed packages output phase.

Version-Release number of selected component:
yum-utils-1.1.31-16.fc19

Additional info:
reporter:       libreport-2.1.5
cmdline:        /usr/bin/python -tt /usr/bin/repoquery -c /tmp/tmpBSlB2Z --installed -a --qf '%{nevra} %{buildtime} %{size} %{pkgid} %{yumdb_info.from_repo}'
dso_list:       yum-3.4.3-103.fc19.noarch
executable:     /usr/bin/repoquery
kernel:         3.9.9-302.fc19.x86_64
runlevel:       N 5
uid:            1000

Truncated backtrace:
config.py:1187:_getsysver:YumBaseError: Error: rpmdb open failed

Traceback (most recent call last):
  File "/usr/bin/repoquery", line 1539, in <module>
    main(sys.argv)
  File "/usr/bin/repoquery", line 1411, in main
    repoq.conf
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1054, in <lambda>
    conf = property(fget=lambda self: self._getConfig(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 344, in _getConfig
    startupconf = config.readStartupConfig(fn, root, releasever)
  File "/usr/lib/python2.7/site-packages/yum/config.py", line 1036, in readStartupConfig
    startupconf.distroverpkg)
  File "/usr/lib/python2.7/site-packages/yum/config.py", line 1187, in _getsysver
    raise Errors.YumBaseError("Error: " + str(e))
YumBaseError: Error: rpmdb open failed

Local variables in innermost frame:
installroot: '/var/lib/mock/fedora-rawhide-x86_64/root/'
e: error('rpmdb open failed',)
ts: <rpmUtils.transaction.TransactionWrapper instance at 0x2689200>
distroverpkg: 'redhat-release'

Comment 1 Martin Bříza 2013-08-12 09:05:20 UTC
Created attachment 785619 [details]
File: backtrace

Comment 2 Martin Bříza 2013-08-12 09:05:23 UTC
Created attachment 785620 [details]
File: core_backtrace

Comment 3 Martin Bříza 2013-08-12 09:05:29 UTC
Created attachment 785621 [details]
File: environ

Comment 4 Zdeněk Pavlas 2013-08-12 10:54:23 UTC
Strictly speaking, not a bug.. Yum couldn't determine $releasever, since it was not specified on command line, and rpmdb open in /var/lib/mock/fedora-rawhide-x86_64/root failed. We should probably just get rid of the traceback.

diff --git a/repoquery.py b/repoquery.py
index e85113c..64976ec 100755
--- a/repoquery.py
+++ b/repoquery.py
@@ -1410,7 +1410,11 @@ def main(args):
     repoq.preconf.debuglevel = initnoise
     repoq.preconf.init_plugins = opts.plugins
     repoq.preconf.root = opts.installroot
-    repoq.conf
+    try:
+        repoq.conf
+    except YumBaseError, e:
+        repoq.logger.error(e)
+        sys.exit(1)
 
     for item in  bad_setopt_tm:
         msg = "Setopt argument has multiple values: %s"

Comment 5 Martin Bříza 2013-08-14 08:44:05 UTC
Is it relevant that it crashes like that when I run both mock and fedora-review? I'm convinced there's rather something wrong there.
I can't use fedora-review at all because of the crash.

Comment 6 Martin Bříza 2013-08-14 10:25:34 UTC
Created attachment 786486 [details]
build.log

Comment 7 Martin Bříza 2013-08-14 10:25:55 UTC
Created attachment 786487 [details]
root.log

Comment 8 Martin Bříza 2013-08-14 10:26:23 UTC
Created attachment 786488 [details]
state.log

Comment 9 Martin Bříza 2013-08-14 10:27:18 UTC
ran with:
 fedora-review -b 994610 -m fedora-rawhide-x86_64

Comment 10 Fedora Update System 2013-09-27 12:26:06 UTC
yum-utils-1.1.31-18.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/yum-utils-1.1.31-18.fc19

Comment 11 Fedora Update System 2013-09-28 00:22:05 UTC
Package yum-utils-1.1.31-18.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing yum-utils-1.1.31-18.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-17856/yum-utils-1.1.31-18.fc19
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2013-09-29 01:46:01 UTC
yum-utils-1.1.31-18.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2013-12-13 11:45:44 UTC
yum-utils-1.1.31-19.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/yum-utils-1.1.31-19.fc20

Comment 14 Fedora Update System 2013-12-16 07:05:46 UTC
yum-utils-1.1.31-19.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.