Bug 114714 - rpm can install an rpm package but fails to update the rpmdb when there is bad information within the rpmdb. This would quickly break dependancy resolution.
rpm can install an rpm package but fails to update the rpmdb when there is ba...
Status: CLOSED DUPLICATE of bug 114622
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
9
i386 Linux
high Severity high
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-31 23:26 EST by Matthew Williams
Modified: 2006-02-21 14:01 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 14:01:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matthew Williams 2004-01-31 23:26:06 EST
Description of problem:
The rpm program can install an rpm package but cannot update the 
rpmdb with the new package information when there is bad information 
within the rpmdb.

For example I didn't have the pmake rpm package or any of its files 
installed which I first verified using:
rpm -qpil pmake-1.45-10.i386.rpm
and then:
file /usr/bin/mkdep /usr/bin/pmake
/usr/bin/mkdep: can't stat `/usr/bin/mkdep' (No such file or 
directory).
/usr/bin/pmake: can't stat `/usr/bin/pmake' (No such file or 
directory).

Next I did a test to make sure that there were no dependancies or 
conflicts:
[root@wilber download]# rpm -Uvh --test pmake-1.45-10.i386.rpm 
warning: pmake-1.45-10.i386.rpm: V3 DSA signature: NOKEY, key ID 
db42a60e
error: rpmdbNextIterator: skipping h#     382 region trailer: BAD, 
tag 29213 type 65 offset -269 count 6
error: rpmdbNextIterator: skipping h#     382 region trailer: BAD, 
tag 29213 type 65 offset -269 count 6
error: rpmdbNextIterator: skipping h#     382 region trailer: BAD, 
tag 29213 type 65 offset -269 count 6
error: rpmdbNextIterator: skipping h#     382 region trailer: BAD, 
tag 29213 type 65 offset -269 count 6
error: rpmdbNextIterator: skipping h#     382 region trailer: BAD, 
tag 29213 type 65 offset -269 count 6
Preparing...                
########################################### [100%]

^^^ As you can see above that the rpmdb has some bad information 
within it, it could be corrupted.

Passing the test it was time to install the pmake rpm package:
[root@wilber download]# rpm -Uvh pmake-1.45-10.i386.rpm 
warning: pmake-1.45-10.i386.rpm: V3 DSA signature: NOKEY, key ID 
db42a60e
error: rpmdbNextIterator: skipping h#     382 region trailer: BAD, 
tag 29213 type 65 offset -269 count 6
error: rpmdbNextIterator: skipping h#     382 region trailer: BAD, 
tag 29213 type 65 offset -269 count 6
error: rpmdbNextIterator: skipping h#     382 region trailer: BAD, 
tag 29213 type 65 offset -269 count 6
error: rpmdbNextIterator: skipping h#     382 region trailer: BAD, 
tag 29213 type 65 offset -269 count 6
error: rpmdbNextIterator: skipping h#     382 region trailer: BAD, 
tag 29213 type 65 offset -269 count 6
Preparing...                
########################################### [100%]
   1:pmake                  
########################################### [100%]
rpmdb: PANIC: Invalid argument
rpmdb: fatal region error detected; run recovery
rpmdb: fatal region error detected; run recovery
rpmdb: fatal region error detected; run recovery
rpmdb: fatal region error detected; run recovery
rpmdb: fatal region error detected; run recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from dbcursor->c_put: DB_RUNRECOVERY: Fatal 
error, run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->sync: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from dbcursor->c_close: DB_RUNRECOVERY: 
Fatal error, run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->sync: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->cursor: DB_RUNRECOVERY: Fatal 
error, run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "pmake" records from Name index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->sync: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->cursor: DB_RUNRECOVERY: Fatal 
error, run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "mkdep" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "pmake" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "pmake-1.45" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "tutorial.ms" records from Basenames 
index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "mkdep.1.gz" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "pmake.1.gz" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "Makefile" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.README" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.dep.mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.doc.mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.files.mk" records from Basenames 
index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.inc.mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.info.mk" records from Basenames 
index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.kinc.mk" records from Basenames 
index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.kmod.mk" records from Basenames 
index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.lib.mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.links.mk" records from Basenames 
index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.man.mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.nls.mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.obj.mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.own.mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.prog.mk" records from Basenames 
index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.subdir.mk" records from Basenames 
index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.sys.mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "sys.mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->sync: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->open: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: cannot open Group index using db3 -  (-30982)
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->open: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: cannot open Requirename index using db3 -  (-30982)
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->open: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: cannot open Providename index using db3 -  (-30982)
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->open: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: cannot open Dirnames index using db3 -  (-30982)
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->open: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: cannot open Requireversion index using db3 -  (-30982)
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->open: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: cannot open Provideversion index using db3 -  (-30982)
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->open: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: cannot open Installtid index using db3 -  (-30982)
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->open: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: cannot open Sigmd5 index using db3 -  (-30982)
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->open: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: cannot open Sha1header index using db3 -  (-30982)
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->open: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: cannot open Filemd5s index using db3 -  (-30982)
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->sync: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->sync: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->sync: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->sync: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from dbenv->close: DB_RUNRECOVERY: Fatal 
error, run database recovery
[root@wilber download]# 

Next I checked to see if it really did install the pmake rpm package:
[root@wilber download]# rpm --query pmake
package pmake is not installed
[root@wilber download]# rpm --query pmake-1.45-10.i386.rpm 
package pmake-1.45-10.i386.rpm is not installed
[root@wilber download]# rpm --query pmake-1.45-10.i386
package pmake-1.45-10.i386 is not installed
[root@wilber download]# rpm --query pmake-1.45-10
package pmake-1.45-10 is not installed
[root@wilber download]# 

So a did a bit more of a manual check:
[root@wilber download]# rpm -qpil pmake-1.45-10.i386.rpm
[root@wilber download]# 
file /usr/bin/mkdep /usr/bin/pmake /usr/share/doc/pmake-
1.45 /usr/share/man/man1/mkdep.1.gz /usr/share/man/man1/pmake.1.gz /us
r/share/mk
/usr/bin/mkdep:                 Bourne shell script text executable
/usr/bin/pmake:                 ELF 32-bit LSB executable, Intel 
80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked 
(uses shared libs), stripped
/usr/share/doc/pmake-1.45:      directory
/usr/share/man/man1/mkdep.1.gz: gzip compressed data, was "mkdep.1", 
from Unix, max compression
/usr/share/man/man1/pmake.1.gz: gzip compressed data, was "pmake.1", 
from Unix, max compression
/usr/share/mk:                  directory
[root@wilber download]# 

As you can see it does install the rpm but it fails to update the 
rpmdb when there is bad information within the rpmdb. This is a 
problem because it would break dependancy information, what would 
happen if another package relied on pmake being installed?





Version-Release number of selected component (if applicable):
rpm-4.2-0.69





How reproducible:
Always.





Steps to Reproduce:
1. Insert some bad information into the rpmdb. These are the steps I 
took to insert bad information into the rpmdb:
1a. I installed the following packages(from the RH9 RPM dirs) which 
were in a unique directory using this command:
rpm -Uvh --oldpackage ./*.rpm
dietlibc-0.21-4.i386.rpm
glib2-devel-2.2.1-1.i386.rpm
glibc-2.3.2-11.9.i386.rpm
glibc-common-2.3.2-11.9.i386.rpm
glibc-debug-2.3.2-11.9.i386.rpm
glibc-devel-2.3.2-11.9.i386.rpm
glibc-kernheaders-2.4-8.10.i386.rpm
glibc-profile-2.3.2-11.9.i386.rpm
glibc-utils-2.3.2-11.9.i386.rpm
glib-devel-1.2.10-10.i386.rpm
rpm-build-4.2-0.69.i386.rpm
rpmdb-redhat-9-0.20030313.i386.rpm
rpm-devel-4.2-0.69.i386.rpm
rpm-python-4.2-0.69.i386.rpm
1b. I installed the following packages(from the RH9 RPM dirs) which 
were in another unique directory using this command:
rpm -Uvh --replacepkgs ./*.i686.rpm
glibc-2.3.2-11.9.i686.rpm
1c. I installed the following packages(from the RH9 RPM dirs) which 
were in another unique directory using this command:
rpm -Uvh ./*.rpm
glibc-2.3.2-27.9.7.i386.rpm
glibc-common-2.3.2-27.9.7.i386.rpm
glibc-debug-2.3.2-27.9.7.i386.rpm
glibc-devel-2.3.2-27.9.7.i386.rpm
glibc-profile-2.3.2-27.9.7.i386.rpm
glibc-utils-2.3.2-27.9.7.i386.rpm
1d. I installed the following packages(from the RH9 RPM dirs) which 
were in another unique directory using this command:
rpm -Uvh --replacepkgs ./*.i686.rpm
glibc-2.3.2-27.9.7.i686.rpm
1e. I then tried to install the pmake-1.45-10.i386.rpm package using 
this command:
rpm -Uvh --test pmake-1.45-10.i386.rpm
and got this error:
error: Failed dependencies:
        libc.so.6 is needed by pmake-1.45-10
        libc.so.6(GLIBC_2.0) is needed by pmake-1.45-10
        libc.so.6(GLIBC_2.1) is needed by pmake-1.45-10
        libc.so.6(GLIBC_2.2) is needed by pmake-1.45-10
        libc.so.6(GLIBC_2.3) is needed by pmake-1.45-10
    Suggested resolutions:
        glibc-2.3.2-11.9.i386.rpm
1f. I installed the following packages(from the RH9 RPM dirs) which 
were in another unique directory using this command:
rpm -ivh --replacepkgs --oldpackage
glibc-2.3.2-27.9.7.i386.rpm
1g. Now the test passed,
rpm -Uvh --test pmake-1.45-10.i386.rpm
of course with the error messages printed, now you are ready to try 
to install the pmake rpm package.


2. If you are at this step and the test of the pmake rpm package does 
not look similar to this:
[root@wilber download]# rpm -Uvh --test pmake-1.45-10.i386.rpm 
warning: pmake-1.45-10.i386.rpm: V3 DSA signature: NOKEY, key ID 
db42a60e
error: rpmdbNextIterator: skipping h#     382 region trailer: BAD, 
tag 29213 type 65 offset -269 count 6
error: rpmdbNextIterator: skipping h#     382 region trailer: BAD, 
tag 29213 type 65 offset -269 count 6
error: rpmdbNextIterator: skipping h#     382 region trailer: BAD, 
tag 29213 type 65 offset -269 count 6
error: rpmdbNextIterator: skipping h#     382 region trailer: BAD, 
tag 29213 type 65 offset -269 count 6
error: rpmdbNextIterator: skipping h#     382 region trailer: BAD, 
tag 29213 type 65 offset -269 count 6
Preparing...                
########################################### [100%]
Then you have not inserted bad information into your rpmdb. Instead 
download these two bzip2 files as they contain my rpmdb with the bad 
information already within it:
http://wilber.pointclark.net/_usr_lib_rpmdb_i386-redhat-linux_redhat_-
-allfiles.tar.bz2
http://wilber.pointclark.net/_var_lib_rpm_--allfiles.tar.bz2
There are two .bz2 files, which contain the rpm database files as 
there were two directories which held rpm database files and I wasn't 
sure which was the correct directory. The _usr_lib_rpmdb_i386-redhat-
linux_redhat_--allfiles.tar.bz2 file is 20MB compressed and 73MB 
uncompressed. The _var_lib_rpm_--allfiles.tar.bz2 file is 5.6MB 
compressed and 22MB uncompressed. The filenames are in the format 
that a forwardslash was replaced with an underscore and --allfiles 
means all the files within that directory. Use these files if you are 
unable to reproduce the bug as these files would contain my rpm 
database with the bad information within it.


3. Now the test of the pmake rpm package should give you errors 
similar to:
error: rpmdbNextIterator: skipping h#     382 region trailer: BAD, 
tag 29213 type 65 offset -269 count 6


4. So now try to install the pmake rpm package:
rpm -Uvh pmake-1.45-10.i386.rpm
and watch all the errors.


5. Now try to verify that the pmake rpm package was installed:
rpm --query pmake
rpm --query pmake-1.45-10.i386.rpm
rpm --query pmake-1.45-10.i386
rpm --query pmake-1.45-10
^^^^^ All of the queries should come back with something similar to:
package pmake* is not installed


6. Check to make sure that the rpm actually installed:
rpm -qpil pmake-1.45-10.i386.rpm
file /usr/bin/mkdep /usr/bin/pmake /usr/share/doc/pmake-
1.45 /usr/share/man/man1/mkdep.1.gz /usr/share/man/man1/pmake.1.gz /us
r/share/mk
^^^^^ All the files and directories should be there.


7. By now you should have seen the pmake rpm package install but rpm 
fail to update the rpmdb with information regarding the installation 
of the pmake rpm package.




  
Actual results:
All the actual results can be seen in both the Description and the 
Steps to Reproduce sections. Just in case you missed it, here it is 
again:
[root@wilber download]# rpm -Uvh pmake-1.45-10.i386.rpm 
warning: pmake-1.45-10.i386.rpm: V3 DSA signature: NOKEY, key ID 
db42a60e
error: rpmdbNextIterator: skipping h#     382 region trailer: BAD, 
tag 29213 type 65 offset -269 count 6
error: rpmdbNextIterator: skipping h#     382 region trailer: BAD, 
tag 29213 type 65 offset -269 count 6
error: rpmdbNextIterator: skipping h#     382 region trailer: BAD, 
tag 29213 type 65 offset -269 count 6
error: rpmdbNextIterator: skipping h#     382 region trailer: BAD, 
tag 29213 type 65 offset -269 count 6
error: rpmdbNextIterator: skipping h#     382 region trailer: BAD, 
tag 29213 type 65 offset -269 count 6
Preparing...                
########################################### [100%]
   1:pmake                  
########################################### [100%]
rpmdb: PANIC: Invalid argument
rpmdb: fatal region error detected; run recovery
rpmdb: fatal region error detected; run recovery
rpmdb: fatal region error detected; run recovery
rpmdb: fatal region error detected; run recovery
rpmdb: fatal region error detected; run recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from dbcursor->c_put: DB_RUNRECOVERY: Fatal 
error, run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->sync: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from dbcursor->c_close: DB_RUNRECOVERY: 
Fatal error, run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->sync: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->cursor: DB_RUNRECOVERY: Fatal 
error, run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "pmake" records from Name index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->sync: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->cursor: DB_RUNRECOVERY: Fatal 
error, run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "mkdep" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "pmake" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "pmake-1.45" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "tutorial.ms" records from Basenames 
index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "mkdep.1.gz" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "pmake.1.gz" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "Makefile" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.README" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.dep.mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.doc.mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.files.mk" records from Basenames 
index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.inc.mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.info.mk" records from Basenames 
index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.kinc.mk" records from Basenames 
index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.kmod.mk" records from Basenames 
index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.lib.mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.links.mk" records from Basenames 
index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.man.mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.nls.mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.obj.mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.own.mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.prog.mk" records from Basenames 
index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.subdir.mk" records from Basenames 
index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "bsd.sys.mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->get: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: error(-30982) getting "sys.mk" records from Basenames index
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->sync: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->open: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: cannot open Group index using db3 -  (-30982)
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->open: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: cannot open Requirename index using db3 -  (-30982)
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->open: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: cannot open Providename index using db3 -  (-30982)
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->open: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: cannot open Dirnames index using db3 -  (-30982)
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->open: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: cannot open Requireversion index using db3 -  (-30982)
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->open: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: cannot open Provideversion index using db3 -  (-30982)
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->open: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: cannot open Installtid index using db3 -  (-30982)
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->open: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: cannot open Sigmd5 index using db3 -  (-30982)
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->open: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: cannot open Sha1header index using db3 -  (-30982)
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->open: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
error: cannot open Filemd5s index using db3 -  (-30982)
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->sync: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->sync: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->sync: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->sync: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from db->close: DB_RUNRECOVERY: Fatal error, 
run database recovery
rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from dbenv->close: DB_RUNRECOVERY: Fatal 
error, run database recovery
[root@wilber download]# rpm --query pmake
package pmake is not installed
[root@wilber download]# rpm --query pmake-1.45-10.i386.rpm 
package pmake-1.45-10.i386.rpm is not installed
[root@wilber download]# rpm --query pmake-1.45-10.i386
package pmake-1.45-10.i386 is not installed
[root@wilber download]# rpm --query pmake-1.45-10
package pmake-1.45-10 is not installed
[root@wilber download]# rpm -qpil pmake-1.45-10.i386.rpm
warning: pmake-1.45-10.i386.rpm: V3 DSA signature: NOKEY, key ID 
db42a60e
Name        : pmake                        Relocations: (not 
relocateable)
Version     : 1.45                              Vendor: Red Hat, Inc.
Release     : 10                            Build Date: Sat 25 Jan 
2003 05:29:26 PM EST
Install Date: (not installed)               Build Host: 
porky.devel.redhat.com
Group       : Development/Tools             Source RPM: pmake-1.45-
10.src.rpm
Size        : 306879                           License: BSD
Signature   : DSA/SHA1, Mon 24 Feb 2003 04:42:45 PM EST, Key ID 
219180cddb42a60e
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Summary     : The BSD 4.4 version of make.
Description :
Make is a GNU tool which allows users to build and install programs
without any significant knowledge of the build process. Details about
how the program should be built are included in the program's
Makefile. Pmake is a particular version (BSD 4.4) of make. Pmake
supports some additional syntax which is not in the standard make
program. Some Berkeley programs have Makefiles written for pmake.
/usr/bin/mkdep
/usr/bin/pmake
/usr/share/doc/pmake-1.45
/usr/share/doc/pmake-1.45/tutorial.ms
/usr/share/man/man1/mkdep.1.gz
/usr/share/man/man1/pmake.1.gz
/usr/share/mk
/usr/share/mk/Makefile
/usr/share/mk/bsd.README
/usr/share/mk/bsd.dep.mk
/usr/share/mk/bsd.doc.mk
/usr/share/mk/bsd.files.mk
/usr/share/mk/bsd.inc.mk
/usr/share/mk/bsd.info.mk
/usr/share/mk/bsd.kinc.mk
/usr/share/mk/bsd.kmod.mk
/usr/share/mk/bsd.lib.mk
/usr/share/mk/bsd.links.mk
/usr/share/mk/bsd.man.mk
/usr/share/mk/bsd.nls.mk
/usr/share/mk/bsd.obj.mk
/usr/share/mk/bsd.own.mk
/usr/share/mk/bsd.prog.mk
/usr/share/mk/bsd.subdir.mk
/usr/share/mk/bsd.sys.mk
/usr/share/mk/sys.mk
[root@wilber download]# 
file /usr/bin/mkdep /usr/bin/pmake /usr/share/doc/pmake-
1.45 /usr/share/man/man1/mkdep.1.gz /usr/share/man/man1/pmake.1.gz /us
r/share/mk
/usr/bin/mkdep:                 Bourne shell script text executable
/usr/bin/pmake:                 ELF 32-bit LSB executable, Intel 
80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked 
(uses shared libs), stripped
/usr/share/doc/pmake-1.45:      directory
/usr/share/man/man1/mkdep.1.gz: gzip compressed data, was "mkdep.1", 
from Unix, max compression
/usr/share/man/man1/pmake.1.gz: gzip compressed data, was "pmake.1", 
from Unix, max compression
/usr/share/mk:                  directory
[root@wilber download]# 

From these results you can see that rpm successfully installed the 
pmake rpm package but failed to update the rpmdb with information 
regarding the installation on the pmake rpm package. This would 
quickly break dependancy resolution over time.





Expected results:
[root@wilber download]# rpm -Uvh pmake-1.45-10.i386.rpm 
warning: pmake-1.45-10.i386.rpm: V3 DSA signature: NOKEY, key ID 
db42a60e
Preparing...                
########################################### [100%]
   1:pmake                  
########################################### [100%]
[root@wilber download]# rpm --query pmake
pmake-1.45-10
[root@wilber download]# 





Additional info:
I'm not sure what corrupted the rpmdb or if it is corrupted for that 
matter. Also I am not sure excatly what inserted the bad information 
into the rpmdb but I suspect it was one of the following *lib* rpm 
packages which all came from the RH9 rpm dirs:
dietlibc-0.21-4.i386.rpm
glib2-2.2.1-1.i386.rpm
glib2-devel-2.2.1-1.i386.rpm
glibc-2.3.2-11.9.i386.rpm
glibc-2.3.2-11.9.i686.rpm
glibc-2.3.2-27.9.7.i386.rpm
glibc-2.3.2-27.9.7.i686.rpm
glibc-common-2.3.2-11.9.i386.rpm
glibc-common-2.3.2-27.9.7.i386.rpm
glibc-debug-2.3.2-11.9.i386.rpm
glibc-debug-2.3.2-27.9.7.i386.rpm
glibc-devel-2.3.2-11.9.i386.rpm
glibc-devel-2.3.2-27.9.7.i386.rpm
glibc-kernheaders-2.4-8.10.i386.rpm
glibc-profile-2.3.2-11.9.i386.rpm
glibc-profile-2.3.2-27.9.7.i386.rpm
glibc-utils-2.3.2-11.9.i386.rpm
glibc-utils-2.3.2-27.9.7.i386.rpm
glib-1.2.10-10.i386.rpm
glib-devel-1.2.10-10.i386.rpm

Is there a tool that scans the rpmdb and fixs any errors it comes 
across?
Comment 1 Jeff Johnson 2004-02-01 07:47:14 EST

*** This bug has been marked as a duplicate of 114622 ***
Comment 2 Red Hat Bugzilla 2006-02-21 14:01:01 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

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