Bug 1270528 - error: db5 error(-30973) from dbenv->open: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: db5 error(-30973) from dbenv->open: BDB0087 DB_RUNRECOVERY: Fatal erro...
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
23
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-10 13:41 EDT by Mikhail
Modified: 2016-12-20 09:56 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-20 09:56:45 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
prequel of problem (144.33 KB, text/plain)
2015-10-10 13:41 EDT, Mikhail
no flags Details

  None (edit)
Description Mikhail 2015-10-10 13:41:15 EDT
Created attachment 1081650 [details]
prequel of problem

Description of problem:
# dnf update
error: db5 error(-30973) from dbenv->open: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 -  (-30973)
error: cannot open Packages database in /var/lib/rpm
Error: Error: rpmdb open failed
Comment 1 Mikhail 2015-10-10 13:43:58 EDT
# rpm -q rpm
error: db5 error(-30973) from dbenv->open: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 -  (-30973)
error: cannot open Packages database in /var/lib/rpm
package rpm is not installed
[root@localhost ~]# rpm --version
RPM version 4.13.0-rc1
Comment 2 Florian Festi 2015-10-21 10:09:25 EDT
Can you please try the steps describe on http://rpm.org/wiki/Docs/RpmRecovery ?
Comment 3 Mikhail 2015-10-22 16:30:32 EDT
[root@localhost ~]# cd /var/lib/rpm

[root@localhost rpm]# /usr/lib/rpm/rpmdb_stat -CA
Default locking region information:
8 Last allocated locker ID
0x7fffffff Current maximum unused locker ID
5 Number of lock modes
200 Initial number of locks allocated
0 Initial number of lockers allocated
200 Initial number of lock objects allocated
0 Maximum number of locks possible
0 Maximum number of lockers possible
0 Maximum number of lock objects possible
200 Current number of locks allocated
4 Current number of lockers allocated
200 Current number of lock objects allocated
40 Number of lock object partitions
1031 Size of object hash table
0 Number of current locks
6 Maximum number of locks at any one time
1 Maximum number of locks in any one bucket
0 Maximum number of locks stolen by for an empty partition
0 Maximum number of locks stolen for any one partition
0 Number of current lockers
4 Maximum number of lockers at any one time
0 Number of current lock objects
6 Maximum number of lock objects at any one time
1 Maximum number of lock objects in any one bucket
0 Maximum number of objects stolen by for an empty partition
0 Maximum number of objects stolen for any one partition
38 Total number of locks requested
38 Total number of locks released
0 Total number of locks upgraded
6 Total number of locks downgraded
0 Lock requests not available due to conflicts, for which we waited
0 Lock requests not available due to conflicts, for which we did not wait
0 Number of deadlocks
0 Lock timeout value
0 Number of locks that have timed out
0 Transaction timeout value
0 Number of transactions that have timed out
256KB Region size
0 The number of partition locks that required waiting (0%)
0 The maximum number of times any partition lock was waited for (0%)
0 The number of object queue operations that required waiting (0%)
0 The number of locker allocations that required waiting (0%)
0 The number of region locks that required waiting (0%)
1 Maximum hash bucket length
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Lock REGINFO information:
Environment Region type
1 Region ID
__db.001 Region name
0xb729f000 Region address
0xb729f064 Region allocation head
0xb729f3d8 Region primary address
0 Region maximum allocation
0 Region allocated
Region allocations: 97 allocations, 0 failures, 0 frees, 1 longest
Allocations by power-of-two sizes:
  1KB 93
  2KB 1
  4KB 1
  8KB 0
 16KB 1
 32KB 0
 64KB 0
128KB 1
256KB 0
512KB 0
1024KB 0
REGION_SHARED Region flags
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Lock region parameters:
2 Lock region region mutex [0/15 0% 6514/3073791744]
131 locker table size
1031 object table size
1480 obj_off
98832 locker_off
0 need_dd
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Lock conflict matrix:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Locks grouped by lockers:
Locker   Mode      Count Status  ----------------- Object ---------------
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Locks grouped by object:
Locker   Mode      Count Status  ----------------- Object ---------------

[root@localhost rpm]# lsof | grep /var/lib/rpm
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.
bash      6429         root  cwd       DIR      179,2      4096      11847 /var/lib/rpm
lsof      6538         root  cwd       DIR      179,2      4096      11847 /var/lib/rpm
grep      6539         root  cwd       DIR      179,2      4096      11847 /var/lib/rpm
lsof      6540         root  cwd       DIR      179,2      4096      11847 /var/lib/rpm

[root@localhost rpm]# cd /var/lib

[root@localhost lib]# tar zcvf /var/preserve/rpmdb-`date +"%d%m%Y"`.tar.gz rpm
rpm/
rpm/Basenames
rpm/Conflictname
rpm/Filetriggername
rpm/Transfiletriggername
rpm/Supplementname
rpm/Sha1header
rpm/Recommendname
rpm/Dirnames
rpm/Packages
rpm/Triggername
rpm/Enhancename
rpm/Group
rpm/Providename
rpm/Suggestname
rpm/.rpm.lock
rpm/.dbenv.lock
rpm/Installtid
rpm/Requirename
rpm/__db.002
rpm/Name
rpm/Sigmd5
rpm/__db.001
rpm/__db.003
rpm/Obsoletename
rpm/Packages.orig

[root@localhost lib]# cd /var/lib/rpm

[root@localhost rpm]# rm -f __db*

[root@localhost rpm]# /usr/lib/rpm/rpmdb_verify Packages
BDB5105 Verification of Packages succeeded.

[root@localhost rpm]# mv Packages Packages.orig

[root@localhost rpm]# /usr/lib/rpm/rpmdb_dump Packages.orig | /usr/lib/rpm/rpmdb_load Packages

[root@localhost rpm]# /usr/lib/rpm/rpmdb_verify Packages
BDB5105 Verification of Packages succeeded.

[root@localhost rpm]# rpm -qa 1> /dev/null

[root@localhost rpm]# rpm -v --rebuilddb

[root@localhost rpm]# dnf clean all
Error: Error: rpmdb failed to list provides. Try: rpm --rebuilddb

[root@localhost rpm]# dnf update
Error: Error: rpmdb failed to list provides. Try: rpm --rebuilddb
Comment 4 Mikhail 2015-10-22 16:31:15 EDT
Pity but it not helps
Comment 5 Florian Festi 2015-10-23 09:55:44 EDT
Is this related to 1263465? If that is the case it looks like your system is heavily damaged. Try to run rpm -Va to see which packages need to re reinstalled due to damaged files.

Getting the rpmdb rebuild and still getting errors is very strange. May be dnf itself is damaged.
Comment 6 Mikhail 2015-11-08 17:43:45 EST
(In reply to Florian Festi from comment #5)
> Is this related to 1263465? If that is the case it looks like your system is
> heavily damaged. Try to run rpm -Va to see which packages need to re
> reinstalled due to damaged files.

Yes it related to 1263465.

> rpm -Va
nothing to output and do.

> Getting the rpmdb rebuild and still getting errors is very strange. May be
> dnf itself is damaged.

How I may it check?
Comment 7 Fedora End Of Life 2016-11-24 07:44:54 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 8 Fedora End Of Life 2016-12-20 09:56:45 EST
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

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