RPM Community Forums

Mailing List Message of <rpm-users>

Re: I killed my RPMDB --- any rescue possible?

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

Addon: This is the output of "rpm -r ...":

- ---%<---
hitomi:tmp# rpm --noscripts -r /var/tmp/gnyubuildroot -Uvh 
/srv/packages/RPMS/i686/wget-1.11.4-2ev.i686.rpm
Preparing...                ########################################### 
[100%]
   1:wget                   ########################################### 
[100%]
   rpmdb: /var/tmp/gnyubuildroot/var/lib/rpm/Packages page 1121 is on free
   list with type 7
   rpmdb: PANIC: Invalid argument
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3afe4) app_private 
(nil)
   error: db3cput:db3.c:1291: dbcursor->put(-30973): DB_RUNRECOVERY: Fatal
   error, run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3b4bc) app_private 
(nil)
   error: db3cclose:db3.c:1229: dbcursor->close(-30973): DB_RUNRECOVERY: 
Fatal
   error, run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3b4bc) app_private 
(nil)
   error: db3sync:db3.c:1135: db->sync(-30973): DB_RUNRECOVERY: Fatal error,
   run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3b68c) app_private 
(nil)
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3b7ac) app_private 
(nil)
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3b9bc) app_private 
(nil)
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3ba9c) app_private 
(nil)
   error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal 
error,
   run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3ba9c) app_private 
(nil)
   error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal 
error,
   run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3ba9c) app_private 
(nil)
   error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal 
error,
   run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3ba9c) app_private 
(nil)
   error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal 
error,
   run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3ba9c) app_private 
(nil)
   error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal 
error,
   run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3ba9c) app_private 
(nil)
   error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal 
error,
   run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3ba9c) app_private 
(nil)
   error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal 
error,
   run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3ba9c) app_private 
(nil)
   error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal 
error,
   run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3ba9c) app_private 
(nil)
   error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal 
error,
   run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3ba9c) app_private 
(nil)
   error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal 
error,
   run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3ba9c) app_private 
(nil)
   error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal 
error,
   run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3ba9c) app_private 
(nil)
   error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal 
error,
   run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3ba9c) app_private 
(nil)
   error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal 
error,
   run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3ba9c) app_private 
(nil)
   error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal 
error,
   run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3ba9c) app_private 
(nil)
   error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal 
error,
   run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3ba9c) app_private 
(nil)
   error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal 
error,
   run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3ba9c) app_private 
(nil)
   error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal 
error,
   run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3ba9c) app_private 
(nil)
   error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal 
error,
   run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3ba9c) app_private 
(nil)
   error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal 
error,
   run database recovery
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3ba9c) app_private 
(nil)
   error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal 
error,
   run database recovery
   rpmdb: File handles still open at environment close
   rpmdb: Open file handle: /var/lib/rpm/Packages
   rpmdb: Open file handle: /var/lib/rpm/Name
   rpmdb: Open file handle: /var/lib/rpm/Nvra
   rpmdb: Open file handle: /var/lib/rpm/Basenames
   rpmdb: Open file handle: /var/lib/rpm/Sha1header
   rpmdb: Open file handle: /var/lib/rpm/Seqno
   rpmdb: Open file handle: /var/lib/rpm/Filepaths
   rpmdb: Open file handle: /var/lib/rpm/Sourcepkgid
   rpmdb: Open file handle: /var/lib/rpm/Packagecolor
   rpmdb: Open file handle: /var/lib/rpm/Filedigests
   rpmdb: Open file handle: /var/lib/rpm/Sigmd5
   rpmdb: Open file handle: /var/lib/rpm/Installtid
   rpmdb: Open file handle: /var/lib/rpm/Dirnames
   rpmdb: Open file handle: /var/lib/rpm/Requirename
   rpmdb: Open file handle: /var/lib/rpm/Providename
   rpmdb: Open file handle: /var/lib/rpm/Group
   rpmdb: Open file handle: /var/lib/rpm/Os
   rpmdb: Open file handle: /var/lib/rpm/Arch
   rpmdb: Open file handle: /var/lib/rpm/Release
   rpmdb: Open file handle: /var/lib/rpm/Version
   rpmdb: Open file handle: 
/var/tmp/gnyubuildroot/var/lib/rpm/log.0000000011
   rpmdb: PANIC: fatal region error detected; run recovery
   ==> rpmdbe_event_notify(0x9597e40, PANIC(0), 0xbff3ba9c) app_private 
(nil)
   error: db_fini:db3.c:583: dbenv->close(-30973): DB_RUNRECOVERY: Fatal
   error, run database recovery
- -->%--

TIA,
			Eric

On Sunday 12 June 2011, Eric MSP Veith <eveith@wwweb-library.net> wrote:
> 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
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> User Communication List                             rpm-users@rpm5.org
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iQIcBAEBAgAGBQJN9S+yAAoJEIXD2TZ1epVBDIsQAIarMZ95ny/mM9HelDXltQi5
nL209zaPzj5jtXmZhuNwnabSrFb89OgcphKTEFbZtDUJ53usyde1INbRNggDPnJV
VPX+GqMeQ3zQ+tY0Jjp8Cmc/vABzbvDaz3ttrk+V8LMlHDEkVM2bRdKRY8BnjJHu
8RubzMqSUyiBeGWervPz2ZB4ykIb2b2BROy0F91fKJVQtUdh60YUukhiN6n192Gh
SlCDAplLvmAut8Jkb2o8YmCPJrXU93I/D2vxVxhbM8bXboJvnL0XrKEazc/PtYne
ZJflCcEHLifG5wQrzgbB5cu1jbjtZUVUvg5RZmcodBzjRwaSSw8tx+D1fjVaB5xJ
1ryurr8+hV4zvaD8eJ6Ad8zyMgHjv9jVqMlBH9iTRhT7ozSdWzZNe8nY1JYOntHr
ZbL3D7Sbuu1OIbuIYdlkabT126QzxaBKRHcUD5w2/OwkMYeQL1K3K9fMVD/ydaQp
7+wnnFcp5sPxv9Q3FGmyclJxFzDOvGJ3LsVcmh81UIFo1bAnZpziy2fzLJYTYZdX
tszavQ/tZLg8IBTCsUsjvRIKF3cJK3z6qGbp9aOV9FyBWS5hgK1wjz02hLJyftJ+
RkuI8tdDFYQmuWFTga+kqIZzs0PvjNsYjS9Mg2MXpSUHI8Rua0R37uT35H8WExzL
FVDpeYLTn4NWwvoFy7v+
=IP4o
-----END PGP SIGNATURE-----
Received on Sun Jun 12 23:29:26 2011
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.