Bug 555315

Summary: rpmdb: Build signature doesn't match environment
Product: [Fedora] Fedora Reporter: Tomas Pelka <tpelka>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: ffesti, jnovy, n3npq, pmatilai
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-01-14 13:26:12 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
yum.log with todays (14.1.2010) updates none

Description Tomas Pelka 2010-01-14 12:23:47 UTC
Created attachment 383663 [details]
yum.log with todays (14.1.2010) updates

Description of problem:
rpmdb: Build signature doesn't match environment
error: db3 error(-30971) from dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db3 -  (-30971)
error: cannot open Packages database in /var/lib/rpm

After todays yum update

Version-Release number of selected component (if applicable):
rpm-4.8.0-2.fc13.x86_64
yum-3.2.25-8.fc13.noarch

How reproducible:
100%

Steps to Reproduce:
1. yum update/search/install
2.
3.
  
Actual results:
rpmdb: Build signature doesn't match environment
error: db3 error(-30971) from dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db3 -  (-30971)
error: cannot open Packages database in /var/lib/rpm
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 252, 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 191, in getOptionsConfig
    self.conf
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 732, in <lambda>
    conf = property(fget=lambda self: self._getConfig(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 251, in _getConfig
    startupconf = config.readStartupConfig(fn, root)
  File "/usr/lib/python2.6/site-packages/yum/config.py", line 831, in readStartupConfig
    startupconf.releasever = _getsysver(startupconf.installroot, startupconf.distroverpkg)
  File "/usr/lib/python2.6/site-packages/yum/config.py", line 938, in _getsysver
    idx = ts.dbMatch('provides', distroverpkg)
_rpm.error: rpmdb open failed


Expected results:


Additional info:

Comment 1 Tomas Pelka 2010-01-14 12:37:07 UTC
rm -f /var/lib/rpm/__db* && rpm --rebuilddb will help

Comment 2 Jeff Johnson 2010-01-14 12:44:02 UTC
rpm --rebuilddb is unnecessary with DB_VERSION_MISMATCH. Won't hurt, but unnecessary.

Comment 3 Tomas Pelka 2010-01-14 12:50:10 UTC
Aaah i see, --rebuild is "automatically" when db do not exist.

Comment 4 Jeff Johnson 2010-01-14 12:59:01 UTC
The __db* files are recreated when needed, yes. But the indices do not
need to be recreated (and at least in rpm-4.8.0) are not recreated
automatically.

(aside) In rpm-5.3.0 the indices (i.e. everything but Packages) are also
recreated when needed. With ACID behavior, Packages can/will be
recreated from logs as well.

Comment 5 Panu Matilainen 2010-01-14 13:26:12 UTC

*** This bug has been marked as a duplicate of bug 553998 ***