RPM Community Forums

Mailing List Message of <rpm-users>

I killed my RPMDB --- any rescue possible?

From: Eric MSP Veith <eveith@wwweb-library.net>
Date: Sun 12 Jun 2011 - 22:35:38 CEST
Message-Id: <201106122035.42088.eveith@wwweb-library.net>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello list,

I killed my RPMDB, propably by misusage. This is how I did it: I upgraded 
from RPM-5.1.9 to 5.3.10. I ran dbconvert.sh (which told me that the 
conversion failed), but repeated usage of db_recover -ev and rpm --rebuilddb 
finally got things in order. I'm using a chroot, which went the same path.

However, after using "rpm -r /my/chroot -Uvh ...", the RPMDB *outside* the 
chroot is corrupted. When running "rpm -qa", this is what I get:

- ---%<---
Freeing read locks for locker 0xa: 23945/3062028096
Freeing read locks for locker 0xb: 23945/3062028096
Freeing mutex for process: 23945/0
Freeing mutex for process: 23945/0
Freeing mutex for process: 23945/0
Freeing mutex for process: 23945/0
Freeing mutex for process: 23945/0
Freeing mutex for process: 23945/0
Freeing mutex for process: 23945/0
Freeing mutex for process: 23945/0
Freeing mutex for process: 23945/0
libXfixes-4.0.3-1ev.i686
error: rpmdb: header #33554432 cannot be loaded -- skipping.
(none)-(none)-(none)
Segmentation fault
- --->%---

How, db_convert and rpm --rebuilddb don't help anymore. The latter one 
prints:

- ---%<---
Freeing read locks for locker 0xe: 25167/3062372160
Freeing read locks for locker 0xf: 25167/3062372160
Freeing mutex for process: 25167/0
Freeing mutex for process: 25167/0
Freeing mutex for process: 25167/0
Freeing mutex for process: 25167/0
Freeing mutex for process: 25167/0
Freeing mutex for process: 25167/0
Freeing mutex for process: 25167/0
Freeing mutex for process: 25167/0
Freeing mutex for process: 25167/0
error: db3: header #33554432 cannot be loaded -- skipping.
error: db3: header #67108864 cannot be loaded -- skipping.
error: db3: header #83886080 cannot be loaded -- skipping.
error: db3: header #100663296 cannot be loaded -- skipping.
error: db3: header #117440512 cannot be loaded -- skipping.
error: db3: header #134217728 cannot be loaded -- skipping.
error: db3: header #150994944 cannot be loaded -- skipping.
error: db3: header #167772160 cannot be loaded -- skipping.
error: db3: header #201326592 cannot be loaded -- skipping.
error: db3: header #218103808 cannot be loaded -- skipping.
error: db3: header #234881024 cannot be loaded -- skipping.
error: db3: header #268435456 cannot be loaded -- skipping.
error: db3: header #285212672 cannot be loaded -- skipping.
error: db3: header #301989888 cannot be loaded -- skipping.
error: db3: header #385875968 cannot be loaded -- skipping.
error: db3: header #486539264 cannot be loaded -- skipping.
rpm: header.c:1050: headerLoad: Assertion `(rpmint32_t)rdl >= 0' failed.
Aborted
- --->%---

The underlying BDB version is 5.1.25.

I'd be grateful for any hint, and also some explainations about why I did it 
to kill the system rpmdb using "rpm -r".

TIA!

			Eric
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iQIcBAEBAgAGBQJN9SMaAAoJEIXD2TZ1epVBzSkP/3YctnPKciYXuaucHzwWt6kP
eQYxUsVfFdAonTbmHLR7pdLTbLPPJXqXEI1IFNcdeChOf1HU3OqmMPrwD2C7CW7N
IDk0qPPns8KvlNFMlOR7kfXT1GwNktKkLtl+E8v+A7YtXMW1IpThCvo1T3cxaD9q
tjerRl3y05gKyZcZ/4cm+OrgAcMt8cN3xsMASuYF/SYKiZytaPLLrn0kVcSLHsPD
Ji+K8oLcFroz8w6s6c7ryOgm9mx90U1gX8jvAfXPPoYtJEtAi5NVw4UdBOs2j9YP
MTKQyYFD3BHM9F0XPAyWQeRQcqBszpyduLoadANbVsv7DD8NfV3IVJ1DfSPTd/Fl
0BUG570BDRCd7pcDpgDCrBHsEOy1mYUNQwpGS8Faz4XVPgBiNWp4no7ZEDotj66V
67ozet61EgoGltd1r7s9EpDPj/ct+JUt9n5BgtSPMJ2eMSHL1mMIld/lRy0CzNBk
m5Ec6TCajTQx0TPMomvTqaHGq+TKmBOyL/M4Qpm1TNO+He7JNagchVicndhgabrm
W0ISIZ76fpTsaNw1xhgUGNd0q2j1gCpV9D0HJlw57N12tGvciou6E344kCvc9Sxg
pgjkLnfiqqQZFPq58YLXYxC6gEQ0fk1iQuECWDunwBYREqGCqJzNs0fD1lDAlhHw
NzdNki5812cmSbzsbHK5
=PzDq
-----END PGP SIGNATURE-----
Received on Sun Jun 12 22:44:45 2011
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.